module Base
{
	model 90bmwE30cabrioBase
	{
		mesh = vehicles/Vehicles_90bmwE30_Body|e30_cabrio_body,
		shader = damn_vehicle_shader,
		scale = 0.1,
	}
	model 90bmwE30cabrioInterior
	{
		mesh = vehicles/Vehicles_90bmwE30_Body|e30_cabrio_interior,
		texture = Vehicles/Vehicles_90bmwE30_Interior,
		shader = damn_wheel_shader,
		scale = 0.1,
	}
	vehicle 90bmwE30cabrio
	{
		mechanicType = 3,
		offRoadEfficiency = 0.85,
		engineRepairLevel = 4,
		playerDamageProtection = 1.1,

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

		skin
		{
			texture = Vehicles/Vehicles_90bmwE30cabrio_Shell_Alpinweiss,
		}

		skin
		{
			texture = Vehicles/Vehicles_90bmwE30cabrio_Shell_Atlantisblau,
		}
		skin
		{
			texture = Vehicles/Vehicles_90bmwE30cabrio_Shell_Basaltblau,
		}
		skin
		{
			texture = Vehicles/Vehicles_90bmwE30cabrio_Shell_Brilliantrot,
		}
		skin
		{
			texture = Vehicles/Vehicles_90bmwE30cabrio_Shell_Bronzitbeig,
		}
		skin
		{
			texture = Vehicles/Vehicles_90bmwE30cabrio_Shell_Schwarz,
		}
		skin
		{
			texture = Vehicles/Vehicles_90bmwE30cabrio_Shell_Vulkangrau,
		}
		skin
		{
			texture = Vehicles/Vehicles_90bmwE30cabrio_Shell_Weinrot,
		}

		textureRust = Vehicles/Vehicles_90bmwE30_Rust,
		textureMask = Vehicles/Vehicles_90bmwE30cabrio_Mask,
		textureLights = Vehicles/Vehicles_90bmwE30_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 = VehicleEngineDefault,
			engineStart = VehicleEngineDefault,
			engineTurnOff = VehicleEngineDefault,
			horn = VehicleHornStandard,
			ignitionFail = VehicleIgnitionFailDefault,
		}

		extents = 1.6222 1.1778 4.2889,
		mass = 720,
		physicsChassisShape = 1.6222 1.1778 4.2889,
		centerOfMassOffset = 0.0000 0.5889 0.0000,
		shadowExtents = 1.9874 4.3926,
		shadowOffset = 0.0000 -0.0143,
		engineForce = 4165,
		maxSpeed = 80f,
		engineLoudness = 80,
		engineQuality = 82,
		brakingForce = 85,
		stoppingMovementForce = 4.0f,
		rollInfluence = 0.98f,
		steeringIncrement = 0.04,
		steeringClamp = 0.3,
		suspensionStiffness = 40,
		suspensionCompression = 3.83,
		suspensionDamping = 2.88,
		maxSuspensionTravelCm = 10,
		suspensionRestLength = 0.20f,
		wheelFriction = 1.7f,
		frontEndHealth = 205,
		rearEndHealth = 160,
		seats = 4,

		wheel FrontLeft
		{
			front = true,
			offset = 0.6778 -0.4000 1.4556,
			radius = 0.30f,
			width = 0.22f,
		}

		wheel FrontRight
		{
			front = true,
			offset = -0.6778 -0.4000 1.4556,
			radius = 0.30f,
			width = 0.22f,
		}

		wheel RearLeft
		{
			front = false,
			offset = 0.6778 -0.4000 -1.1111,
			radius = 0.30f,
			width = 0.22f,
		}

		wheel RearRight
		{
			front = false,
			offset = -0.6778 -0.4000 -1.1111,
			radius = 0.30f,
			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 RoofLid
		{
			xywh = 1.2000 -0.9000 0.7778 0.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 = BMWE30WindowsCabrio,
		template = BMWE30Windshield,
		template = BMWE30CabrioSeats,
		template = BMWE30BumpersStock,
		template = BMWE30Doors2C,
		template = BMWE30EngineDoor,
		template = BMWE30TrunkDoorSedan,
		template = BMWE30ArmorCabrio,
		template = BMWE30SpareTires,
		template = BMWE30RoofAssembly,
		template = BMWE30Spoilers,

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

			model interiorE30c
			{
				file = 90bmwE30cabrioInterior,
				scale = 1.0,
			}

			model commonE30
			{
				file = 90bmwE30interiorCommon,
				scale = 1.0,
			}

			model trunkE30s
			{
				file = 90bmwE30sedanTrunk,
				scale = 1.0,
			}

			model floorE30s2
			{
				file = 90bmwE30sedan2Floor,
				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 = 90bmwE30Muffler,
			}

			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 = 90bmwE30Radio,
				scale = 1.0,
			}
		}

		template = Headlight,
        template = DAMNglobal,
		template = DAMN90bmwE30cabrio,
        useChassisPhysicsCollision = false,

		physics box
		{
			offset = 0.0000 0.3333 0.0000,
			extents = 1.6000 0.6000 4.3111,
			rotate = 0.0000 0.0000 0.0000,
		}

		physics box
		{
			offset = 0.0000 0.8778 -0.3148,
			extents = 1.3333 0.5333 1.4222,
			rotate = 0.0000 0.0000 0.0000,
		}

		physics box
		{
			offset = 0.0000 0.7630 -1.1667,
			extents = 1.3333 0.7333 0.3333,
			rotate = 44.0000 0.0000 0.0000,
		}

		physics box
		{
			offset = 0.0000 0.7189 0.5883,
			extents = 1.3333 0.8222 0.4444,
			rotate = -52.0000 0.0000 0.0000,
		}

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