module Base
{
	model 91nissan240sxBase
	{
		mesh = vehicles/Vehicles_91nissan240sx_Body|240sx_body,
		shader = damn_vehicle_shader,
		scale = 0.1,
	}
	model 91nissan240sxRoofMetal
	{
		mesh = vehicles/Vehicles_91nissan240sx_Body|240sx_roof_panel_stock,
		shader = damn_vehicle_shader,
		scale = 0.1,
	}
	model 91nissan240sxInteriorBase
	{
		mesh = vehicles/Vehicles_91nissan240sx_Body|240sx_interior,
		texture = Vehicles/Vehicles_91nissan240sx_Interior,
		shader = damn_wheel_shader,
		scale = 0.1,
	}
	model 91nissan240sxMuffler
	{
		mesh = vehicles/Vehicles_91nissan240sx_Body|240sx_exhaust,
		texture = Vehicles/Vehicles_91nissan240sx_Interior,
		shader = damn_wheel_shader,
		scale = 0.1,
	}
	model 91nissan240sxTISBattery
	{
		mesh = vehicles/Vehicles_91nissan240sx_Body|TIS_CarBattery,
		texture = Vehicles/Vehicles_91nissan240sx_Interior,
		shader = damn_wheel_shader,
		scale = 0.1,
	}
	vehicle 91nissan240sx
	{
		mechanicType = 3,
		offRoadEfficiency = 0.84,
		engineRepairLevel = 4,
		playerDamageProtection = 1.0,
		spawnOffsetY = 0.22000000,

		model
		{
			file = 91nissan240sxBase,
			scale = 0.9000,
			offset = 0.0000 0.4444 -0.0778,
		}

		skin
		{
			texture = Vehicles/Vehicles_91nissan240sx_Shell_aztecRed,
		}

		skin
		{
			texture = Vehicles/Vehicles_91nissan240sx_Shell_charcoalPearl,
		}

		skin
		{
			texture = Vehicles/Vehicles_91nissan240sx_Shell_diamondBlackPearl,
		}

		skin
		{
			texture = Vehicles/Vehicles_91nissan240sx_Shell_emeraldGreenPearl,
		}

		skin
		{
			texture = Vehicles/Vehicles_91nissan240sx_Shell_sapphireBluePearl,
		}

		skin
		{
			texture = Vehicles/Vehicles_91nissan240sx_Shell_slateGrayMetallic,
		}

		skin
		{
			texture = Vehicles/Vehicles_91nissan240sx_Shell_superWhite,
		}

		skin
		{
			texture = Vehicles/Vehicles_91nissan240sx_Shell_ultraRed,
		}

		textureRust = Vehicles/Vehicles_91nissan240sx_Rust,
		textureMask = Vehicles/Vehicles_91nissan240sx_Mask,
		textureLights = Vehicles/Vehicles_91nissan240sx_Lights,
		textureDamage1Shell = Vehicles/Vehicles_91nissan240sx_Damage1,
		textureDamage2Shell = Vehicles/Vehicles_91nissan240sx_Damage2,
		textureDamage1Overlay = Vehicles/Vehicles_91nissan240sx_Blood1,
		textureDamage2Overlay = Vehicles/Vehicles_91nissan240sx_Blood1,
		textureShadow = Vehicles/Vehicles_91nissan240sx_Shadow,

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

		extents = 1.6444 1.1333 4.3111,
		mass = 675,
		physicsChassisShape = 1.6444 1.1556 4.3111,
		centerOfMassOffset = 0.0000 0.6000 -0.0444,
		shadowExtents = 1.8541 4.4038,
		shadowOffset = 0.0000 -0.0143,
		engineForce = 4500,
		maxSpeed = 115f,
		engineLoudness = 80,
		engineQuality = 85,
		brakingForce = 85,
		stoppingMovementForce = 4.0f,
		rollInfluence = 0.97f,
		steeringIncrement = 0.04,
		steeringClamp = 0.3,
		suspensionStiffness = 35,
		suspensionCompression = 4.83,
		suspensionDamping = 3.88,
		maxSuspensionTravelCm = 18,
		suspensionRestLength = 0.20f,
		wheelFriction = 1.8f,
		frontEndHealth = 255,
		rearEndHealth = 160,
		seats = 4,

		wheel FrontLeft
		{
			front = true,
			offset = 0.7111 -0.3667 1.3333,
			radius = 0.30f,
			width = 0.24f,
		}

		wheel FrontRight
		{
			front = true,
			offset = -0.7111 -0.3667 1.3333,
			radius = 0.30f,
			width = 0.24f,
		}

		wheel RearLeft
		{
			front = false,
			offset = 0.7111 -0.3667 -1.1444,
			radius = 0.30f,
			width = 0.24f,
		}

		wheel RearRight
		{
			front = false,
			offset = -0.7111 -0.3667 -1.1444,
			radius = 0.30f,
			width = 0.24f,
		}

		template = PassengerSeat4,

		passenger FrontLeft
		{
			showPassenger = true,
			hasRoof = true,

			position inside
			{
				offset = 0.3556 -0.1889 -0.0444,
				rotate = 0.0000 0.0000 0.0000,
			}

			position outside
			{
				offset = 1.2222 -0.6371 -0.5778,
				rotate = 0.0000 0.0000 0.0000,
				area = SeatFrontLeft,
			}
		}

		passenger FrontRight
		{
			showPassenger = true,
			hasRoof = true,

			position inside
			{
				offset = -0.3556 -0.1889 -0.0444,
				rotate = 0.0000 0.0000 0.0000,
			}

			position outside
			{
				offset = -1.1889 -0.6371 -0.5444,
				rotate = 0.0000 0.0000 0.0000,
				area = SeatFrontRight,
			}
		}

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

			position inside
			{
				offset = 0.3222 -0.2111 -0.8111,
				rotate = 0.0000 0.0000 0.0000,
			}

			position outside
			{
				offset = 1.1889 -0.6593 -0.6000,
				rotate = 0.0000 0.0000 0.0000,
				area = SeatRearLeft,
			}
		}

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

			position inside
			{
				offset = -0.3556 -0.2111 -0.8111,
				rotate = 0.0000 0.0000 0.0000,
			}

			position outside
			{
				offset = -1.2000 -0.6593 -0.5778,
				rotate = 0.0000 0.0000 0.0000,
				area = SeatRearRight,
			}
		}

		area Engine
		{
			xywh = 0.0000 2.5444 1.6000 0.7778,
		}

		area TruckBed
		{
			xywh = 0.0000 -2.5889 1.5556 0.7778,
		}

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

		area SeatFrontLeft
		{
			xywh = 1.2111 0.1000 0.7778 1.2000,
		}

		area SeatFrontRight
		{
			xywh = -1.2111 0.1000 0.7778 1.2000,
		}

		area SeatRearRight
		{
			xywh = -1.2111 -0.8778 0.7778 0.7556,
		}

		area SeatRearLeft
		{
			xywh = 1.2111 -0.8778 0.7778 0.7556,
		}

		area GasTank
		{
			xywh = -1.4111 -1.6889 0.4222 0.4222,
		}

		area TireFrontLeft
		{
			xywh = 1.4111 1.2556 0.4222 0.4222,
		}

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

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

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

		template = N240TrunkCompartment,
		template = N240Seats,
		template = N240Bumpers,
		template = N240Doors,
		template = N240EngineDoor,
		template = N240TrunkDoor,
		template = N240Armor,
		template = N240SpareTires,
		template = N240Roofrack,
		template = N240PopupLights,
		template = N240Spoiler,
		template = N240Sideskirts,
		template = N240TaillightsMod,

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

			model bodyRoofStock
			{
				file = 91nissan240sxRoofMetal,
				scale = 1.0,
				offset = 0.0000 0.0000 0.0000,
				rotate = 0.0000 0.0000 0.0000,
			}

			model interiorNSX240
			{
				file = 91nissan240sxInteriorBase,
				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 batlmns
			{
				file = 91nissan240sxTISBattery,
				scale = 1.0,
				offset = 0.0000 0.0000 0.0000,
				rotate = 0.0000 0.0000 0.0000,
			}
		}

		template = Engine,
		template = Muffler,

		part Muffler
		{
			model mufflmns
			{
				file = 91nissan240sxMuffler,
				scale = 1.0,
				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 = N240Tires,
		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,
		template = N240Windows,
		template = N240Windshields,
        template = DAMNglobal,
		template = DAMN91nissan240sx,

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

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