module Rotators
{

		model SemiTruckBaseBackWheelLeftv2
		{
			mesh = vehicles/vehicles_SemiTruck_Wheels_Backv2,
			texture = vehicles/vehicles_rSemiTruck_Wheel,
			invertx = true,
		}
		model SemiTruckBaseBackWheelRightv2
		{
			mesh = vehicles/vehicles_SemiTruck_Wheels_Backv2,
			texture = vehicles/vehicles_rSemiTruck_Wheel,
			invertx = false,
		}
		model SemiTruckBaseBackWheelLeftMiddle
		{
			mesh = vehicles/vehicles_SemiTruck_Wheels_Backv2,
			texture = vehicles/vehicles_rSemiTruck_Wheel,
			invertx = false,
		}
		model SemiTruckBaseBackWheelRightMiddle
		{
			mesh = vehicles/vehicles_SemiTruck_Wheels_Backv2,
			texture = vehicles/vehicles_rSemiTruck_Wheel,
			invertx = true,
		}

		/* 4 Tire Axle */
		template vehicle Axle4Tires
		{
			template = Tire,

			part TireFrontLeft
			{
				model InflatedTirePlusWheel
				{
					file = Rotators.SemiTruckBaseFrontWheelLeft,
				}
				model ATAProtection
				{
					file = Rotators.SemiTruckArmorTireFL,
				}
				table uninstall
				{
					requireUninstalled = WheelChainFrontLeft,
					recipes = Basic Mechanics,
				}
			}

			part WheelChainFrontLeft
			{
				parent = TireFrontLeft,
				area = TireFrontLeft,
				table install
				{
					requireInstalled = TireFrontLeft,
				}
				table uninstall
				{
					requireInstalled = TireFrontLeft,
				}
			}

			part TireFrontRight
			{
				model InflatedTirePlusWheel
				{
					file = Rotators.SemiTruckBaseFrontWheelRight,
				}
				model ATAProtection
				{
					file = Rotators.SemiTruckArmorTireFR,
					invertX = TRUE,
				}
				table uninstall
				{
					requireUninstalled = WheelChainFrontRight,
					recipes = Basic Mechanics,
				}
			}

			part WheelChainFrontRight
			{
				parent = TireFrontRight,
				area = TireFrontRight,
				table install
				{
					requireInstalled = TireFrontRight,
				}
				table uninstall
				{
					requireInstalled = TireFrontRight,
				}
			}

			part TireMiddleLeft
			{
				area = TireMiddleLeft,
				wheel = RearLeft,
				table uninstall
				{
					requireUninstalled = WheelChainMiddleLeft,
					recipes = Basic Mechanics,
				}
				model InflatedTirePlusWheel
				{
					file = Rotators.SemiTruckBaseBackWheelLeftMiddle,
					offset = -0.125 0.0 0.0,
				}
				model ATAProtection
				{
					file = Rotators.SemiTruckArmorTireRR,
					offset = -0.125 0.0 0.0,
					rotate = 0 0 0,
				}
			}

			part WheelChainMiddleLeft
			{
				parent = TireMiddleLeft,
				area = TireMiddleLeft,
				table install
				{
					requireInstalled = TireMiddleLeft,
				}
				table uninstall
				{
					requireInstalled = TireMiddleLeft,
				}
			}

			part TireMiddleRight
			{
				area = TireMiddleRight,
				wheel = RearLeft,
				table install
				{
					requireInstalled = BrakeRearRight;SuspensionRearRight,
				}
				table uninstall
				{
					requireUninstalled = WheelChainMiddleRight,
					recipes = Basic Mechanics,
				}
				model InflatedTirePlusWheel
				{
					file = Rotators.SemiTruckBaseBackWheelRightMiddle,
					offset = -1.40 0.0 0.0,
				}
				model ATAProtection
				{
					file = Rotators.SemiTruckArmorTireRR,
					offset = -1.40 0.0 0.0,
					rotate = 0 0 180,
				}
			}

			part WheelChainMiddleRight
			{
				parent = TireMiddleRight,
				area = TireMiddleRight,
				table install
				{
					requireInstalled = TireMiddleRight,
				}
				table uninstall
				{
					requireInstalled = TireMiddleRight,
				}
			}

			part TireRearLeft
			{
				area = TireRearLeft,
				wheel = RearRight,
				table uninstall
				{
					requireUninstalled = WheelChainRearLeft,
					recipes = Basic Mechanics,
				}
				model InflatedTirePlusWheel
				{
					file = Rotators.SemiTruckBaseBackWheelRightv2,
					offset = 1.40 0.0 0.0,
				}
				model ATAProtection
				{
					file = Rotators.SemiTruckArmorTireRR,
					offset = 1.40 0.0 0.0,
					rotate = 0 0 0,
				}
			}

			part WheelChainRearLeft
			{
				parent = TireRearLeft,
				area = TireRearLeft,
				table install
				{
					requireInstalled = TireRearLeft,
				}
				table uninstall
				{
					requireInstalled = TireRearLeft,
				}
			}

			part TireRearRight
			{
				area = TireRearRight,
				wheel = RearRight,
				table install
				{
					requireInstalled = BrakeRearLeft;SuspensionRearLeft,
				}
				table uninstall
				{
					requireUninstalled = WheelChainRearRight,
					recipes = Basic Mechanics,
				}
				model InflatedTirePlusWheel
				{
					file = Rotators.SemiTruckBaseBackWheelLeftv2,
					offset = 0.125 0.0 0.0,
				}
				model ATAProtection
				{
					file = Rotators.SemiTruckArmorTireRR,
					offset = 0.125 0.0 0.0,
					rotate = 0 0 180,
				}
			}

			part WheelChainRearRight
			{
				parent = TireRearRight,
				area = TireRearRight,
				table install
				{
					requireInstalled = TireRearRight,
				}
				table uninstall
				{
					requireInstalled = TireRearRight,
				}
			}

			part Tire*
			{
				category = tire,
				itemType = Base.DoubleModernTire;Base.DoubleNormalTire;Base.DoubleOldTire,
				container
				{
					capacity = 35,
					test = Vehicles.ContainerAccess.Tire,
					contentType = Air,
				}
				table install
				{
					items
					{
						1
						{
							type = Base.Jack,
							count = 1,
							keep = true,
						}
						2
						{
							type = Base.LugWrench,
							count = 1,
							keep = true,
							equip = primary,
						}
					}
					time = 400,
					skills = Mechanics:1,
					test = Vehicles.InstallTest.Default,
					requireUninstalled = ATA2ProtectionWheels,
					complete = rSemiTruck.ATATuning.InstallComplete.SafeTireNotAllModelsVisible,
				}
				table uninstall
				{
					items
					{
						1
						{
							type = Base.Jack,
							count = 1,
							keep = true,
						}
						2
						{
							type = Base.LugWrench,
							count = 1,
							keep = true,
							equip = primary,
						}
					}
					recipes = Intermediate Mechanics,
					time = 400,
					skills = Mechanics:1,
					test = Vehicles.UninstallTest.Default,
					complete = rSemiTruck.ATATuning.UninstallComplete.SafeTireNotAllModelsVisible,
				}
				setAllModelsVisible = false,
				lua
				{
					create = Vehicles.Create.Tire,
					init = rSemiTruck.ATATuning.Init.SafeTireNotAllModelsVisible,
					checkOperate = Vehicles.CheckOperate.Tire,
					update = Vehicles.Update.Tire,
				}
			}

			part TireFront*
			{
				category = tire,
				itemType = Base.OldTire;Base.NormalTire;Base.ModernTire,
				container
				{
					capacity = 90,
					test = Vehicles.ContainerAccess.Tire,
					contentType = Air,
				}
				table install
				{
					items
					{
						1
						{
							type = Base.Jack,
							count = 1,
							keep = true,
						}
						2
						{
							type = Base.LugWrench,
							count = 1,
							keep = true,
							equip = primary,
						}
					}
					time = 400,
					skills = Mechanics:1,
					test = Vehicles.InstallTest.Default,
					requireUninstalled = ATA2ProtectionWheels,
					complete = rSemiTruck.ATATuning.InstallComplete.SafeTireNotAllModelsVisible,
				}
				table uninstall
				{
					items
					{
						1
						{
							type = Base.Jack,
							count = 1,
							keep = true,
						}
						2
						{
							type = Base.LugWrench,
							count = 1,
							keep = true,
							equip = primary,
						}
					}
					recipes = Intermediate Mechanics,
					time = 400,
					skills = Mechanics:1,
					test = Vehicles.UninstallTest.Default,
					complete = rSemiTruck.ATATuning.UninstallComplete.SafeTireNotAllModelsVisible,
				}
				setAllModelsVisible = false,
				lua
				{
					create = Vehicles.Create.Tire,
					init = rSemiTruck.ATATuning.Init.SafeTireNotAllModelsVisible,
					checkOperate = Vehicles.CheckOperate.Tire,
					update = Vehicles.Update.Tire,
				}
			}

			part BrakeMiddleLeft
			{
				area = TireMiddleLeft,
				table install
				{
					requireUninstalled = TireMiddleLeft,
				}
				table uninstall
				{
					requireUninstalled = TireMiddleLeft,
				}
			}

			part BrakeMiddleRight
			{
				area = TireMiddleRight,
				table install
				{
					requireUninstalled = TireMiddleRight,
				}
				table uninstall
				{
					requireUninstalled = TireMiddleRight,
				}
			}

			part Brake*
			{
				category = brakes,
				itemType = Base.OldBrake;Base.NormalBrake;Base.ModernBrake,
				table install
				{
					items
					{
						1
						{
							type = Base.Jack,
							count = 1,
							keep = true,
						}
						2
						{
							type = Base.Wrench,
							count = 1,
							keep = true,
							equip = primary,
						}
					}
					time = 300,
					skills = Mechanics:3,
					recipes = Basic Mechanics,
					test = Vehicles.InstallTest.Default,
				}
				table uninstall
				{
					items
					{
						1
						{
							type = Base.Jack,
							count = 1,
							keep = true,
						}
						2
						{
							type = Base.Wrench,
							count = 1,
							keep = true,
							equip = primary,
						}
					}
					time = 300,
					skills = Mechanics:3,
					recipes = Basic Mechanics,
					test = Vehicles.UninstallTest.Default,
				}
				lua
				{
					create = Vehicles.Create.Brake,
					update = Vehicles.Update.Brakes,
				}
			}

			part SuspensionMiddleLeft
			{
				area = TireMiddleLeft,
				table install
				{
					requireUninstalled = TireMiddleLeft,
				}
				table uninstall
				{
					requireUninstalled = TireMiddleLeft,
				}
			}

			part SuspensionMiddleRight
			{
				area = TireMiddleRight,
				table install
				{
					requireUninstalled = TireMiddleRight,
				}
				table uninstall
				{
					requireUninstalled = TireMiddleRight,
				}
			}

			part Suspension*
			{
				category = suspension,
				itemType = Base.NormalSuspension;Base.ModernSuspension,
				table install
				{
					items
					{
						1
						{
							type = Base.Jack,
							count = 1,
							keep = true,
						}
						2
						{
							type = Base.Wrench,
							count = 1,
							keep = true,
							equip = primary,
						}
					}
					time = 300,
					skills = Mechanics:3,
					recipes = Basic Mechanics,
					test = Vehicles.InstallTest.Default,
				}
				table uninstall
				{
					items
					{
						1
						{
							type = Base.Jack,
							count = 1,
							keep = true,
						}
						2
						{
							type = Base.Wrench,
							count = 1,
							keep = true,
							equip = primary,
						}
					}
					time = 300,
					skills = Mechanics:3,
					recipes = Basic Mechanics,
					test = Vehicles.UninstallTest.Default,
				}
				lua
				{
					create = Vehicles.Create.Default,
					update = Vehicles.Update.Suspension,
				}
			}

			part WheelChain*
			{
				mechanicRequireKey = false,
				repairMechanic = true,
				category = tire,
				itemType = Base.SemiTruckArmorTires_Item,
				table install
				{
					complete = rSemiTruck.ATATuning.InstallComplete.IndividualWheelProtection,
					items
					{
						1
						{
							tags = base:wrench,
							count = 1,
							keep = true,
							equip = primary,
						}
					}
					time = 300,
					skills = Mechanics:1,
					recipes = Basic Mechanics,
					test = rSemiTruck.ATATuning.InstallTest.IndividualWheelProtection,
				}
				table uninstall
				{
					complete = rSemiTruck.ATATuning.UninstallComplete.IndividualWheelProtection,
					items
					{
						1
						{
							tags = base:wrench,
							count = 1,
							keep = true,
							equip = primary,
						}
					}
					time = 300,
					skills = Mechanics:1,
					recipes = Basic Mechanics,
					test = rSemiTruck.ATATuning.UninstallTest.IndividualWheelProtection,
					requireEmpty = true,
				}
				lua
				{
					create = ATATuning.Create.Chance0,
					init = rSemiTruck.ATATuning.Init.IndividualWheelProtection,
					update = rSemiTruck.ATATuning.Update.IndividualWheelProtection,
				}
			}
		}
	}
