module Base
{

	model KI5trailersCargoRolldoor
	{
		mesh = vehicles/Trailers_KI5cargo_Body|damnTrailer_cargo_large_rolldoor,
		shader = damn_vehicle_shader,
		static = FALSE,
		scale = 0.1,
	}
    model KI5trailersCargoSplitdoor
	{
		mesh = vehicles/Trailers_KI5cargo_Body|damnTrailer_cargo_medium_splitdoor,
		shader = damn_vehicle_shader,
		static = FALSE,
		scale = 0.1,
	}
    model KI5trailersCargoDoor
	{
		mesh = vehicles/Trailers_KI5cargo_Body|damnTrailer_cargo_small_door,
		shader = damn_vehicle_shader,
		static = FALSE,
		scale = 0.1,
	}

	template vehicle KI5TRCLTrunkDoor
	{
		part TrunkDoor
		{

			model SweetTrunkOfMinee
			{
				file = KI5trailersCargoRolldoor,
				offset = 0 0 -0.0666,
				rotate = 0 0 0,
				scale = 1.0,
			}

			anim Close
			{
				anim = trunkdoor_opening,
                reverse = TRUE,
				rate = 1.5,
			}

			anim Open
			{
				anim = trunkdoor_opening,
				rate = 0.4,
			}

			anim Closed
			{
				anim = trunkdoor_opening,
				animate = FALSE,
			}

			anim Opened
			{
				anim = trunkdoor_opening,
                reverse = TRUE,
				animate = FALSE,
			}

			category = bodywork,
			area = TruckBed,
			door
			{
			}
			anim Open
			{
				sound = VehicleTrunkOpenStandard,
			}
			anim Close
			{
				sound = VehicleTrunkCloseStandard,
			}
			anim Lock
			{
				sound = LockVehicleDoorStandard,
			}
			anim Unlock
			{
				sound = UnlockVehicleDoorStandard,
			}
			anim IsLocked
			{
				sound = VehicleDoorIsLockedStandard,
			}
			anim ActorOpen
			{
				anim = WindowOpenSuccess,
				rate = 0.15,
				angle = 0.0 0.0 0.0,
			}
			anim ActorClose
			{
				anim = Attack_Shove,
				rate = 0.3,
				angle = 0.0 0.0 0.0,
			}
			itemType = Base.KI5trailersRollDoor,
			mechanicRequireKey = false,
			repairMechanic = true,
			table install
			{
				items
				{
					item
					{
						type = Base.Wrench,
						count = 1,
						keep = true,
						equip = primary,
					}
				}
				time = 1000,
				skills = Mechanics:2,
				recipes = Intermediate Mechanics,
				test = Vehicles.InstallTest.Default,
				complete = Vehicles.InstallComplete.Door,
			}
			table uninstall
			{
				items
				{
					item
					{
						type = Base.Wrench,
						count = 1,
						keep = true,
						equip = primary,
					}
				}
				time = 1000,
				skills = Mechanics:2,
				recipes = Intermediate Mechanics,
				test = Vehicles.UninstallTest.Default,
				complete = Vehicles.UninstallComplete.Door,
			}
			lua
			{
				create = Vehicles.Create.TrunkDoor,
				init = Vehicles.Init.Door,
				update = Vehicles.Update.TrunkDoor,
				use = Vehicles.Use.TrunkDoor,
			}
		}
	}

    template vehicle KI5TRCMTrunkDoor
	{
		part TrunkDoor
		{

			model SweetTrunkOfMinee
			{
				file = KI5trailersCargoSplitdoor,
				offset = 0 0 -0.0666,
				rotate = 0 0 0,
				scale = 1.0,
			}

			anim Close
			{
				anim = trunkdoor_opening,
                reverse = TRUE,
				rate = 1.5,
			}

			anim Open
			{
				anim = trunkdoor_opening,
				rate = 0.4,
			}

			anim Closed
			{
				anim = trunkdoor_opening,
				animate = FALSE,
			}

			anim Opened
			{
				anim = trunkdoor_opening,
                reverse = TRUE,
				animate = FALSE,
			}

			category = bodywork,
			area = TruckBed,
			door
			{
			}
			anim Open
			{
				sound = VehicleTrunkOpenStandard,
			}
			anim Close
			{
				sound = VehicleTrunkCloseStandard,
			}
			anim Lock
			{
				sound = LockVehicleDoorStandard,
			}
			anim Unlock
			{
				sound = UnlockVehicleDoorStandard,
			}
			anim IsLocked
			{
				sound = VehicleDoorIsLockedStandard,
			}
			anim ActorOpen
			{
				anim = WindowOpenSuccess,
				rate = 0.15,
				angle = 0.0 0.0 0.0,
			}
			anim ActorClose
			{
				anim = Attack_Shove,
				rate = 0.3,
				angle = 0.0 0.0 0.0,
			}
			itemType = Base.KI5trailersSplitDoors,
			mechanicRequireKey = false,
			repairMechanic = true,
			table install
			{
				items
				{
					item
					{
						type = Base.Wrench,
						count = 1,
						keep = true,
						equip = primary,
					}
				}
				time = 1000,
				skills = Mechanics:2,
				recipes = Intermediate Mechanics,
				test = Vehicles.InstallTest.Default,
				complete = Vehicles.InstallComplete.Door,
			}
			table uninstall
			{
				items
				{
					item
					{
						type = Base.Wrench,
						count = 1,
						keep = true,
						equip = primary,
					}
				}
				time = 1000,
				skills = Mechanics:2,
				recipes = Intermediate Mechanics,
				test = Vehicles.UninstallTest.Default,
				complete = Vehicles.UninstallComplete.Door,
			}
			lua
			{
				create = Vehicles.Create.TrunkDoor,
				init = Vehicles.Init.Door,
				update = Vehicles.Update.TrunkDoor,
				use = Vehicles.Use.TrunkDoor,
			}
		}
	}

    template vehicle KI5TRCSTrunkDoor
	{
		part TrunkDoor
		{

			model SweetTrunkOfMinee
			{
				file = KI5trailersCargoDoor,
				offset = 0 0 -0.0666,
				rotate = 0 0 0,
				scale = 1.0,
			}

			anim Close
			{
				anim = trunkdoor_opening,
                reverse = TRUE,
				rate = 1.5,
			}

			anim Open
			{
				anim = trunkdoor_opening,
				rate = 0.4,
			}

			anim Closed
			{
				anim = trunkdoor_opening,
				animate = FALSE,
			}

			anim Opened
			{
				anim = trunkdoor_opening,
                reverse = TRUE,
				animate = FALSE,
			}

			category = bodywork,
			area = TruckBed,
			door
			{
			}
			anim Open
			{
				sound = VehicleTrunkOpenStandard,
			}
			anim Close
			{
				sound = VehicleTrunkCloseStandard,
			}
			anim Lock
			{
				sound = LockVehicleDoorStandard,
			}
			anim Unlock
			{
				sound = UnlockVehicleDoorStandard,
			}
			anim IsLocked
			{
				sound = VehicleDoorIsLockedStandard,
			}
			anim ActorOpen
			{
				anim = WindowOpenSuccess,
				rate = 0.15,
				angle = 0.0 0.0 0.0,
			}
			anim ActorClose
			{
				anim = Attack_Shove,
				rate = 0.3,
				angle = 0.0 0.0 0.0,
			}
			itemType = Base.KI5trailersDoor,
			mechanicRequireKey = false,
			repairMechanic = true,
			table install
			{
				items
				{
					item
					{
						type = Base.Wrench,
						count = 1,
						keep = true,
						equip = primary,
					}
				}
				time = 1000,
				skills = Mechanics:2,
				recipes = Intermediate Mechanics,
				test = Vehicles.InstallTest.Default,
				complete = Vehicles.InstallComplete.Door,
			}
			table uninstall
			{
				items
				{
					item
					{
						type = Base.Wrench,
						count = 1,
						keep = true,
						equip = primary,
					}
				}
				time = 1000,
				skills = Mechanics:2,
				recipes = Intermediate Mechanics,
				test = Vehicles.UninstallTest.Default,
				complete = Vehicles.UninstallComplete.Door,
			}
			lua
			{
				create = Vehicles.Create.TrunkDoor,
				init = Vehicles.Init.Door,
				update = Vehicles.Update.TrunkDoor,
				use = Vehicles.Use.TrunkDoor,
			}
		}
	}
}