module Base
{
	model OKABase
	{
		mesh = vehicles/Vehicle_OKA_Body,
                shader = vehicle_norandom_multiuv_noreflect,
		invertX = FALSE,
		scale = 1,
	}
	model OKAfrontwheelleft
	{
		mesh = vehicles/Vehicle_OKA_Wheel,
		texture = vehicles/Vehicle_OKA_wheel,
	}
	model OKAfrontwheelright
	{
		mesh = vehicles/Vehicle_OKA_Wheel,
		texture = vehicles/Vehicle_OKA_wheel,
	}
	model OKAbackwheelleft
	{
		mesh = vehicles/Vehicle_OKA_Wheel,
		texture = vehicles/Vehicle_OKA_wheel,
	}
	model OKAbackwheelright
	{
		mesh = vehicles/Vehicle_OKA_Wheel,
		texture = vehicles/Vehicle_OKA_wheel,
	}
	vehicle OKA
	{
		mechanicType = 1,
		offRoadEfficiency = 1,
		engineRepairLevel = 1,
		playerDamageProtection = 5,

		model
		{
			file = OKABase,
			scale = 1.4300,
			offset = 0.0000 0.1469 0.0420,
		}

		skin
		{
			texture = Vehicles/Vehicle_OKA_RED,
		}

		skin
		{
			texture = Vehicles/Vehicle_OKA_RED2,
		}

		skin
		{
			texture = Vehicles/Vehicle_OKA_ORN,
		}

		skin
		{
			texture = Vehicles/Vehicle_OKA_GRY,
		}

		skin
		{
			texture = Vehicles/Vehicle_OKA_GRE,
		}

		skin
		{
			texture = Vehicles/Vehicle_OKA_GRE2,
		}

		skin
		{
			texture = Vehicles/Vehicle_OKA_BLU,
		}

		skin
		{
			texture = Vehicles/Vehicle_OKA_BLU2,
		}

		textureMask = Vehicles/Vehicle_OKA_Mask,
		textureLights = Vehicles/Vehicle_OKA_lights,
		textureDamage1Overlay = Vehicles/Veh_OKA_Blood_Mask,
		textureDamage2Overlay = Vehicles/Veh_OKA_Blood_Hvy,
		textureDamage1Shell = Vehicles/Vehicle_OKA_DAMAGE1,
		textureDamage2Shell = Vehicles/Vehicle_OKA_DAMAGE2,
		textureRust = Vehicles/Vehicle_OKA_Rust,

		sound
		{
			engine = VehicleEngineSmallCar,
			engineStart = OKA_engine_start,
			engineTurnOff = OKA_engine_off,
			horn = VAZ_horn,
			ignitionFail = OKA_fail_start_engine,
		}

		extents = 0.7972 0.7133 1.9301,
		mass = 500,
		physicsChassisShape = 0.7972 0.7133 1.9301,
		centerOfMassOffset = 0.0000 0.2937 -0.0140,
		shadowExtents = 0.7158 1.8389,
		shadowOffset = 0.0000 -0.0189,
		engineForce = 2000,
		engineQuality = 33,
		engineLoudness = 50,
		maxSpeed = 70f,
		gearRatioCount = 4,
		gearRatioR = 7.09,
		gearRatio1 = 7.44,
		gearRatio2 = 2.29,
		gearRatio3 = 1,
		brakingForce = 50,
		rollInfluence = 0.5f,
		steeringIncrement = 0.03,
		steeringClamp = 0.28,
		suspensionStiffness = 40,
		suspensionCompression = 1.83,
		suspensionDamping = 0.88,
		maxSuspensionTravelCm = 10,
		suspensionRestLength = 0.2,
		wheelFriction = 1.4f,
		frontEndHealth = 30,
		rearEndHealth = 50,
		seats = 4,

		wheel FrontLeft
		{
			front = true,
			offset = 0.3357 -0.2378 0.5524,
			radius = 0.15f,
			width = 0.2f,
		}

		wheel FrontRight
		{
			front = true,
			offset = -0.3357 -0.2378 0.5524,
			radius = 0.15f,
			width = 0.2f,
		}

		wheel RearLeft
		{
			front = false,
			offset = 0.3357 -0.2378 -0.7063,
			radius = 0.15f,
			width = 0.2f,
		}

		wheel RearRight
		{
			front = false,
			offset = -0.3357 -0.2378 -0.7063,
			radius = 0.15f,
			width = 0.2f,
		}

		template = PassengerSeat4,

		passenger FrontLeft
		{
			position inside
			{
				offset = 0.1608 0.0629 -0.0629,
				rotate = 0.0000 0.0000 0.0000,
			}

			position outside
			{
				offset = 0.6573 -0.3427 -0.0420,
				rotate = 0.0000 0.0000 0.0000,
				area = SeatFrontLeft,
			}
		}

		passenger FrontRight
		{
			position inside
			{
				offset = -0.1678 0.0629 -0.0629,
				rotate = 0.0000 0.0000 0.0000,
			}

			position outside
			{
				offset = -0.6503 -0.3427 -0.0420,
				rotate = 0.0000 0.0000 0.0000,
				area = SeatFrontRight,
			}
		}

		passenger RearLeft
		{
			position inside
			{
				offset = 0.1538 0.0629 -0.4755,
				rotate = 0.0000 0.0000 0.0000,
			}

			position outside
			{
				offset = 0.6573 -0.3427 -0.0420,
				rotate = 0.0000 0.0000 0.0000,
				area = SeatRearLeft,
			}
		}

		passenger RearRight
		{
			position inside
			{
				offset = -0.1608 0.0629 -0.4755,
				rotate = 0.0000 0.0000 0.0000,
			}

			position outside
			{
				offset = -0.6503 -0.3427 -0.0420,
				rotate = 0.0000 0.0000 0.0000,
				area = SeatRearRight,
			}
		}

		area Engine
		{
			xywh = 0.0000 1.0909 0.6573 0.2937,
		}

		area TruckBed
		{
			xywh = 0.0000 -1.1958 0.7413 0.5315,
		}

		area SeatFrontLeft
		{
			xywh = 0.6154 0.0000 0.4336 0.7413,
		}

		area SeatFrontRight
		{
			xywh = -0.6154 0.0000 0.4336 0.7273,
		}

		area SeatRearRight
		{
			xywh = -0.3776 0.0000 0.0420 0.4895,
		}

		area SeatRearLeft
		{
			xywh = 0.3776 0.0000 0.0420 0.4895,
		}

		area GasTank
		{
			xywh = -0.6154 -0.5175 0.4336 0.4336,
		}

		area TireFrontLeft
		{
			xywh = 0.6154 0.6084 0.4336 0.4336,
		}

		area TireFrontRight
		{
			xywh = -0.6154 0.6084 0.4336 0.4336,
		}

		area TireRearLeft
		{
			xywh = 0.6154 -0.6573 0.4336 0.4336,
		}

		area TireRearRight
		{
			xywh = -0.6154 -0.6573 0.4336 0.4336,
		}

		template = Trunk/part/TruckBed,

		part TruckBed
		{
			itemType = Base.BigTrunk,

			container
			{
				capacity = 50,
			}
		}

		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 = 5,
				test = Vehicles.ContainerAccess.GloveBox,
			}

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

		template = GasTank,

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

			uninstall
			{
				skills = Mechanics:3,
				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,

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

			table uninstall
			{
				recipes = Basic Mechanics,
			}
		}

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

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

			table uninstall
			{
				recipes = Basic Mechanics,
			}
		}

		template = Tire,

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

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

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

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

		template = Brake,

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

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

		template = Suspension,

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

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

		template = Headlight,

		attachment trailerfront
		{
			offset = 0.0000 -0.0563 0.9562,
			rotate = 0.0000 0.0000 0.0000,
		}

		attachment trailer
		{
			offset = 0.0000 -0.1437 -1.0437,
			rotate = 0.0000 0.0000 0.0000,
		}
	}
}
