module Base
{
	template vehicle FRTrunkDoor
	{
		part TrunkDoor
		{
			category = bodywork,
			area = TruckBed,
			
			door
			{
			}
			
			itemType = Base.TrunkDoor,
			mechanicRequireKey = true,
			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.FR_VisualDefault,
			}
			
			table uninstall
			{
				items
				{
					item
					{
						type = Base.Wrench,
						count = 1,
						keep = true,
						equip = primary,
					}
				}
				time = 300,
				skills = Mechanics:3,
				recipes = Basic Mechanics,
				test = Vehicles.UninstallTest.FR_Default,
				complete = Vehicles.UninstallComplete.FR_VisualDefault,
			}
			
			anim Open
			{
				anim = ArmatureAction,
				reverse = FALSE,
				rate = 1.0,
				sound = VehicleTrunkOpenStandard,
			}
			
			anim Close
			{
				anim = ArmatureAction,
				reverse = TRUE,
				rate = 2.0,
				sound = VehicleTrunkCloseStandard,
			}

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

			anim Closed
			{
				anim = ArmatureAction,
				reverse = FALSE,
				animate = FALSE,
			}
			
			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,
			}
			
			lua
			{
				create = Vehicles.Create.FR_VisualTrunkDoor,
				init = Vehicles.Init.FR_VisualDefault,
				update = Vehicles.Update.TrunkDoor,
				use = Vehicles.Use.TrunkDoor,
			}
		}
	}
	
	template vehicle FRInteriorTrunkDoor
	{
		part InteriorTrunkDoor
		{
			category = bodywork,
			area = TruckBed,
			itemType = Base.TrunkDoor,
			mechanicRequireKey = true,
			repairMechanic = true,
			
			door
			{
			}
			
			table install
			{
				items
				{
					item
					{
						type = Base.Wrench,
						count = 1,
						keep = true,
						equip = primary,
					}
				}
				time = 300,
				skills = Mechanics:2,
				recipes = Basic Mechanics,
				test = Vehicles.InstallTest.Default,
				complete = Vehicles.InstallComplete.FR_VisualDefault,
			}
			
			table uninstall
			{
				items
				{
					item
					{
						type = Base.Wrench,
						count = 1,
						keep = true,
						equip = primary,
					}
				}
				time = 300,
				skills = Mechanics:2,
				recipes = Basic Mechanics,
				test = Vehicles.UninstallTest.FR_Default,
				complete = Vehicles.UninstallComplete.FR_VisualDefault,
			}
			
			anim Open
			{
				anim = ArmatureAction,
				reverse = FALSE,
				rate = 1.0,
				sound = VehicleTrunkOpenStandard,
			}
			
			anim Close
			{
				anim = ArmatureAction,
				reverse = TRUE,
				rate = 2.0,
				sound = VehicleTrunkCloseStandard,
			}

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

			anim Closed
			{
				anim = ArmatureAction,
				reverse = FALSE,
				animate = FALSE,
			}
			
			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,
			}
			
			lua
			{
				create = Vehicles.Create.FR_VisualTrunkDoor,
				init = Vehicles.Init.FR_VisualDefault,
			}
		}
	}
	
	template vehicle FRTrunkSideDoor
	{
		part TrunkSideDoor
		{
			category = bodywork,
			area = TruckBedSide,
			
			door
			{
			}
			
			itemType = Base.TrunkDoor,
			mechanicRequireKey = true,
			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.FR_VisualDefault,
			}
			
			table uninstall
			{
				items
				{
					item
					{
						type = Base.Wrench,
						count = 1,
						keep = true,
						equip = primary,
					}
				}
				time = 300,
				skills = Mechanics:3,
				recipes = Basic Mechanics,
				test = Vehicles.UninstallTest.FR_Default,
				complete = Vehicles.UninstallComplete.FR_VisualDefault,
			}
			
			anim Open
			{
				anim = ArmatureAction,
				reverse = FALSE,
				rate = 1.0,
				sound = VehicleTrunkOpenStandard,
			}
			
			anim Close
			{
				anim = ArmatureAction,
				reverse = TRUE,
				rate = 2.0,
				sound = VehicleTrunkCloseStandard,
			}

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

			anim Closed
			{
				anim = ArmatureAction,
				reverse = FALSE,
				animate = FALSE,
			}
			
			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,
			}
			
			lua
			{
				create = Vehicles.Create.FR_VisualTrunkDoor,
				init = Vehicles.Init.FR_VisualDefault,
				update = Vehicles.Update.TrunkDoor,
				use = Vehicles.Use.TrunkDoor,
			}
		}
	}
	
	template vehicle FRSideContainerDoor
	{
		part FRSideContainerDoor
		{
			table FRPartInfo
			{
				parentPart = FRSideContainer,
			}
			
			category = bodywork,
			area = SideContainer,
			door
			{
			}
			
			anim Open
			{
				anim = ArmatureAction,
				reverse = FALSE,
				rate = 1.0,
				sound = VehicleTrunkOpenStandard,
			}
			
			anim Close
			{
				anim = ArmatureAction,
				reverse = TRUE,
				rate = 2.0,
				sound = VehicleTrunkCloseStandard,
			}

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

			anim Closed
			{
				anim = ArmatureAction,
				reverse = FALSE,
				animate = FALSE,
			}
			
			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.TrunkDoor,
			mechanicRequireKey = true,
			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.FR_VisualDefault,
				requireInstalled = FRSideContainer,
			}
			table uninstall
			{
				items
				{
					item
					{
						type = Base.Wrench,
						count = 1,
						keep = true,
						equip = primary,
					}
				}
				time = 300,
				skills = Mechanics:3,
				recipes = Basic Mechanics,
				test = Vehicles.UninstallTest.FR_Default,
				complete = Vehicles.UninstallComplete.FR_VisualDefault,
			}
			
			lua
			{
				create = Vehicles.Create.FR_VisualTrunkDoor,
				init = Vehicles.Init.FR_VisualDefault,
				update = Vehicles.Update.TrunkDoor,
				use = Vehicles.Use.TrunkDoor,
			}
		}
	}
}