module Rotators
{

	template vehicle SemiTrailerArmor{
		part ArmorTrailerVan
		{
			model Default
			{
				file = Rotators.ArmorTrailerVan,
			}
			area = TruckBed,
			table install
			{
				requireInstalled = DoorRear,
			}
			category = bodywork,
			itemType = Base.SemiTrailerArmor,
		}

		part Armor*
		{
			mechanicRequireKey = false,
			repairMechanic = true,
			table install
			{
				items
				{
					1
					{
						tags = base:wrench,
						count = 1,
						keep = true,
						equip = primary,
					}
				}
				time = 300,
				skills = Mechanics:1,
				recipes = Basic Mechanics,
				test = Vehicles.InstallTest.Default,
			}
			table uninstall
			{
				items
				{
					1
					{
						tags = base:wrench,
						count = 1,
						keep = true,
						equip = primary,
					}
				}
				time = 300,
				skills = Mechanics:1,
				recipes = Basic Mechanics,
				test = Vehicles.UninstallTest.Default,
				requireEmpty = true,
			}
		}}
	template vehicle SemiTruckArmor
	{		part ArmorDoorL
		{
			model Default
			{
				file = Rotators.SemiTruckArmorDoorL,
			}
			area = SeatFrontLeft,
			table install
			{
				requireInstalled = DoorFrontLeft,
			}
		}

		part ArmorDoorR
		{
			model Default
			{
				file = Rotators.SemiTruckArmorDoorR,
			}
			area = SeatFrontRight,
			table install
			{
				requireInstalled = DoorFrontRight,
			}
		}

		part ArmorFront
		{
			model Default
			{
				file = Rotators.SemiTruckArmorFront,
			}
			area = SeatFrontLeft,
			category = bodywork,
			itemType = Base.SemiTruckArmorFront_Item,
		}

		part ArmorRear
		{
			model Default
			{
				file = Rotators.SemiTruckArmorRear,
			}
			area = SeatFrontLeft,
			category = bodywork,
			itemType = Base.SemiTruckArmorRear_Item,
		}

		part ArmorBullbar
		{
			model Default
			{
				file = Rotators.SemiTruckBullbar,
			}
			area = Engine,
			category = bodywork,
			itemType = Base.SemiTruckBullbar_Item,
			lua
			{
				create = rSemiTruck.Vehicle.CreateBullbar,
			}			
		}
		part ArmorDoor*
		{
			category = door,
			itemType = Base.SemiTruckArmorDoor_Item,
		}

		part ArmorTires
		{
			mechanicRequireKey = false,
			repairMechanic = true,
			area = TireFrontLeft,
			category = tire,
			itemType = Base.SemiTruckArmorTires_Item,
            table install
            {
				complete = rSemiTruck.ATATuning.InstallComplete.MiddleAxleWheelsProtection,
            }
            table uninstall
            {
				complete = rSemiTruck.ATATuning.UninstallComplete.MiddleAxleWheelsProtection,
            }
            lua
            {
                create = ATATuning.Create.Chance0,
				init = rSemiTruck.ATATuning.Init.MiddleAxleWheelsProtection,
                update = ATATuning.Update.CommonProtection,
            }

			table install
			{
				items
				{
					1
					{
						tags = base:wrench,
						count = 1,
						keep = true,
						equip = primary,
					}
				}
				time = 300,
				skills = Mechanics:1,
				recipes = Basic Mechanics,
				test = Vehicles.InstallTest.Default,
			}
			table uninstall
			{
				items
				{
					1
					{
						tags = base:wrench,
						count = 1,
						keep = true,
						equip = primary,
					}
				}
				time = 300,
				skills = Mechanics:1,
				recipes = Basic Mechanics,
				test = Vehicles.UninstallTest.Default,
				requireEmpty = true,
			}

		}

		part Armor*
		{
			mechanicRequireKey = false,
			repairMechanic = true,
			table install
			{
				items
				{
					1
					{
						tags = base:wrench,
						count = 1,
						keep = true,
						equip = primary,
					}
				}
				time = 300,
				skills = Mechanics:1,
				recipes = Basic Mechanics,
				test = Vehicles.InstallTest.Default,
			}
			table uninstall
			{
				items
				{
					1
					{
						tags = base:wrench,
						count = 1,
						keep = true,
						equip = primary,
					}
				}
				time = 300,
				skills = Mechanics:1,
				recipes = Basic Mechanics,
				test = Vehicles.UninstallTest.Default,
				requireEmpty = true,
			}
		}
	}
}
