module Base
{
	model 87toyotaMR2InteriorRoof1
	{
		mesh = vehicles/Vehicles_87toyotaMR2_Body|mr2_interior_removable,
		texture = Vehicles/Vehicles_87toyotaMR2_Interior,
		shader = damn_wheel_shader,
		scale = 0.1,
	}
	vehicle 87toyotaMR2c
	{
		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 = 470,
		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 = 89f,
		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.5630 -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.5630 -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 = 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,
				offset = 0.0000 0.0000 0.0000,
				rotate = 0.0000 0.0000 0.0000,
			}

			model introofc
			{
				file = 87toyotaMR2InteriorRoof1,
				scale = 1.0,
				offset = 0.0000 0.0000 0.0000,
				rotate = 0.0000 0.0000 0.0000,
			}

			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,
				offset = 0.0000 0.0000 0.0000,
				rotate = 0.0000 0.0000 0.0000,
			}
		}

		template = Engine,
		template = Muffler,

		part Muffler
		{
			model muffssp
			{
				file = 87toyotaMR2Muffler,
				offset = 0.0000 0.0000 0.0000,
				rotate = 0.0000 0.0000 0.0000,
			}

			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,
			}
		}

		template = MR2WindowsWithRemovableRoof,
		template = MR2Windshields,

        useChassisPhysicsCollision = false,

		physics box
		{
			offset = 0.0000 0.4000 0.0666,
			extents = 1.5778 0.6667 3.8000,
			rotate = 0.0000 0.0000 0.0000,
		}

		physics box
		{
			offset = 0.0000 0.9222 -0.2051,
			extents = 1.2667 0.3778 0.7778,
			rotate = 0.0000 0.0000 0.0000,
		}

		physics box
		{
			offset = 0.0000 0.7556 -0.7733,
			extents = 1.2667 0.4000 0.6889,
			rotate = -33.0000 0.0000 0.0000,
		}

		physics box
		{
			offset = 0.0000 0.7300 0.5000,
			extents = 1.2667 0.3778 0.9111,
			rotate = 28.0000 0.0000 0.0000,
		}

		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,
		}
	}
}
