module Base
{
	model 87toyotaMR2Base
	{
		mesh = vehicles/Vehicles_87toyotaMR2_Body|mr2_body,
		shader = damn_vehicle_shader,
		scale = 0.1,
	}
	model 87toyotaMR2Roof0
	{
		mesh = vehicles/Vehicles_87toyotaMR2_Body|mr2_body_roof0,
		shader = damn_vehicle_shader,
		scale = 0.1,
	}
	model 87toyotaMR2Interior
	{
		mesh = vehicles/Vehicles_87toyotaMR2_Body|mr2_interior,
		texture = Vehicles/Vehicles_87toyotaMR2_Interior,
		shader = vehiclewheel,
		scale = 0.1,
	}
	model 87toyotaMR2InteriorRoof0
	{
		mesh = vehicles/Vehicles_87toyotaMR2_Body|mr2_interior_sunroof,
		texture = Vehicles/Vehicles_87toyotaMR2_Interior,
		shader = vehiclewheel,
		scale = 0.1,
	}
	model 87toyotaMR2Muffler
	{
		mesh = vehicles/Vehicles_87toyotaMR2_Body|mr2_exhaust,
		texture = Vehicles/Vehicles_87toyotaMR2_Interior,
		shader = vehiclewheel,
		scale = 0.1,
	}
	model 87toyotaMR2TISBattery
	{
		mesh = vehicles/Vehicles_87toyotaMR2_Body|TIS_CarBattery,
		texture = Vehicles/Vehicles_87toyotaMR2_Interior,
		shader = vehiclewheel,
		scale = 0.1,
	}
	vehicle 87toyotaMR2
	{
		mechanicType = 3,
		offRoadEfficiency = 0.8,
		engineRepairLevel = 4,
		playerDamageProtection = 1.1,

		model
		{
			file = 87toyotaMR2Base,
			scale = 0.9000,
			offset = 0.0000 0.3778 0.0000,
		}

		skin
		{
			texture = Vehicles/Vehicles_87toyotaMR2_Shell_beige,
		}

		skin
		{
			texture = Vehicles/Vehicles_87toyotaMR2_Shell_beigeGreen,
		}

		skin
		{
			texture = Vehicles/Vehicles_87toyotaMR2_Shell_black,
		}

		skin
		{
			texture = Vehicles/Vehicles_87toyotaMR2_Shell_blackRed,
		}

		skin
		{
			texture = Vehicles/Vehicles_87toyotaMR2_Shell_darkJade,
		}

		skin
		{
			texture = Vehicles/Vehicles_87toyotaMR2_Shell_darkPearlBlue,
		}

		skin
		{
			texture = Vehicles/Vehicles_87toyotaMR2_Shell_grayWhite,
		}

		skin
		{
			texture = Vehicles/Vehicles_87toyotaMR2_Shell_superRed,
		}

		skin
		{
			texture = Vehicles/Vehicles_87toyotaMR2_Shell_superWhite,
		}

		skin
		{
			texture = Vehicles/Vehicles_87toyotaMR2_Shell_yellow,
		}

		textureRust = Vehicles/Vehicles_87toyotaMR2_Rust,
		textureMask = Vehicles/Vehicles_87toyotaMR2_Mask,
		textureLights = Vehicles/Vehicles_87toyotaMR2_Lights,
		textureDamage1Shell = Vehicles/Vehicles_87toyotaMR2_Damage1,
		textureDamage2Shell = Vehicles/Vehicles_87toyotaMR2_Damage2,
		textureDamage1Overlay = Vehicles/Vehicles_87toyotaMR2_Blood1,
		textureDamage2Overlay = Vehicles/Vehicles_87toyotaMR2_Blood1,

		sound
		{
			engine = VehicleEngineDefault,
			engineStart = VehicleEngineDefault,
			engineTurnOff = VehicleEngineDefault,
			horn = VehicleHornStandard,
			ignitionFail = VehicleIgnitionFailDefault,
		}

		extents = 1.6444 1.0667 3.8444,
		mass = 460,
		physicsChassisShape = 1.6444 1.0667 3.8444,
		centerOfMassOffset = 0.0000 0.6000 0.0667,
		shadowExtents = 1.6431 4.1482,
		shadowOffset = 0.0000 0.0635,
		engineForce = 4500,
		maxSpeed = 90f,
		engineLoudness = 80,
		engineQuality = 82,
		brakingForce = 90,
		stoppingMovementForce = 4.0f,
		rollInfluence = 0.98f,
		steeringIncrement = 0.04,
		steeringClamp = 0.3,
		suspensionStiffness = 45,
		suspensionCompression = 3.83,
		suspensionDamping = 2.88,
		maxSuspensionTravelCm = 10,
		suspensionRestLength = 0.20f,
		wheelFriction = 1.7f,
		frontEndHealth = 205,
		rearEndHealth = 160,
		seats = 2,

		wheel FrontLeft
		{
			front = true,
			offset = 0.7000 -0.2778 1.2000,
			radius = 0.28f,
			width = 0.20f,
		}

		wheel FrontRight
		{
			front = true,
			offset = -0.7000 -0.2778 1.2000,
			radius = 0.28f,
			width = 0.20f,
		}

		wheel RearLeft
		{
			front = false,
			offset = 0.7000 -0.2778 -1.1000,
			radius = 0.28f,
			width = 0.20f,
		}

		wheel RearRight
		{
			front = false,
			offset = -0.7000 -0.2778 -1.1000,
			radius = 0.28f,
			width = 0.20f,
		}

		template = PassengerSeat2,

		passenger FrontLeft
		{
			showPassenger = true,
			hasRoof = true,

			position inside
			{
				offset = 0.3556 -0.1000 -0.1111,
				rotate = 0.0000 0.0000 0.0000,
			}

			position outside
			{
				offset = 1.1111 -0.6222 -0.5444,
				rotate = 0.0000 0.0000 0.0000,
				area = SeatFrontLeft,
			}
		}

		passenger FrontRight
		{
			showPassenger = true,
			hasRoof = true,

			position inside
			{
				offset = -0.3556 -0.1000 -0.1111,
				rotate = 0.0000 0.0000 0.0000,
			}

			position outside
			{
				offset = -1.1222 -0.6222 -0.5333,
				rotate = 0.0000 0.0000 0.0000,
				area = SeatFrontRight,
			}
		}

		area Engine
		{
			xywh = 1.2111 -1.1222 0.7778 1.1778,
		}

		area Front
		{
			xywh = 0.0000 2.3556 1.3111 0.7778,
		}

		area Roofrack
		{
			xywh = 0.0000 -0.1889 2.8667 1.2667,
		}

		area TruckBed
		{
			xywh = 0.0000 -2.2667 1.3111 0.7778,
		}

		area SeatFrontLeft
		{
			xywh = 1.2111 0.1556 0.7778 1.1778,
		}

		area SeatFrontRight
		{
			xywh = -1.2111 0.1556 0.7778 1.1778,
		}

		area GasTank
		{
			xywh = 1.3000 -0.7222 0.4222 0.4222,
		}

		area TireFrontLeft
		{
			xywh = 1.3000 1.1889 0.4222 0.4222,
		}

		area TireFrontRight
		{
			xywh = -1.3000 1.1889 0.4222 0.4222,
		}

		area TireRearLeft
		{
			xywh = 1.3000 -1.1000 0.4222 0.4222,
		}

		area TireRearRight
		{
			xywh = -1.3000 -1.1000 0.4222 0.4222,
		}

		template = MR2Trunk,
		template = MR2FrontTrunk,
		template = MR2WindowsWithSunroof,
		template = MR2Windshields,
		template = MR2Seats,
		template = MR2Bumpers,
		template = MR2Doors,
		template = MR2EngineDoor,
		template = MR2TrunkDoors,
		template = MR2Armor,
		template = MR2SpareTires,
		template = MR2Spoilers,
		template = MR2Sideskirts,
		template = MR2PopupLights,
		template = MR2Roofrack,
		template = MR2CenterConsole,
		template = MR2Mudflaps,

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

			model intbase
			{
				file = 87toyotaMR2Interior,
				scale = 1.0,
			}

			model introof
			{
				file = 87toyotaMR2InteriorRoof0,
				scale = 1.0,
			}

			model bodybase
			{
				file = 87toyotaMR2Roof0,
				scale = 1.0,
			}

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

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

		template = GasTank,

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

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

		template = Battery,

		part Battery
		{
			model batlin
			{
				file = 87toyotaMR2TISBattery,
				scale = 1.0,
			}
		}

		template = Engine,
		template = Muffler,

		part Muffler
		{
			model muffssp
			{
				file = 87toyotaMR2Muffler,
			}

			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 = MR2Tires,
		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 = Radio,
		template = Headlight,

		part HeadlightLeft
		{
			area = Front,

			table install
			{
				requireInstalled = MR2PopupLights,
			}
		}

		part HeadlightRight
		{
			area = Front,

			table install
			{
				requireInstalled = MR2PopupLights,
			}
		}

		attachment trailer
		{
			offset = 0.0000 -0.0667 -1.9222,
			rotate = 0.0000 0.0000 0.0000,
			zoffset = -1.0000,
		}

		attachment trailerfront
		{
			offset = 0.0000 -0.0667 2.2222,
			rotate = 0.0000 0.0000 0.0000,
			zoffset = 1.0000,
		}
	}
}
