module Base
{
	model isoContainer2_Trunkdoor
	{
		mesh = vehicles/Containers_ISO_body|Trunk_mesh,
		shader = vehicle_noreflect,
		static = FALSE,
		scale = 0.1,
	}

	template vehicle ContainerDoor
	{
		part TrunkDoor
		{
			category = bodywork,
			area = TruckBed,

			model IsoDoor
			{
				file = isoContainer2_Trunkdoor,
				offset = 0 0 0,
				rotate = 0 0 0,
				scale = 1.0,
			}

			anim Close
			{
				anim = iso2_closing,
				rate = 1.0,
			}

			anim Open
			{
				anim = iso2_closing,
				reverse = TRUE,
				rate = 0.40,
			}

			anim Closed
			{
				anim = iso2_closing,
				reverse = TRUE,
				animate = FALSE,
			}

			anim Opened
			{
				anim = iso2_closing,
				animate = FALSE,
			}
			
			door
			{
			}
			anim Open
			{
				sound = VehicleTrunkOpenStandard,
			}
			anim Close
			{
				sound = VehicleTrunkCloseStandard,
			}
			anim Lock
			{
				sound = LockVehicleDoorStandard,
			}
			anim Unlock
			{
				sound = UnlockVehicleDoorStandard,
			}
			anim IsLocked
			{
				sound = VehicleDoorIsLockedStandard,
			}
			

			itemType = Base.IsoContainerTrunkDoor,
			mechanicRequireKey = false,
			repairMechanic = true,
			table install
			{
				items
				{
					item
					{
						type = Base.Wrench,
						count = 1,
						keep = true,
						equip = primary,
					}
				}
				time = 300,
				skills = Mechanics:3,
				recipes = Basic Mechanics,
				test = Vehicles.InstallTest.Default,
				complete = Vehicles.InstallComplete.Door,
			}
			table uninstall
			{
				items
				{
					item
					{
						type = Base.Wrench,
						count = 1,
						keep = true,
						equip = primary,
					}
				}
				time = 300,
				skills = Mechanics:3,
				recipes = Basic 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,
			}
		}
	}
}

