module Base
{
	model DunebuggyBase
	{
		mesh = vehicles/Vehicles_Dunebuggy,
		shader = vehicle,
		invertX = FALSE,
		scale = 1,
	}
	model Dunebuggyfrontwheelleft
	{
		mesh = vehicles/Vehicles_DunebuggyWheel,
		texture = vehicles/Vehicles_DunebuggyWheel,
	}
	model Dunebuggyfrontwheelright
	{
		mesh = vehicles/Vehicles_DunebuggyWheel1,
		texture = vehicles/Vehicles_DunebuggyWheel,
	}
	model Dunebuggybackwheelleft
	{
		mesh = vehicles/Vehicles_DunebuggyWheel,
		texture = vehicles/Vehicles_DunebuggyWheel,
	}
	model Dunebuggybackwheelright
	{
		mesh = vehicles/Vehicles_DunebuggyWheel1,
		texture = vehicles/Vehicles_DunebuggyWheel,
	}
	vehicle Dunebuggy
	{
		mechanicType = 1,
		offRoadEfficiency = 4,
		engineRepairLevel = 3,
		playerDamageProtection = 0.5,
		engineRPMType = firebird,

		model
		{
			file = DunebuggyBase,
			scale = 2.3700,
			offset = 0.0000 -0.0886 -0.0549,
		}

		skin
		{
			texture = Vehicles/Vehicles_DunebuggyBlack,
		}

		skin
		{
			texture = Vehicles/Vehicles_DunebuggyBlue,
		}

		skin
		{
			texture = Vehicles/Vehicles_DunebuggyGrey,
		}

		skin
		{
			texture = Vehicles/Vehicles_DunebuggyRed,
		}

		skin
		{
			texture = Vehicles/Vehicles_DunebuggyWhite,
		}

		skin
		{
			texture = Vehicles/Vehicles_DunebuggyYellow,
		}

		textureRust = Vehicles/Vehicles_Dunebuggy_Rust,
		textureMask = Vehicles/Vehicles_Dunebuggy_Mask,
		textureLights = Vehicles/Vehicles_DunebuggyYellow,
		textureDamage1Overlay = Vehicles/Vehicles_Dunebuggy_Damage,
		textureDamage1Shell = Vehicles/null,
		textureDamage2Overlay = Vehicles/Vehicles_Dunebuggy_Damage,
		textureDamage2Shell = Vehicles/null,

		sound
		{
			horn = vehicle_horn1,
		}

		extents = 0.5823 0.3038 1.1814,
		mass = 350,
		physicsChassisShape = 0.6498 0.2869 1.1646,
		centerOfMassOffset = 0.0000 0.0253 0.0084,
		engineForce = 2100,
		engineQuality = 40,
		engineLoudness = 85,
		maxSpeed = 60f,
		gearRatioCount = 5,
		gearRatioR = 7.09,
		gearRatio1 = 7.44,
		gearRatio2 = 4.10,
		gearRatio3 = 2.29,
		gearRatio4 = 1.47,
		gearRatio5 = 0.73,
		brakingForce = 60,
		rollInfluence = 0.2f,
		steeringIncrement = 0.05,
		steeringClamp = 0.3,
		suspensionStiffness = 30,
		suspensionCompression = 1.83,
		suspensionDamping = 2.88,
		maxSuspensionTravelCm = 15,
		suspensionRestLength = 0.2,
		wheelFriction = 1.8f,
		frontEndHealth = 150,
		rearEndHealth = 150,
		seats = 1,

		wheel FrontLeft
		{
			front = true,
			offset = 0.2574 -0.0844 0.4979,
			radius = 0.15f,
			width = 0.2f,
		}

		wheel FrontRight
		{
			front = true,
			offset = -0.2574 -0.0844 0.4979,
			radius = 0.15f,
			width = 0.2f,
		}

		wheel RearLeft
		{
			front = false,
			offset = 0.2827 -0.0928 -0.3882,
			radius = 0.15f,
			width = 0.2f,
		}

		wheel RearRight
		{
			front = false,
			offset = -0.2827 -0.0928 -0.3882,
			radius = 0.15f,
			width = 0.2f,
		}

		template = PassengerSeat4,

		passenger FrontLeft
		{
			position inside
			{
				offset = 0.0000 0.1603 -0.0338,
				rotate = 0.0000 0.0000 0.0000,
			}

			position outside
			{
				offset = 0.6329 -0.4979 0.4557,
				rotate = 0.0000 0.0000 0.0000,
				area = SeatFrontLeft,
			}
		}

		area Engine
		{
			xywh = 0.0000 -0.7131 0.4641 0.2447,
		}

		area TruckBed
		{
			xywh = 0.4346 -0.4093 0.2194 0.3629,
		}

		area SeatFrontLeft
		{
			xywh = 0.3797 -0.0084 0.3544 0.4219,
		}

		area GasTank
		{
			xywh = -0.3882 -0.2658 0.1772 0.2447,
		}

		area TireFrontLeft
		{
			xywh = 0.4051 0.4430 0.1857 0.2447,
		}

		area TireFrontRight
		{
			xywh = -0.4051 0.4388 0.1857 0.2447,
		}

		area TireRearLeft
		{
			xywh = 0.4304 -0.4430 0.2278 0.2785,
		}

		area TireRearRight
		{
			xywh = -0.4304 -0.4430 0.2278 0.2785,
		}

		template = Trunk/part/TruckBed,
		template = TrunkDoor,
		template = Seat/part/SeatFrontLeft,

		part Seat*
		{
			table install
			{
				skills = Mechanics:1,
				recipes = Intermediate Mechanics,
			}

			table uninstall
			{
				skills = Mechanics:1,
				recipes = Intermediate Mechanics,
			}
		}

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

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

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

		template = GasTank,

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

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

		template = Battery,
		template = Engine,
		template = Muffler,

		part Muffler
		{
			table install
			{
				recipes = Intermediate Mechanics,
			}

			table uninstall
			{
				recipes = Intermediate Mechanics,
			}
		}

		template = EngineDoor,

		part EngineDoor
		{
			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 = Door/part/DoorFrontLeft,
		template = Door/part/DoorFrontRight,

		part Door*
		{
			table install
			{
				recipes = Intermediate Mechanics,
			}

			table uninstall
			{
				recipes = Intermediate Mechanics,
			}
		}

		template = Tire,

		part TireFrontLeft
		{
			model InflatedTirePlusWheel
			{
				file = Dunebuggyfrontwheelleft,
			}
		}

		part TireFrontRight
		{
			model InflatedTirePlusWheel
			{
				file = Dunebuggyfrontwheelright,
			}
		}

		part TireRearLeft
		{
			model InflatedTirePlusWheel
			{
				file = Dunebuggybackwheelleft,
			}
		}

		part TireRearRight
		{
			model InflatedTirePlusWheel
			{
				file = Dunebuggybackwheelright,
			}
		}

		template = Brake,

		part Brake*
		{
			table install
			{
				skills = Mechanics:4,
				recipes = Intermediate Mechanics,
			}

			table uninstall
			{
				skills = Mechanics:4,
				recipes = Intermediate Mechanics,
			}
		}

		template = Suspension,

		part Suspension*
		{
			table install
			{
				skills = Mechanics:4,
				recipes = Intermediate Mechanics,
			}

			table uninstall
			{
				skills = Mechanics:4,
				recipes = Intermediate Mechanics,
			}
		}

		template = Radio,
		template = Headlight,
	}
}
