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

	model GAZ21frontwheelleft
	{
		mesh = vehicles/Vehicle_GAZ21_Wheel,
		texture = vehicles/Vehicle_GAZ21_wheel,
	}
	model GAZ21frontwheelright
	{
		mesh = vehicles/Vehicle_GAZ21_Wheel,
		texture = vehicles/Vehicle_GAZ21_wheel,
	}
	model GAZ21backwheelleft
	{
		mesh = vehicles/Vehicle_GAZ21_Wheel,
		texture = vehicles/Vehicle_GAZ21_wheel,
	}
	model GAZ21backwheelright
	{
		mesh = vehicles/Vehicle_GAZ21_Wheel,
		texture = vehicles/Vehicle_GAZ21_wheel,
	}

	vehicle GAZM20
	{
		mechanicType = 3,
		offRoadEfficiency = 0.8,
		engineRepairLevel = 4,
		playerDamageProtection = 3,

		model
		{
			file = GAZM20,
			scale = 1.8000,
			offset = 0.0000 0.3448 0.0000,
		}

		skin
		{
			texture = Vehicles/Vehicle_M20GAZ_RED,
		}

		skin
		{
			texture = Vehicles/Vehicle_M20GAZ_GRA,
		}

		skin
		{
			texture = Vehicles/Vehicle_M20GAZ_GRAGRE,
		}

		skin
		{
			texture = Vehicles/Vehicle_M20GAZ_GRE,
		}

		skin
		{
			texture = Vehicles/Vehicle_M20GAZ_BEZH,
		}

		skin
		{
			texture = Vehicles/Vehicle_M20GAZ_BLU,
		}

		skin
		{
			texture = Vehicles/Vehicle_M20GAZ_BEZH2,
		}

		skin
		{
			texture = Vehicles/Vehicle_M20GAZ_WHY,
		}

		skin
		{
			texture = Vehicles/Vehicle_M20GAZ_BLK,
		}

		skin
		{
			texture = Vehicles/Vehicle_M20GAZ_BLUWHY,
		}

		skin
		{
			texture = Vehicles/Vehicle_M20GAZ_BEZHBROWN,
		}

		skin
		{
			texture = Vehicles/Vehicle_M20GAZ_REDWHY,
		}

		skin
		{
			texture = Vehicles/Vehicle_M20GAZ_DEADGRA,
		}

		skin
		{
			texture = Vehicles/Vehicle_M20GAZ_DEADBEZH,
		}

		textureMask = Vehicles/Vehicle_M20GAZ_Mask,
		textureLights = Vehicles/Vehicle_M20GAZ_lights,
		textureDamage1Overlay = Vehicles/Vehicle_M20GAZ_DAMAGE1,
		textureDamage2Overlay = Vehicles/Vehicle_M20GAZ_DAMAGE2,
		textureDamage1Shell = Vehicles/Vehicle_M20GAZ_DAMAGE1,
		textureDamage2Shell = Vehicles/Vehicle_M20GAZ_DAMAGE2,
		textureRust = Vehicles/Vehicle_M20GAZ_Rust,

		sound
		{
			engine = VehicleEngineOffRoad,
			engineStart = VehicleEngineOffRoad,
			engineTurnOff = VehicleEngineOffRoad,
			horn = VehicleHornJeep,
			ignitionFail = VehicleIgnitionFailOffRoad,
		}

		extents = 0.7356 0.6437 2.0115,
		mass = 1500,
		physicsChassisShape = 0.6897 0.6437 1.9540,
		centerOfMassOffset = 0.0000 0.3218 0.0000,
		shadowExtents = 0.6330 1.8406,
		shadowOffset = 0.0000 -0.0005,
		engineForce = 3400,
		engineQuality = 46,
		engineLoudness = 85,
		maxSpeed = 40f,
		gearRatioCount = 4,
		gearRatioR = 7.09,
		gearRatio1 = 7.44,
		gearRatio2 = 2.29,
		gearRatio3 = 1,
		gearRatio4 = 1,
		brakingForce = 25,
		rollInfluence = 0.6f,
		steeringIncrement = 0.03,
		steeringClamp = 0.28,
		suspensionStiffness = 40,
		suspensionCompression = 1.83,
		suspensionDamping = 0.88,
		maxSuspensionTravelCm = 10,
		suspensionRestLength = 0.2,
		wheelFriction = 1.4f,
		frontEndHealth = 150,
		rearEndHealth = 150,
		seats = 4,

		wheel FrontLeft
		{
			front = true,
			offset = 0.2931 -0.2644 0.6609,
			radius = 0.15f,
			width = 0.2f,
		}

		wheel FrontRight
		{
			front = true,
			offset = -0.2931 -0.2644 0.6609,
			radius = 0.15f,
			width = 0.2f,
		}

		wheel RearLeft
		{
			front = false,
			offset = 0.2931 -0.2644 -0.5172,
			radius = 0.15f,
			width = 0.2f,
		}

		wheel RearRight
		{
			front = false,
			offset = -0.2931 -0.2644 -0.5172,
			radius = 0.15f,
			width = 0.2f,
		}

		template = PassengerSeat4,

		passenger FrontLeft
		{
			position inside
			{
				offset = 0.1552 -0.1149 0.0172,
				rotate = 0.0000 0.0000 0.0000,
			}

			position outside
			{
				offset = 0.6552 -0.4138 0.0575,
				rotate = 0.0000 0.0000 0.0000,
				area = SeatFrontLeft,
			}
		}

		passenger FrontRight
		{
			position inside
			{
				offset = -0.1609 -0.1149 0.0172,
				rotate = 0.0000 0.0000 0.0000,
			}

			position outside
			{
				offset = -0.6552 -0.5690 0.0517,
				rotate = 0.0000 0.0000 0.0000,
				area = SeatFrontRight,
			}
		}

		passenger RearLeft
		{
			position inside
			{
				offset = 0.1552 -0.1149 -0.4425,
				rotate = 0.0000 0.0000 0.0000,
			}

			position outside
			{
				offset = 0.6552 -0.4138 -0.4138,
				rotate = 0.0000 0.0000 0.0000,
				area = SeatRearLeft,
			}
		}

		passenger RearRight
		{
			position inside
			{
				offset = -0.1552 -0.1149 -0.4425,
				rotate = 0.0000 0.0000 0.0000,
			}

			position outside
			{
				offset = -0.6494 -0.4138 -0.3793,
				rotate = 0.0000 0.0000 0.0000,
				area = SeatRearRight,
			}
		}

		area Engine
		{
			xywh = 0.0000 1.2299 0.5172 0.4483,
		}

		area TruckBed
		{
			xywh = 0.0000 -1.1954 0.3908 0.3793,
		}

		area SeatFrontLeft
		{
			xywh = 0.5920 0.1494 0.4483 0.4368,
		}

		area SeatFrontRight
		{
			xywh = -0.5920 0.1494 0.4483 0.4368,
		}

		area SeatRearRight
		{
			xywh = -0.5920 -0.2931 0.4483 0.4368,
		}

		area SeatRearLeft
		{
			xywh = 0.5920 -0.2931 0.4483 0.4368,
		}

		area GasTank
		{
			xywh = 0.5115 -0.8046 0.2874 0.2989,
		}

		area TireFrontLeft
		{
			xywh = 0.5920 0.6667 0.4483 0.4483,
		}

		area TireFrontRight
		{
			xywh = -0.5920 0.6667 0.4483 0.4483,
		}

		area TireRearLeft
		{
			xywh = 0.5920 -0.5172 0.4483 0.4483,
		}

		area TireRearRight
		{
			xywh = -0.5977 -0.5172 0.4483 0.4483,
		}

		template = Trunk/part/TruckBed,

		part TruckBed
		{
			itemType = Base.BigTrunk,

			container
			{
				capacity = 85,
			}
		}

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

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

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

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

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

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

		template = GasTank,

		part GasTank
		{
			install
			{
				skills = Mechanics:4,
				recipes = Basic Mechanics,
			}

			uninstall
			{
				skills = Mechanics:4,
				recipes = Basic Mechanics,
			}
		}

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

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

			table uninstall
			{
				recipes = Basic Mechanics,
			}
		}

		template = EngineDoor,

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

			table uninstall
			{
				recipes = Basic Mechanics,
			}
		}

		part Heater
		{
			category = engine,

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

		part PassengerCompartment
		{
			category = nodisplay,

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

		template = Windshield/part/Windshield,
		template = Windshield/part/WindshieldRear,

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

			table uninstall
			{
				recipes = Basic Mechanics,
			}
		}

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

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

			table uninstall
			{
				recipes = Basic Mechanics,
			}
		}

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

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

			table uninstall
			{
				recipes = Basic Mechanics,
			}
		}

		template = Tire,

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

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

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

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

		template = Brake,

		part Brake*
		{
			table install
			{
				skills = Mechanics:3,
				recipes = Basic Mechanics,
			}

			table uninstall
			{
				skills = Mechanics:3,
				recipes = Basic Mechanics,
			}
		}

		template = Suspension,

		part Suspension*
		{
			table install
			{
				skills = Mechanics:3,
				recipes = Basic Mechanics,
			}

			table uninstall
			{
				skills = Mechanics:3,
				recipes = Basic Mechanics,
			}
		}

		template = Headlight,

		attachment trailerfront
		{
			offset = 0.0000 -0.2759 1.0345,
			rotate = 0.0000 0.0000 0.0000,
		}

		attachment trailer
		{
			offset = 0.0000 -0.2299 -1.0345,
			rotate = 0.0000 0.0000 0.0000,
		}
	}
}
