module Base
{
	model TrailerSecondBase
    {
        mesh = vehicles/Vehicles_btrailer,
        shader = vehicle_multiuv,
        invertX = FALSE,
        scale = 0.003937,
    }
	vehicle TrailerSecond
	{
		mechanicType = 1,
		engineRepairLevel = 5,
		playerDamageProtection = 1.3,
		offRoadEfficiency = 2,

		model
		{
			file = TrailerSecondBase,
			scale = 1.9000,
			offset = 0.0000 0.4263 -0.7526,
		}

		spawnOffsetY = 0.3565027,

		skin
		{
			texture = Vehicles/AragonTexture/vehicle_trailer1_big,
		}

		skin
		{
			texture = Vehicles/AragonTexture/vehicle_trailer2_big,
		}

		skin
		{
			texture = Vehicles/AragonTexture/vehicle_trailer3_big,
		}

		skin
		{
			texture = Vehicles/AragonTexture/vehicle_trailer4_big,
		}

		skin
		{
			texture = Vehicles/AragonTexture/vehicle_trailer5_big,
		}

		skin
		{
			texture = Vehicles/AragonTexture/vehicle_trailer6_big,
		}

		skin
		{
			texture = Vehicles/AragonTexture/vehicle_trailer7_big,
		}

		skin
		{
			texture = Vehicles/AragonTexture/vehicle_trailer8_big,
		}

		skin
		{
			texture = Vehicles/AragonTexture/vehicle_trailer9_big,
		}

		textureShadow = Shadows/vehicle_trailer_shadow,
		shadowExtents = 1.2316 2.2000,
		shadowOffset = 0.0105 0.3263,
		textureRust = Vehicles/AragonTexture/vehicle_trailer_rust,
		textureMask = Vehicles/vehicle_trailer_mask,
		textureLights = Vehicles/vehicle_trailer_light,
		textureDamage1Shell = Vehicles/vehicle_trailer_damage1,
		textureDamage2Shell = Vehicles/vehicle_trailer_damage2,
		textureDamage1Overlay = Vehicles/vehicle_trailer_damage1,
		textureDamage2Overlay = Vehicles/vehicle_trailer_damage2,
		extents = 0.9684 0.6842 1.5263,
		mass = 400,
		physicsChassisShape = 0.9684 0.6842 1.5263,
		centerOfMassOffset = 0.0105 0.4947 0.0000,
		engineForce = 4000,
		engineQuality = 80,
		engineLoudness = 110,
		maxSpeed = 70f,
		brakingForce = 1,
		stoppingMovementForce = 10.0f,
		rollInfluence = 1.0f,
		steeringIncrement = 0.03,
		steeringClamp = 0.3,
		suspensionStiffness = 40,
		suspensionCompression = 3.83,
		suspensionDamping = 2.88,
		maxSuspensionTravelCm = 10,
		suspensionRestLength = 0.2,
		wheelFriction = 1.5f,
		frontEndHealth = 150,
		rearEndHealth = 150,

		wheel FrontLeft
		{
			front = true,
			offset = 0.5368 -0.2895 0.7526,
			radius = 0.15f,
			width = 0.2f,
		}

		wheel FrontRight
		{
			front = true,
			offset = -0.5211 -0.2895 0.7526,
			radius = 0.15f,
			width = 0.2f,
		}

		area TruckBed
		{
			xywh = 0.0000 0.0105 1.8211 2.5368,
		}

		area TireFrontLeft
		{
			xywh = 0.6684 0.1579 0.4737 0.4737,
		}

		area TireFrontRight
		{
			xywh = -0.6684 0.1263 0.4737 0.4737,
		}

		template = Tire/part/TireFrontLeft,
		template = Tire/part/TireFrontRight,

		part TireFrontLeft
		{
			table install
			{
				requireInstalled = SuspensionFrontLeft,
			}
		}

		part TireFrontRight
		{
			table install
			{
				requireInstalled = SuspensionFrontRight,
			}
		}

		template = Trunk/part/TruckBed,

		part TruckBed*
		{
			area = TruckBed,
			category = bodywork,
			itemType = Autotsar.TrailerSecondTrunk,
			repairMechanic = true,
			specificItem = false,

			container
			{
				capacity = 500,
				test = Vehicles.ContainerAccess.TruckBedOpen,
			}

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

		template = Suspension/part/SuspensionFrontLeft,
		template = Suspension/part/SuspensionFrontRight,

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

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

		physics box
		{
			offset = 0.1368 0.2526 0.9211,
			extents = 0.0526 0.0526 0.7053,
			rotate = 0.0000 -19.0000 0.0000,
		}

		physics box
		{
			offset = -0.1368 0.2526 0.9263,
			extents = 0.0526 0.0526 0.7158,
			rotate = 0.0000 21.0000 0.0000,
		}

		physics sphere
		{
			offset = 0.0053 0.3000 1.2316,
			radius = 0.0400,
		}

		attachment trailer
		{
			offset = 0.0000 -0.1632 2.1526,
			rotate = 0.0000 0.0000 0.0000,
		}
	}
}
