module Base
{
	model 63beetleBuggyBase
	{
		mesh = vehicles/Vehicles_63beetle_Body|63beetle_body_buggy,
		shader = damn_vehicle_shader,
		scale = 0.1,
	}
	model 63beetleBuggyInterior
	{
		mesh = vehicles/Vehicles_63beetle_Body|63beetle_interior_buggy,
		texture = Vehicles/Vehicles_63beetleBuggy_Interior,
		shader = vehiclewheel,
		scale = 0.1,
	}
	model 63beetleBuggyExhaust
	{
		mesh = vehicles/Vehicles_63beetle_Body|63beetle_exhaust1,
		texture = Vehicles/Vehicles_63beetleBuggy_Interior,
		shader = vehiclewheel,
		scale = 0.1,
	}
	vehicle 63beetleBuggy
	{
		mechanicType = 1,
		offRoadEfficiency = 1.0,
		engineRepairLevel = 4,
		playerDamageProtection = 1.2,

		model
		{
			file = 63beetleBuggyBase,
			scale = 0.9000,
			offset = 0.0000 0.6222 0.0000,
		}

		spawnOffsetY = 0,

		skin
		{
			texture = Vehicles/Vehicles_63beetleBuggy_Shell_red,
		}

		skin
		{
			texture = Vehicles/Vehicles_63beetleBuggy_Shell_blue_white,
		}

		skin
		{
			texture = Vehicles/Vehicles_63beetleBuggy_Shell_orange_black,
		}

		skin
		{
			texture = Vehicles/Vehicles_63beetleBuggy_Shell_dunekini_red,
		}

		textureRust = Vehicles/Vehicles_63beetle_Rust,
		textureMask = Vehicles/Vehicles_63beetle_Mask,
		textureLights = Vehicles/Vehicles_63beetle_Lights,
		textureDamage1Shell = Vehicles/Vehicles_63beetle_Damage1,
		textureDamage2Shell = Vehicles/Vehicles_63beetle_Damage2,
		textureDamage1Overlay = Vehicles/Vehicles_63beetle_Blood,
		textureDamage2Overlay = Vehicles/Vehicles_63beetle_Blood,
		textureShadow = Vehicles/Vehicles_63beetleBuggy_Shadow,

		sound
		{
			engine = VehicleEngineCarNormal,
			engineStart = VehicleEngineCarNormal,
			engineTurnOff = VehicleEngineCarNormal,
			horn = VehicleHornStandard,
			ignitionFail = VehicleIgnitionFailCarNormal,
		}

		extents = 1.6444 1.2222 3.9111,
		mass = 750,
		physicsChassisShape = 1.6444 1.2222 3.9111,
		centerOfMassOffset = 0.0000 0.6333 0.0000,
		shadowExtents = 5.0466 4.3015,
		shadowOffset = 0.0333 0.0434,
		engineForce = 5850,
		maxSpeed = 105f,
		engineLoudness = 89,
		engineQuality = 83,
		brakingForce = 85,
		stoppingMovementForce = 3.5f,
		rollInfluence = 0.99f,
		steeringIncrement = 0.04,
		steeringClamp = 0.3,
		suspensionStiffness = 38,
		suspensionCompression = 3.83,
		suspensionDamping = 2.88,
		maxSuspensionTravelCm = 12,
		suspensionRestLength = 0.3,
		wheelFriction = 1.9f,
		frontEndHealth = 750,
		rearEndHealth = 1250,
		seats = 2,

		wheel FrontLeft
		{
			front = true,
			offset = 0.7222 -0.6444 1.2778,
			radius = 0.35f,
			width = 0.18f,
		}

		wheel FrontRight
		{
			front = true,
			offset = -0.7222 -0.6444 1.2778,
			radius = 0.35f,
			width = 0.18f,
		}

		wheel RearLeft
		{
			front = false,
			offset = 0.7222 -0.6444 -1.0889,
			radius = 0.35f,
			width = 0.18f,
		}

		wheel RearRight
		{
			front = false,
			offset = -0.7222 -0.6444 -1.0889,
			radius = 0.35f,
			width = 0.18f,
		}

		template = PassengerSeat2,

		passenger FrontLeft
		{
			showPassenger = true,
			hasRoof = true,

			position inside
			{
				offset = 0.3111 -0.2444 0.0222,
				rotate = 0.0000 0.0000 0.0000,
			}

			position outside
			{
				offset = 1.1111 -1.0000 -0.3444,
				rotate = 0.0000 0.0000 0.0000,
				area = SeatFrontLeft,
			}
		}

		passenger FrontRight
		{
			showPassenger = true,
			hasRoof = true,

			position inside
			{
				offset = -0.3111 -0.2444 0.0222,
				rotate = 0.0000 0.0000 0.0000,
			}

			position outside
			{
				offset = -1.0889 -1.0000 -0.3778,
				rotate = 0.0000 0.0000 0.0000,
				area = SeatFrontRight,
			}
		}

		area Engine
		{
			xywh = 0.0000 -2.3444 1.0667 0.7778,
		}

		area TruckBed
		{
			xywh = 0.0000 2.3444 1.3333 0.7778,
		}

		area Roofrack
		{
			xywh = 0.0000 -0.1000 3.0889 1.6222,
		}

		area SeatFrontLeft
		{
			xywh = 1.2111 0.2222 0.7778 0.8889,
		}

		area SeatFrontRight
		{
			xywh = -1.2111 0.2222 0.7778 0.8889,
		}

		area SeatRearRight
		{
			xywh = -1.2111 -0.4000 0.7778 0.3556,
		}

		area SeatRearLeft
		{
			xywh = 1.2111 -0.4000 0.7778 0.3556,
		}

		area GasTank
		{
			xywh = 1.1556 1.5667 0.7778 0.7778,
		}

		area TireFrontLeft
		{
			xywh = 1.3222 1.2556 0.4222 0.4222,
		}

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

		area TireRearLeft
		{
			xywh = 1.3222 -1.1000 0.4222 0.4222,
		}

		area TireRearRight
		{
			xywh = -1.3222 -1.1000 0.4222 0.4222,
		}

		template = BTL63TiresOffroad,
		template = BTL63Seats2,
		template = BTL63FrontBumpers,
		template = BTL63TrunkDoors,
		template = BTL63Buggy2EngineDoor,
		template = BTL63TrunkCompartment,
		template = BTL63InnerTrunkCompartment,
		template = BTL63Doors,
		template = BTL63Windows2,
		template = BTL63Windshield,
		template = BTL63SidestepsOFF,
		template = BTL63BuggySpoiler,
		template = BTL63Armor,
		template = BTL63SpareTireOffroad,
		template = BTL63Roofrack,

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

			model BTL63int5000
			{
				file = 63beetleBuggyInterior,
			}

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

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

		template = GasTank,

		part GasTank
		{
			model BTL63gas
			{
				file = 63beetleGastank,
			}

			table install
			{
				door = TrunkDoor,
				recipes = Intermediate Mechanics,
			}

			table uninstall
			{
				recipes = Intermediate Mechanics,
			}
		}

		template = Battery,

		part Battery
		{
			model BTL63tisbat
			{
				file = 63beetleTISBattery,
			}
		}

		template = Engine,
		template = Muffler,

		part Muffler
		{
			model theMufff
			{
				file = 63beetleBuggyExhaust,
			}

			area = Engine,

			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 = 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 MrRadio
			{
				file = 63beetleRadio,
			}
		}
		template = Headlight,

		part HeadlightLeft
		{
			area = TruckBed,
		}

		part HeadlightRight
		{
			area = TruckBed,
		}

		part HeadlightRearLeft
		{
			area = Engine,
		}

		part HeadlightRearRight
		{
			area = Engine,
		}

		attachment trailer
		{
			offset = 0.0000 -0.5111 -2.1000,
			rotate = 0.0000 0.0000 0.0000,
			zoffset = -1.0000,
		}

		attachment trailerfront
		{
			offset = 0.0000 -0.5111 2.0778,
			rotate = 0.0000 0.0000 0.0000,
			zoffset = 1.0000,
		}
	}
}
