module Base
{
	model 87fordF700TrunkDoor
	{
		mesh = vehicles/Vehicles_87fordB700_Body|f700_trunkDoor,
		shader = damn_vehicle_shader,
		static = FALSE,
		scale = 0.1,
	}

    model 87fordF700TrunkDoorX
	{
		mesh = vehicles/Vehicles_87fordB700_Extra|f700x_rollup,
		shader = damn_vehicle_shader,
		static = FALSE,
		scale = 0.1,
	}

	template vehicle F700TrunkDoor
	{
		part TrunkDoor
		{

			model SweetTrunkOfmyyy3475
			{
				file = 87fordF700TrunkDoor,
			}

			anim Close
			{
				anim = door_r_opening,
				reverse = TRUE,
				rate = 0.5,
			}

			anim Open
			{
				anim = door_r_opening,
				rate = 0.5,
			}

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

			anim Opened
			{
				anim = door_r_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.87fordF700ArmoredTrunkDoor,
			mechanicRequireKey = true,
            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,
				requireUninstalled = WindshieldRear,

			}
			lua
			{
				create = Vehicles.Create.TrunkDoor,
				init = Vehicles.Init.Door,
				use = Vehicles.Use.TrunkDoor,
			}
		}
	}

    template vehicle F700TrunkDoorX
	{
		part TrunkDoor
		{

			model SweetTrunkOfmyyy347X
			{
				file = 87fordF700TrunkDoorX,
                offset = 0.0 -0.0666 0.0666,
                rotate = -90.0000 0.0000 0.0000,
			}

			anim Close
			{
				anim = roll_opening,
				reverse = TRUE,
				rate = 0.75,
			}

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

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

			anim Opened
			{
				anim = roll_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.87fordF700RollTrunkDoor,
			mechanicRequireKey = true,
            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,
			}
		}
	}
}