module Base
{
	model 90bmwE30m3Base
	{
		mesh = vehicles/Vehicles_90bmwE30_Body|e30_m3_body,
		shader = damn_vehicle_shader,
		scale = 0.1,
	}
	model 90bmwE30m3Interior
	{
		mesh = vehicles/Vehicles_90bmwE30_Body|e30_m3_interior,
		texture = Vehicles/Vehicles_90bmwE30_Interior,
		shader = vehiclewheel,
		scale = 0.1,
	}
	model 90bmwE30MufflerM
	{
		mesh = vehicles/Vehicles_90bmwE30_Body|e30_exhaustM,
		texture = Vehicles/Vehicles_90bmwE30_Interior,
		shader = vehiclewheel,
		scale = 0.1,
	}
	model 90bmwE30RadioM
	{
		mesh = vehicles/Vehicles_90bmwE30_Body|e30_radioM,
		texture = Vehicles/Vehicles_90bmwE30_Interior,
		shader = vehiclewheel,
		scale = 0.1,
	}
	vehicle 90bmwE30m3
	{
		mechanicType = 3,
		offRoadEfficiency = 0.85,
		engineRepairLevel = 4,
		playerDamageProtection = 1.1,

		model
		{
			file = 90bmwE30m3Base,
			scale = 0.9000,
			offset = 0.0000 0.4000 -0.0444,
		}

		skin
		{
			texture = Vehicles/Vehicles_90bmwE30m3_Shell_Alpinweiss,
		}

		skin
		{
			texture = Vehicles/Vehicles_90bmwE30m3_Shell_Brilliantrot,
		}

		skin
		{
			texture = Vehicles/Vehicles_90bmwE30m3_Shell_Dakargelb,
		}

		skin
		{
			texture = Vehicles/Vehicles_90bmwE30m3_Shell_Schwarz,
		}

		skin
		{
			texture = Vehicles/Vehicles_90bmwE30m3_Shell_Vulkangrau,
		}

		skin
		{
			texture = Vehicles/Vehicles_90bmwE30m3_Shell_Warsteiner,
		}

		skin
		{
			texture = Vehicles/Vehicles_90bmwE30m3_Shell_WarsteinerRot,
		}

        skin
		{
			texture = Vehicles/Vehicles_90bmwE30m3_Shell_PortimaoBlau,
		}

		textureRust = Vehicles/Vehicles_90bmwE30_Rust,
		textureMask = Vehicles/Vehicles_90bmwE30m3_Mask,
		textureLights = Vehicles/Vehicles_90bmwE30m3_Lights,
		textureDamage1Shell = Vehicles/Vehicles_90bmwE30_Damage1,
		textureDamage2Shell = Vehicles/Vehicles_90bmwE30_Damage2,
		textureDamage1Overlay = Vehicles/Vehicles_90bmwE30_Blood1,
		textureDamage2Overlay = Vehicles/Vehicles_90bmwE30_Blood1,
		textureShadow = Vehicles/Vehicles_90bmwE30_Shadow,

		sound
		{
			engine = VehicleEngineSportsCar,
			engineStart = VehicleEngineSportsCar,
			engineTurnOff = VehicleEngineSportsCar,
			horn = VehicleHornSportsCar,
			ignitionFail = VehicleIgnitionFailSportsCar,
		}

		extents = 1.6222 1.1778 4.2889,
		mass = 700,
		physicsChassisShape = 1.6222 1.1778 4.2889,
		centerOfMassOffset = 0.0000 0.5889 0.0000,
		shadowExtents = 5.1763 4.5593,
		shadowOffset = 0.0000 -0.0143,
		engineForce = 5255,
		maxSpeed = 110f,
		engineLoudness = 87,
		engineQuality = 90,
		brakingForce = 85,
		stoppingMovementForce = 3.0f,
		rollInfluence = 0.85f,
		steeringIncrement = 0.04,
		steeringClamp = 0.3,
		suspensionStiffness = 51,
		suspensionCompression = 4.05,
		suspensionDamping = 3.35,
		maxSuspensionTravelCm = 15,
		suspensionRestLength = 0.20f,
		wheelFriction = 2.1f,
		frontEndHealth = 195,
		rearEndHealth = 155,
		seats = 4,

		wheel FrontLeft
		{
			front = true,
			offset = 0.7000 -0.3667 1.4556,
			radius = 0.28f,
			width = 0.22f,
		}

		wheel FrontRight
		{
			front = true,
			offset = -0.7000 -0.3667 1.4556,
			radius = 0.28f,
			width = 0.22f,
		}

		wheel RearLeft
		{
			front = false,
			offset = 0.7000 -0.3667 -1.1111,
			radius = 0.28f,
			width = 0.22f,
		}

		wheel RearRight
		{
			front = false,
			offset = -0.7000 -0.3667 -1.1111,
			radius = 0.28f,
			width = 0.22f,
		}

		template = PassengerSeat4,

		passenger FrontLeft
		{
			showPassenger = true,
			hasRoof = true,

			position inside
			{
				offset = 0.3667 -0.1333 0.1667,
				rotate = 0.0000 0.0000 0.0000,
			}

			position outside
			{
				offset = 1.1333 -0.7000 -0.2667,
				rotate = 0.0000 0.0000 0.0000,
				area = SeatFrontLeft,
			}
		}

		passenger FrontRight
		{
			showPassenger = true,
			hasRoof = true,

			position inside
			{
				offset = -0.3667 -0.1333 0.1667,
				rotate = 0.0000 0.0000 0.0000,
			}

			position outside
			{
				offset = -1.1444 -0.7000 -0.2556,
				rotate = 0.0000 0.0000 0.0000,
				area = SeatFrontRight,
			}
		}

		passenger RearLeft
		{
			showPassenger = true,
			hasRoof = true,
			door = DoorFrontLeft,

			position inside
			{
				offset = 0.3667 -0.1333 -0.6222,
				rotate = 0.0000 0.0000 0.0000,
			}

			position outside
			{
				offset = 1.1333 -0.6889 -1.1667,
				rotate = 0.0000 0.0000 0.0000,
				area = SeatRearLeft,
			}
		}

		passenger RearRight
		{
			showPassenger = true,
			hasRoof = true,
			door = DoorFrontRight,

			position inside
			{
				offset = -0.3667 -0.1333 -0.6222,
				rotate = 0.0000 0.0000 0.0000,
			}

			position outside
			{
				offset = -1.1111 -0.6889 -1.1444,
				rotate = 0.0000 0.0000 0.0000,
				area = SeatRearRight,
			}
		}

		area Engine
		{
			xywh = 1.2000 1.4111 0.7778 1.1111,
		}

		area TruckBed
		{
			xywh = 0.0000 -2.5333 1.4222 0.7778,
		}

		area Roofrack
		{
			xywh = 0.0000 -0.1222 3.1333 1.9556,
		}

		area SeatFrontLeft
		{
			xywh = 1.2000 0.2556 0.7778 1.1556,
		}

		area SeatFrontRight
		{
			xywh = -1.2000 0.2556 0.7778 1.1556,
		}

		area SeatRearRight
		{
			xywh = -1.2000 -0.7000 0.7778 0.7556,
		}

		area SeatRearLeft
		{
			xywh = 1.2000 -0.7000 0.7778 0.7556,
		}

		area GasTank
		{
			xywh = -1.3222 -1.7111 0.4222 0.4222,
		}

		area TireFrontLeft
		{
			xywh = 1.4111 1.4222 0.4222 0.4222,
		}

		area TireFrontRight
		{
			xywh = -1.4111 1.4222 0.4222 0.4222,
		}

		area TireRearLeft
		{
			xywh = 1.4111 -1.1556 0.4222 0.4222,
		}

		area TireRearRight
		{
			xywh = -1.4111 -1.1556 0.4222 0.4222,
		}

		template = BMWE30TrunkCompartmentSedan,
		template = BMWE30Windows2door,
		template = BMWE30WindshieldsM3,
		template = BMWE30Seats,
		template = BMWE30BumpersM,
		template = BMWE30Doors2,
		template = BMWE30EngineDoor,
		template = BMWE30TrunkDoorM3,
		template = BMWE30ArmorM3,
		template = BMWE30SpareTires,
		template = BMWE30Roofrack,
		template = BMWE30SpoilerM3,

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

			model interiorE30m3
			{
				file = 90bmwE30m3Interior,
				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 battau
			{
				file = 90bmwE30TISBattery,
				scale = 1.0,
			}
		}

		template = Engine,
		template = Muffler,

		part Muffler
		{
			model muffE30
			{
				file = 90bmwE30MufflerM,
			}

			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 = BMWE30Tires,
		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,

		part Radio
		{
			model radioE30
			{
				file = 90bmwE30RadioM,
				scale = 1.0,
			}
		}

		template = Headlight,

		attachment trailer
		{
			offset = 0.0000 -0.2111 -2.2778,
			rotate = 0.0000 0.0000 0.0000,
			zoffset = -1.0000,
		}

		attachment trailerfront
		{
			offset = 0.0000 -0.2111 2.3556,
			rotate = 0.0000 0.0000 0.0000,
			zoffset = 1.0000,
		}
	}
}
