module Base
{
	model TrailerBoatMotorBody
    {
        mesh = trailers/TrailerBoat|BoatMotor,
        shader = vehicle_norandom_multiuv,
        invertX = FALSE,
        scale = 0.0050,
    }
	model TrailerBoatMotorName_NP
    {
        mesh = trailers/TrailerBoat|BoatMotorBodyName,
        texture = Boats/Name_BoatMotor_NP,
        shader = vehiclewheel,
        invertX = FALSE,
        scale = 0.0050,
    }
	model TrailerBoatMotorName_Orianna
    {
        mesh = trailers/TrailerBoat|BoatMotorBodyName,
        texture = Boats/Name_BoatMotor_Orianna,
        shader = vehiclewheel,
        invertX = FALSE,
        scale = 0.0050,
    }
	vehicle TrailerWithBoatMotor
	{
		mechanicType = 3,
		engineRepairLevel = 5,
		playerDamageProtection = 1.3,
		offRoadEfficiency = 2,
		spawnOffsetY = 0.0,

		model
		{
			file = TrailerBoatMotorBody,
			scale = 1.8000,
			offset = 0.0000 0.5333 -1.2833,
		}

		skin
		{
			texture = Boats/BoatMotor_base,
		}

		textureShadow = Shadows/TrailerBoatMotor_shadow,
		textureLights = Boats/BoatMotor_light,
		textureMask = Boats/BoatMotor_mask,
		textureRust = Boats/BoatMotor_rust,
		extents = 1.3556 0.5667 4.0000,
		mass = 300,
		physicsChassisShape = 1.4444 0.5667 4.0000,
		centerOfMassOffset = 0.0000 0.6722 -1.0556,
		shadowExtents = 1.3611 4.7389,
		shadowOffset = 0.0000 -0.7001,
		engineForce = 4000,
		engineQuality = 80,
		engineLoudness = 110,
		maxSpeed = 70f,
		brakingForce = 80,
		stoppingMovementForce = 10.0f,
		rollInfluence = 0.8f,
		steeringIncrement = 0.04,
		steeringClamp = 0.3,
		suspensionStiffness = 40,
		suspensionCompression = 3.83,
		suspensionDamping = 2.88,
		maxSuspensionTravelCm = 10,
		suspensionRestLength = 0.2,
		wheelFriction = 1.5f,
		frontEndHealth = 150,
		rearEndHealth = 150,
		template = Seat/part/SeatFrontLeft,
		template = Seat/part/SeatFrontRight,
		template = Seat/part/SeatRearLeft,
		template = Seat/part/SeatRearRight,
		template = Seat/part/SeatMiddleLeft,
		template = Seat/part/SeatMiddleRight,

		part Seat*
		{
			itemType = Aquatsar.NotRemovableBoatSeat,
			category = nodisplay,

			container
			{
				test = Boats.ContainerAccess.BlockSeat,
			}
		}

		template = BoatStandartParts/part/GasTank,
		template = BoatStandartParts/part/Battery,
		template = BoatStandartParts/part/Engine,
		template = BoatStandartParts/part/WindowFrontLeft,
		template = BoatStandartParts/part/WindowFrontRight,
		template = BoatStandartParts/part/WindowRearLeft,
		template = BoatStandartParts/part/WindowRearRight,
		template = BoatStandartParts/part/Windshield,
		template = BoatStandartParts/part/Radio,
		template = BatteryHeater/part/BatteryHeater,
		template = Propeller,

		part Propeller
		{
			table uninstall
			{
				items
				{
					1
					{
						type = Base.Wrench,
						count = 1,
						keep = true,
						equip = secondary,
					}
				}

				time = 2000,
				skills = Mechanics:3,
				recipes = Powerboats Mechanics,
				test = Vehicles.UninstallTest.Default,
				complete = Boats.UninstallComplete.Propeller,
			}
		}

		template = LightApi,
		template = Light/part/LightFloodlightLeft,
		template = Light/part/LightCabin,
		template = Drawers/part/DrawerFrontLeft,
		template = Counters/part/CounterFrontRight,
		template = InCabin/part/InCabinMiddleLeft,
		template = InCabin/part/InCabinMiddleRight,
		template = InCabin/part/InCabinFrontLeft,
		template = InCabin/part/InCabinFrontRight,
		template = Cupboards/part/CupboardMiddleLeft,
		template = Counters/part/CounterMiddleLeft,
		template = Medicines/part/MedicineMiddleRight,
		template = SeatBoxWooden/part/SeatBoxWoodenRearLeft,
		template = SeatBoxWooden/part/SeatBoxWoodenRearRight,
		template = Mattresses/part/MattressMiddleLeft,
		template = Mattresses/part/MattressMiddleRight,
		template = BoatMotorName/part/BoatName,

		part BoatName
		{
			model NP
			{
				file = TrailerBoatMotorName_NP,
			}

			model Orianna
			{
				file = TrailerBoatMotorName_Orianna,
			}
		}

		physics box
		{
			offset = -0.1444 0.1222 1.1111,
			extents = 0.0556 0.0556 0.6833,
			rotate = 0.0000 17.0000 0.0000,
		}

		physics box
		{
			offset = 0.1389 0.1222 1.1111,
			extents = 0.0556 0.0556 0.6833,
			rotate = 0.0000 -18.0000 0.0000,
		}

		physics sphere
		{
			offset = -0.0056 0.1278 1.4389,
			radius = 0.0500,
		}

		wheel FrontLeft
		{
			front = true,
			offset = 0.6000 -0.5611 0.2056,
			radius = 0.15f,
			width = 0.2f,
		}

		wheel FrontRight
		{
			front = true,
			offset = -0.6000 -0.5611 0.2056,
			radius = 0.15f,
			width = 0.2f,
		}

		wheel RearLeft
		{
			front = true,
			offset = 0.6000 -0.5611 -0.1611,
			radius = 0.15f,
			width = 0.2f,
		}

		wheel RearRight
		{
			front = true,
			offset = -0.6000 -0.5611 -0.1611,
			radius = 0.15f,
			width = 0.2f,
		}

		area TireFrontLeft
		{
			xywh = 0.9167 -1.0778 0.4778 0.4778,
		}

		area TireFrontRight
		{
			xywh = -0.9167 -1.0778 0.4778 0.4778,
		}

		area TireRearLeft
		{
			xywh = 0.9167 -1.4444 0.4778 0.4778,
		}

		area TireRearRight
		{
			xywh = -0.9167 -1.4444 0.4778 0.4778,
		}

		template = Tire/part/TireFrontLeft,
		template = Tire/part/TireFrontRight,
		template = Tire/part/TireRearLeft,
		template = Tire/part/TireRearRight,

		part TireFrontLeft
		{
			table install
			{
				requireInstalled = SuspensionFrontLeft,
			}
		}

		part TireFrontRight
		{
			table install
			{
				requireInstalled = SuspensionFrontRight,
			}
		}

		part TireRearLeft
		{
			table install
			{
				requireInstalled = SuspensionRearLeft,
			}
		}

		part TireRearRight
		{
			table install
			{
				requireInstalled = SuspensionRearRight,
			}
		}

		area GasTank
		{
			xywh = 1.0944 -2.6167 0.8333 0.8000,
		}

		template = Suspension/part/SuspensionFrontLeft,
		template = Suspension/part/SuspensionFrontRight,
		template = Suspension/part/SuspensionRearLeft,
		template = Suspension/part/SuspensionRearRight,

		part Radio
		{
			category = nodisplay,
		}

		part BatteryHeater
		{
			category = nodisplay,
		}

		part Battery
		{
			category = nodisplay,
		}

		part LightCabin
		{
			category = nodisplay,
		}

		attachment trailer
		{
			offset = 0.0000 -0.4778 2.9778,
			rotate = 0.0000 0.0000 0.0000,
		}
	}
}
