module Rotators
{
	vehicle SemiTruckBox
	{
		template! = Rotators.SemiTruckTemplate,
		offRoadEfficiency = 1,
		engineRPMType = van,

		model
		{
			file = Rotators.SemiTruckBoxBase,
			scale = 1.1400,
			offset = 0.0000 0.6491 0.6228,
		}

		skin
		{
			texture = Vehicles/vehicles_rSemiTruckBox_white,
		}

		skin
		{
			texture = Vehicles/vehicles_rSemiTruck_white,
		}

		skin
		{
			texture = Vehicles/vehicles_rSemiTruck_Black,
		}

		skin
		{
			texture = Vehicles/vehicles_rSemiTruck_red,
		}

		skin
		{
			texture = Vehicles/vehicles_rSemiTruck_blue,
		}

		skin
		{
			texture = Vehicles/vehicles_rSemiTruck_CaspianBlue,
		}

		skin
		{
			texture = Vehicles/vehicles_rSemiTruck_yellow,
		}

		skin
		{
			texture = Vehicles/Vehicles_rSemiTruck_Green,
		}

		extents = 1.8596 0.7018 7.2632,
		mass = 800,
		physicsChassisShape = 1.8596 0.7018 7.2632,
		centerOfMassOffset = 0.0000 -0.0877 0.1404,
		shadowExtents = 2.1890 7.9141,
		shadowOffset = 0.0000 0.1524,
		engineForce = 6250,
		maxSpeed = 50f,
		engineLoudness = 125,
		engineQuality = 85,
		brakingForce = 25,
		stoppingMovementForce = 4.0f,
		rollInfluence = 0.2f,
		steeringIncrement = 0.04,
		steeringClamp = 0.25,
		suspensionStiffness = 85,
		suspensionCompression = 8.83,
		suspensionDamping = 3.88,
		maxSuspensionTravelCm = 10,
		suspensionRestLength = 0.16f,
		wheelFriction = 1.6f,
		seats = 2,
		template = PassengerSeat2,

		passenger FrontLeft
		{
			position inside
			{
				offset = 0.3158 -0.0175 1.1316,
				rotate = 0.0000 0.0000 0.0000,
			}

			position outside
			{
				offset = 1.1491 -0.5526 0.9561,
				rotate = 0.0000 0.0000 0.0000,
				area = SeatFrontLeft,
			}
		}

		passenger FrontRight
		{
			position inside
			{
				offset = -0.3158 -0.0175 1.1316,
				rotate = 0.0000 0.0000 0.0000,
			}

			position outside
			{
				offset = -1.1228 -0.5526 0.9649,
				rotate = 0.0000 0.0000 0.0000,
				area = SeatFrontRight,
			}
		}

		wheel RearLeft
		{
			front = false,
			offset = 0.0000 -0.9123 -1.4912,
			radius = 0.40f,
			width = 3.00f,
		}

		wheel RearRight
		{
			front = false,
			offset = 0.0000 -0.9123 -2.5351,
			radius = 0.40f,
			width = 3.00f,
		}

		area TruckBed
		{
			xywh = 0.0000 -3.7544 2.0000 1.2281,
		}

		template = Trunk/part/TruckBed,
		template = Door/part/DoorRear,

		part TruckBed
		{
			itemType = Base.BigTrunk,

			container
			{
				conditionAffectsCapacity = false,
				capacity = 500,
			}
		}

		part DoorRear
		{
			model DoorRear
			{
				file = Rotators.SemiTruckBoxTrunk,
				rotate = 90 0 0,
				scale = 1,
				offset = 0 0 0,
			}

			table install
			{
				recipes = Intermediate Mechanics,
			}

			table uninstall
			{
				recipes = Intermediate Mechanics,
			}

			anim Close
			{
				sound = VehicleTrunkCloseStandard,
				anim = Trunk_closing,
				rate = 1.3,
			}

			anim Open
			{
				sound = VehicleTrunkOpenStandard,
				anim = Trunk_closing,
				reverse = TRUE,
				rate = 1.0,
			}

			anim Closed
			{
				anim = Trunk_closing,
				reverse = TRUE,
				animate = FALSE,
			}

			anim Opened
			{
				anim = Trunk_closing,
				animate = FALSE,
			}

			mechanicRequireKey = false,

			anim ActorOpen
			{
				anim = WindowOpenSuccess,
				rate = 0.15,
				angle = 0.0 0.0 0.0,
			}

			anim ActorClose
			{
				anim = Attack_Shove,
				rate = 0.3,
				angle = 0.0 0.0 0.0,
			}
		}

		template = GloveBox,

		part GasTank
		{
			model GasTank
			{
				file = Rotators.SemiTruckBoxGasTank,
			}
		}

		physics box
		{
			offset = 0.0000 1.2544 -0.3860,
			extents = 1.8416 2.0099 6.1980,
			rotate = 0.0000 0.0000 0.0000,
		}

		area Engine
		{
			xywh = 0.0000 3.5000 3.4386 1.5965,
		}

		area SeatFrontLeft
		{
			xywh = 1.3158 2.0088 0.7895 0.8246,
		}

		area SeatFrontRight
		{
			xywh = -1.3158 2.0088 0.7895 0.8246,
		}

		area GasTank
		{
			xywh = -1.1316 0.7632 0.4211 0.4211,
		}

		area TireFrontLeft
		{
			xywh = 1.1842 3.1491 0.4211 0.4211,
		}

		area TireFrontRight
		{
			xywh = -1.1667 3.1491 0.4211 0.4211,
		}

		area TireRearLeft
		{
			xywh = 1.1667 -0.8684 0.4211 0.4211,
		}

		area TireRearRight
		{
			xywh = -1.1842 -1.8860 0.4211 0.4211,
		}

		attachment trailer
		{
			offset = 0.0000 -0.8713 -4.0990,
			rotate = 0.0000 0.0000 0.0000,
			zoffset = -1.0000,
		}

		attachment trailerfront
		{
			offset = 0.0000 -0.8218 3.2970,
			rotate = 0.0000 0.0000 0.0000,
			zoffset = 1.0000,
		}
	}
}
