module Base
{
	model 86oshkoshP19Atrunk1
	{
		mesh = vehicles/Vehicles_86oshkoshP19A_Body|p19a_trunk,
		shader = damn_vehicle_noreflect_shader,
		static = FALSE,
		scale = 0.1,
	}
	model 86oshkoshP19Atrunk2
	{
		mesh = vehicles/Vehicles_86oshkoshP19A_Body|p19a_trunk2,
		shader = damn_vehicle_noreflect_shader,
		static = FALSE,
		scale = 0.1,
	}

	template vehicle P19ATrunkDoors
	{
		part TrunkDoor1
		{

			model SweetTrunkOfMine25623656
			{
				file = 86oshkoshP19Atrunk1,
				offset = 0 0 0,
				rotate = 0 0 0,
				scale = 1.0,
			}

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

			anim Open
			{
				anim = trunk_opening,
				rate = 2.0,
			}

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

			anim Opened
			{
				anim = trunk_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 90.0 0.0,
			}
			anim ActorClose
			{
				anim = Attack_Shove,
				rate = 0.3,
				angle = 0.0 90.0 0.0,
			}
		}

		part TrunkDoor2
		{

			model SweetTrunkOfWhatever25623656
			{
				file = 86oshkoshP19Atrunk2,
				offset = 0 0 0,
				rotate = 0 0 0,
				scale = 1.0,
			}

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

			anim Open
			{
				anim = trunk2_opening,
				rate = 2.0,
			}

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

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

			category = bodywork,
			area = TruckBed2,
			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 -90.0 0.0,
			}
			anim ActorClose
			{
				anim = Attack_Shove,
				rate = 0.3,
				angle = 0.0 -90.0 0.0,
			}
		}

		part Trunk*
		{
			itemType = Base.P19ATrunkDoor,
			mechanicRequireKey = false,
            durability = 5,
			repairMechanic = true,
			table install
			{
				items
				{
					item
					{
						tags = 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
					{
						tags = 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,
				use = Vehicles.Use.TrunkDoor,
			}
		}
	}
}

