module Base
{

	model 88toyotaHiluxWheel1FL
	{
		mesh = vehicles/Vehicles_88toyotaHilux_Wheel|88hilux_wheel,
		texture = vehicles/Vehicles_88toyotaHilux_Wheel,
		 shader = vehiclewheel,
		scale = 0.1,
	}

    model 88toyotaHiluxWheel1FR
	{
		mesh = vehicles/Vehicles_88toyotaHilux_Wheel|88hilux_wheel,
		texture = vehicles/Vehicles_88toyotaHilux_Wheel,
		 shader = vehiclewheel,
		scale = 0.1,
        invertX = TRUE,
	}

    model 88toyotaHiluxWheel1RL
	{
		mesh = vehicles/Vehicles_88toyotaHilux_Wheel|88hilux_wheel,
		texture = vehicles/Vehicles_88toyotaHilux_Wheel,
		 shader = vehiclewheel,
		scale = 0.1,
        invertX = TRUE,
	}

    model 88toyotaHiluxWheel1RR
	{
		mesh = vehicles/Vehicles_88toyotaHilux_Wheel|88hilux_wheel,
		texture = vehicles/Vehicles_88toyotaHilux_Wheel,
		 shader = vehiclewheel,
		scale = 0.1,
	}

    model 88toyotaHiluxWheelUNIL
	{
		mesh = vehicles/Vehicles_damnBasic_tires|damn_stock_tire0,
		texture = vehicles/Vehicles_damnBasic_Wheel2,
		 shader = vehiclewheel,
		scale = 0.112,
	}
    model 88toyotaHiluxWheelUNIR
	{
		mesh = vehicles/Vehicles_damnBasic_tires|damn_stock_tire0,
		texture = vehicles/Vehicles_damnBasic_Wheel2,
		 shader = vehiclewheel,
		scale = 0.112,
        invertX = TRUE,
	}

	template vehicle HLX88Tires
	{
		part TireFrontLeft
		{
            model HLX88Tire0
			{
				file = 88toyotaHiluxWheel1FL,
			}
            model HLX88Tire5
			{
				file = 88toyotaHiluxWheelUNIL,
			}

			area = TireFrontLeft,
			wheel = FrontLeft,
			table install
			{
				complete = HLX88.InstallComplete.TireFrontLeft,
				requireInstalled = BrakeFrontLeft;SuspensionFrontLeft,
			}
			table uninstall
			{
				complete = HLX88.UninstallComplete.TireFrontLeft,
			}

			lua
			{
				create = Vehicles.Create.Tire,
				init = HLX88.Init.TireFrontLeft,
				checkOperate = Vehicles.CheckOperate.Tire,
				update = Vehicles.Update.Tire,
			}

		}

		part TireFrontRight
		{
            model HLX88Tire0
			{
				file = 88toyotaHiluxWheel1FR,
			}
            model HLX88Tire5
			{
				file = 88toyotaHiluxWheelUNIR,
			}

			area = TireFrontRight,
			wheel = FrontRight,
			table install
			{
				complete = HLX88.InstallComplete.TireFrontRight,
				requireInstalled = BrakeFrontRight;SuspensionFrontRight,
			}
			table uninstall
			{
				complete = HLX88.UninstallComplete.TireFrontRight,
			}

			lua
			{
				create = Vehicles.Create.Tire,
				init = HLX88.Init.TireFrontRight,
				checkOperate = Vehicles.CheckOperate.Tire,
				update = Vehicles.Update.Tire,
			}
		}

		part TireRearLeft
		{
            model HLX88Tire0
			{
				file = 88toyotaHiluxWheel1RL,
			}
            model HLX88Tire5
			{
				file = 88toyotaHiluxWheelUNIL,
			}

			area = TireRearLeft,
			wheel = RearLeft,
			table install
			{
				complete = HLX88.InstallComplete.TireRearLeft,
				requireInstalled = BrakeRearLeft;SuspensionRearLeft,
			}

            table uninstall
			{
				complete = HLX88.UninstallComplete.TireRearLeft,
			}

			lua
			{
				create = Vehicles.Create.Tire,
				init = HLX88.Init.TireRearLeft,
				checkOperate = Vehicles.CheckOperate.Tire,
				update = Vehicles.Update.Tire,
			}
		}

		part TireRearRight
		{
            model HLX88Tire0
			{
				file = 88toyotaHiluxWheel1RR,
			}
            model HLX88Tire5
			{
				file = 88toyotaHiluxWheelUNIR,
			}

			area = TireRearRight,
			wheel = RearRight,
            table install
			{
				complete = HLX88.InstallComplete.TireRearRight,
				requireInstalled = BrakeRearRight;SuspensionRearRight,
			}
			table uninstall
			{
				complete = HLX88.UninstallComplete.TireRearRight,
			}

			lua
			{
				create = Vehicles.Create.Tire,
				init = HLX88.Init.TireRearRight,
				checkOperate = Vehicles.CheckOperate.Tire,
				update = Vehicles.Update.Tire,
			}
		}

		part Tire*
		{
			category = tire,
			specificItem = false,
			itemType = Base.88toyotaHiluxTire2;damnCraft.SmallTire2,
             
			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,
			}
			table uninstall
			{
				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.UninstallTest.Default,
			}
		}
	}
}