module Base
{
	model AC40Base
	{
		mesh = vehicles/Vehicle_AC40_Body,
		shader = vehicle,
		invertX = false,
		scale = 1,
	}

	model ZILfrontwheelleft
	{
		mesh = vehicles/Vehicle_ZIL_Wheel_FRONT,
		texture = vehicles/Vehicle_ZIL_wheel,
	}
	model ZILfrontwheelright
	{
		mesh = vehicles/Vehicle_ZIL_Wheel_FRONT,
		texture = vehicles/Vehicle_ZIL_wheel,
	}
	model ZILbackwheelleft
	{
		mesh = vehicles/Vehicle_ZIL_Wheel_REAR,
		texture = vehicles/Vehicle_ZIL_wheel,
	}
	model ZILbackwheelright
	{
		mesh = vehicles/Vehicle_ZIL_Wheel_REAR,
		texture = vehicles/Vehicle_ZIL_wheel,
	}

	vehicle AC40
	{
		mechanicType = 2,
		offRoadEfficiency = 3,
		engineRepairLevel = 5,
		playerDamageProtection = 4,

		model
		{
			file = AC40Base,
			scale = 1.3500,
			7500,
			offset = 0.0000 0.0667 0.6296,
		}

		skin
		{
			texture = Vehicles/Vehicle_AC40_37,
		}

		textureMask = Vehicles/Vehicle_AC40_Mask,
		textureLights = Vehicles/Vehicle_AC40_Lights,
		textureDamage1Overlay = Vehicles/Vehicle_AC40_Damage1,
		textureDamage2Overlay = Vehicles/Vehicle_AC40_Damage2,
		textureDamage1Shell = Vehicles/Vehicle_AC40_Damage1,
		textureDamage2Shell = Vehicles/Vehicle_AC40_Damage2,
		textureRust = Vehicles/Vehicle_AC40_Rust,

		sound
		{
			engine = VehicleEngineStepVan,
			engineStart = start_engine_ZIL,
			engineTurnOff = OKA_engine_off,
			horn = horn_ZIL,
			ignitionFail = fail_start_engine_ZIL,
		}

                lightbar
		{
			soundSiren = VehicleSiren,
			leftCol = 0;0;1,
			rightCol = 0;0;1,
		}


		extents = 1.4519 0.5333 4.4593,
		mass = 1200,
		physicsChassisShape = 1.3926 0.5481 4.3407,
		centerOfMassOffset = 0.0000 -0.1037 -0.1185,
		shadowExtents = 1.3387 3.9606,
		shadowOffset = -0.0021 -0.1420,
		engineForce = 3500,
		engineQuality = 55,
		engineLoudness = 145,
		maxSpeed = 35f,
		brakingForce = 40,
		rollInfluence = 0.4f,
		steeringIncrement = 0.8,
		steeringClamp = 0.2,
		suspensionStiffness = 60,
		suspensionCompression = 2.75,
		suspensionDamping = 2.95,
		maxSuspensionTravelCm = 5,
		suspensionRestLength = 0.2,
		wheelFriction = 0.8f,
		frontEndHealth = 1000,
		rearEndHealth = 1000,
		seats = 4,

		physics box
		{
			offset = 0.0000 0.5333 0.4000,
			extents = 1.4148 0.9704 1.6074,
			rotate = 0.0000 0.0000 0.0000,
		}

		wheel FrontLeft
		{
			front = true,
			offset = 0.5630 -0.2741 0.8148,
			radius = 0.3f,
			width = 0.2f,
		}

		wheel FrontRight
		{
			front = true,
			offset = -0.5556 -0.2741 0.8148,
			radius = 0.3f,
			width = 0.2f,
		}

		wheel RearLeft
		{
			front = false,
			offset = 0.5333 -0.2741 -1.7407,
			radius = 0.3f,
			width = 0.2f,
		}

		wheel RearRight
		{
			front = false,
			offset = -0.5407 -0.2741 -1.7407,
			radius = 0.3f,
			width = 0.2f,
		}


		template = PassengerSeat4,

		passenger FrontLeft
		{
			position inside
			{
				offset = 0.2667 0.3704 0.0370,
				rotate = 0.0000 0.0000 0.0000,
			}

			position outside
			{
				offset = 1.0222 -0.4741 0.7704,
				rotate = 0.0000 0.0000 0.0000,
				area = SeatFrontLeft,
			}
		}

		passenger FrontRight
		{
			position inside
			{
				offset = -0.2519 0.3630 0.0370,
				rotate = 0.0000 0.0000 0.0000,
			}

			position outside
			{
				offset = -0.9926 -0.4741 0.7704,
				rotate = 0.0000 0.0000 0.0000,
				area = SeatFrontRight,
			}
		}

		passenger RearLeft
		{
			position inside
			{
				offset = 0.2000 0.3481 -0.7111,
				rotate = 0.0000 0.0000 0.0000,
			}

			position outside
			{
				offset = 0.6667 -0.4074 -0.4074,
				rotate = 0.0000 0.0000 0.0000,
				area = SeatRearLeft,
			}
		}

		passenger RearRight
		{
			position inside
			{
				offset = -0.2000 0.3481 -0.7111,
				rotate = 0.0000 0.0000 0.0000,
			}

			position outside
			{
				offset = -0.6593 -0.4074 -0.3778,
				rotate = 0.0000 0.0000 0.0000,
				area = SeatRearRight,
			}
		}

		area Engine
		{
			xywh = 0.0000 2.3333 0.8593 0.4444,
		}

		area TruckBed
		{
			xywh = 0.0000 -1.3704 2.3704 1.9704,
		}

		area SeatFrontLeft
		{
			xywh = 0.9481 0.7556 0.4444 0.4741,
		}

		area SeatFrontRight
		{
			xywh = -0.9481 0.7556 0.4444 0.4741,
		}

		area SeatRearRight
		{
			xywh = -0.9333 0.0741 0.4148 0.5630,
		}

		area SeatRearLeft
		{
			xywh = 0.9333 0.0741 0.4148 0.5630,
		}

		area GasTank
		{
			xywh = 0.9556 -2.0000 0.4444 0.4444,
		}

		area TireFrontLeft
		{
			xywh = 0.9556 1.4444 0.4444 0.4444,
		}

		area TireFrontRight
		{
			xywh = -0.9556 1.4370 0.4444 0.4444,
		}

		area TireRearLeft
		{
			xywh = 0.9630 -1.1111 0.4444 0.4444,
		}

		area TireRearRight
		{
			xywh = -0.9259 -1.1111 0.4444 0.4444,
		}

		template = Seat/part/SeatFrontLeft,
		template = Seat/part/SeatFrontRight,
		template = Seat/part/SeatRearLeft,
		template = Seat/part/SeatRearRight,

		part Seat*
		{
			table install
			{
				skills = Mechanics:2,
				recipes = Intermediate Mechanics,
			}

			table uninstall
			{
				skills = Mechanics:2,
				recipes = Intermediate Mechanics,
			}
		}

		template = GloveBox,

		part GloveBox
		{
			area = SeatFrontRight,
			itemType = Base.GloveBox,
			mechanicRequireKey = true,

			container
			{
				capacity = 20,
				test = Vehicles.ContainerAccess.GloveBox,
			}

			lua
			{
				create = Vehicles.Create.Default,
			}
		}

		
		template = Trunk/part/TruckBed,

		part TruckBed
		{
			container
			{
				capacity = 30,
			}
		}

		template = GasTank,

		part GasTank
		{
			install
			{
				skills = Mechanics:7,
				recipes = Intermediate Mechanics,
			}

			uninstall
			{
				skills = Mechanics:7,
				recipes = Intermediate Mechanics,
			}
		}

		template = Battery,
		template = Engine,
		template = Muffler,

		part Muffler
		{
			table install
			{
				recipes = Intermediate Mechanics,
			}

			table uninstall
			{
				recipes = Intermediate Mechanics,
			}
		}

		template = EngineDoor,

		part EngineDoor
		{
			table install
			{
				recipes = Intermediate Mechanics,
			}

			table uninstall
			{
				recipes = Intermediate Mechanics,
			}
		}

		part Heater
		{
			category = engine,

			lua
			{
				update = Vehicles.Update.Heater,
			}
		}

		part PassengerCompartment
		{
			category = nodisplay,

			lua
			{
				update = Vehicles.Update.PassengerCompartment,
			}
		}

		template = Windshield/part/Windshield,

		part Windshield*
		{
			table install
			{
				recipes = Intermediate Mechanics,
			}

			table uninstall
			{
				recipes = Intermediate Mechanics,
			}
		}

		template = Window/part/WindowFrontLeft,
		template = Window/part/WindowFrontRight,
		template = Window/part/WindowRearRight,
		template = Window/part/WindowRearLeft,

		part Window*
		{
			table install
			{
				recipes = Intermediate Mechanics,
			}

			table uninstall
			{
				recipes = Intermediate Mechanics,
			}
		}

		template = Door/part/DoorFrontLeft,
		template = Door/part/DoorFrontRight,
		template = Door/part/DoorRearLeft,
		template = Door/part/DoorRearRight,

		part Door*
		{
			table install
			{
				recipes = Intermediate Mechanics,
			}

			table uninstall
			{
				recipes = Intermediate Mechanics,
			}
		}

		template = Tire,

		part TireFrontLeft
		{
			model InflatedTirePlusWheel
			{
				file = ZILfrontwheelleft,
			}
		}

		part TireFrontRight
		{
			model InflatedTirePlusWheel
			{
				file = ZILfrontwheelright,
			}
		}

		part TireRearLeft
		{
			model InflatedTirePlusWheel
			{
				file = ZILbackwheelleft,
			}
		}

		part TireRearRight
		{
			model InflatedTirePlusWheel
			{
				file = ZILbackwheelright,
			}
		}

		template = Brake,

		part Brake*
		{
			table install
			{
				skills = Mechanics:6,
				recipes = Intermediate Mechanics,
			}

			table uninstall
			{
				skills = Mechanics:6,
				recipes = Intermediate Mechanics,
			}
		}

		template = Suspension,

		part Suspension*
		{
			table install
			{
				skills = Mechanics:6,
				recipes = Intermediate Mechanics,
			}

			table uninstall
			{
				skills = Mechanics:6,
				recipes = Intermediate Mechanics,
			}
		}

		template = Headlight,
                template = Radio,

		part Radio*
		{
			itemType = Radio.HamRadio2,
		}

		template vehicle
		{
			part TCLConfig
			{
				category = nodisplay,

				table TCLConfig
				{
					trailerOutside = false,
				}
			}
		}

		attachment trailer
		{
			offset = 0.0000 0.1704 -3.0444,
			rotate = 0.0000 0.0000 0.0000,
			zoffset = -1.0000,
		}
	}
}
