module Base
{

	model 76chevyKseriesWheel1L
	{
		mesh = vehicles/Vehicles_76chevyKseries_Wheels|76chevy_wheel,
		texture = vehicles/Vehicles_76chevyKseries_Wheel,
		shader = damn_wheel_shader,
		scale = 0.104,
	}

    model 76chevyKseriesWheel1R
	{
		mesh = vehicles/Vehicles_76chevyKseries_Wheels|76chevy_wheel,
		texture = vehicles/Vehicles_76chevyKseries_Wheel,
		shader = damn_wheel_shader,
		scale = 0.104,
        invertX = TRUE,
	}

    model 76chevyKseriesWheel2L
	{
		mesh = vehicles/Vehicles_damnCommon_tires|damn_common_tire01_02,
		texture = vehicles/Vehicles_damnCommon_Wheel01,
		shader = damn_wheel_shader,
		scale = 0.104,
        invertX = TRUE,
	}

    model 76chevyKseriesWheel2R
	{
		mesh = vehicles/Vehicles_damnCommon_tires|damn_common_tire01_02,
		texture = vehicles/Vehicles_damnCommon_Wheel01,
		shader = damn_wheel_shader,
		scale = 0.104,
	}

    model 76chevyKseriesWheel3L
	{
		mesh = vehicles/Vehicles_damnCommon_tires|damn_common_tire01_02,
		texture = vehicles/Vehicles_damnCommon_Wheel02,
		shader = damn_wheel_shader,
		scale = 0.104,
	}

    model 76chevyKseriesWheel3R
	{
		mesh = vehicles/Vehicles_damnCommon_tires|damn_common_tire01_02,
		texture = vehicles/Vehicles_damnCommon_Wheel02,
		shader = damn_wheel_shader,
		scale = 0.104,
        invertX = TRUE,
	}

    model 76chevyKseriesWheel4L
	{
		mesh = vehicles/Vehicles_damnCommon_tires|damn_common_tire03_04,
		texture = vehicles/Vehicles_damnCommon_Wheel03,
		shader = damn_wheel_shader,
		scale = 0.104,
	}

    model 76chevyKseriesWheel4R
	{
		mesh = vehicles/Vehicles_damnCommon_tires|damn_common_tire03_04,
		texture = vehicles/Vehicles_damnCommon_Wheel03,
		shader = damn_wheel_shader,
		scale = 0.104,
        invertX = TRUE,
	}

    model 76chevyKseriesWheel5L
	{
		mesh = vehicles/Vehicles_damnCommon_tires|damn_common_tire03_04,
		texture = vehicles/Vehicles_damnCommon_Wheel04,
		shader = damn_wheel_shader,
		scale = 0.104,
	}

    model 76chevyKseriesWheel5R
	{
		mesh = vehicles/Vehicles_damnCommon_tires|damn_common_tire03_04,
		texture = vehicles/Vehicles_damnCommon_Wheel04,
		shader = damn_wheel_shader,
		scale = 0.104,
        invertX = TRUE,
	}

    model 76chevyKseriesWheelUNIL
	{
		mesh = vehicles/Vehicles_damnBasic_tires|damn_stock_tire0,
		texture = vehicles/Vehicles_damnBasic_Wheel2,
		shader = damn_wheel_shader,
		scale = 0.118,
	}
    model 76chevyKseriesWheelUNIR
	{
		mesh = vehicles/Vehicles_damnBasic_tires|damn_stock_tire0,
		texture = vehicles/Vehicles_damnBasic_Wheel2,
		shader = damn_wheel_shader,
		scale = 0.118,
        invertX = TRUE,
	}

    model 76chevyKseriesWheel1DL
	{
		mesh = vehicles/Vehicles_76chevyKseries_Wheels_Dually|76chevy_wheels,
		texture = vehicles/Vehicles_76chevyKseries_Wheel,
		shader = damn_wheel_shader,
		scale = 0.104,
	}

    model 76chevyKseriesWheel1DR
	{
		mesh = vehicles/Vehicles_76chevyKseries_Wheels_Dually|76chevy_wheels,
		texture = vehicles/Vehicles_76chevyKseries_Wheel,
		shader = damn_wheel_shader,
		scale = 0.104,
        invertX = TRUE,
	}

	template vehicle CH76Tires
	{
		part TireFrontLeft
		{
            model CH76Tire0
			{
				file = 76chevyKseriesWheel1L,
			}
            model CH76Tire1
			{
				file = 76chevyKseriesWheel2L,
			}
            model CH76Tire2
			{
				file = 76chevyKseriesWheel3L,
			}
            model CH76Tire3
			{
				file = 76chevyKseriesWheel4L,
			}
            model CH76Tire4
			{
				file = 76chevyKseriesWheel5L,
			}
            model CH76Tire5
			{
				file = 76chevyKseriesWheelUNIL,
			}

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

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

		}

		part TireFrontRight
		{
            model CH76Tire0
			{
				file = 76chevyKseriesWheel1R,
			}
            model CH76Tire1
			{
				file = 76chevyKseriesWheel2R,
			}
            model CH76Tire2
			{
				file = 76chevyKseriesWheel3R,
			}
            model CH76Tire3
			{
				file = 76chevyKseriesWheel4R,
			}
            model CH76Tire4
			{
				file = 76chevyKseriesWheel5R,
			}
            model CH76Tire5
			{
				file = 76chevyKseriesWheelUNIR,
			}

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

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

		part TireRearLeft
		{
            model CH76Tire0
			{
				file = 76chevyKseriesWheel1L,
			}
            model CH76Tire1
			{
				file = 76chevyKseriesWheel2L,
			}
            model CH76Tire2
			{
				file = 76chevyKseriesWheel3L,
			}
            model CH76Tire3
			{
				file = 76chevyKseriesWheel4L,
			}
            model CH76Tire4
			{
				file = 76chevyKseriesWheel5L,
			}
            model CH76Tire5
			{
				file = 76chevyKseriesWheelUNIL,
			}

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

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

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

		part TireRearRight
		{
            model CH76Tire0
			{
				file = 76chevyKseriesWheel1R,
			}
            model CH76Tire1
			{
				file = 76chevyKseriesWheel2R,
			}
            model CH76Tire2
			{
				file = 76chevyKseriesWheel3R,
			}
            model CH76Tire3
			{
				file = 76chevyKseriesWheel4R,
			}
            model CH76Tire4
			{
				file = 76chevyKseriesWheel5R,
			}
            model CH76Tire5
			{
				file = 76chevyKseriesWheelUNIR,
			}

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

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

		part Tire*
		{
			category = tire,
			specificItem = false,
			itemType = Base.76chevyKseriesTire2;Base.80chevyCKseriesTire2;Base.80chevyCKseriesTire1;Base.90chevyCKseriesTire2;Base.90chevyCKseriesTire1;damnCraft.SmallTire2,
            durability = 2,
			container
			{
				capacity = 35,
				test = Vehicles.ContainerAccess.Tire,
				contentType = Air,
			}
			table install
			{
				items
				{
					1
					{
						type = Base.Jack,
						count = 1,
						keep = true,
					}
					2
					{
						tags = 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
					{
						tags = LugWrench,
						count = 1,
						keep = true,
						equip = primary,
					}
				}
				time = 400,
				skills = Mechanics:1,
				test = Vehicles.UninstallTest.Default,
			}
		}
	}

    template vehicle CH76TiresDually
	{
		part TireFrontLeft
		{
            model Tire2
			{
				file = 76chevyKseriesWheel1L,
			}

			area = TireFrontLeft,
			wheel = FrontLeft,
            specificItem = false,
            itemType = Base.76chevyKseriesTire2,
			table install
			{
				requireInstalled = BrakeFrontLeft;SuspensionFrontLeft,
			}

		}

		part TireFrontRight
		{
            model Tire2
			{
				file = 76chevyKseriesWheel1R,
			}

			area = TireFrontRight,
			wheel = FrontRight,
            specificItem = false,
            itemType = Base.76chevyKseriesTire2,
			table install
			{
				requireInstalled = BrakeFrontRight;SuspensionFrontRight,
			}
		}

		part TireRearLeft
		{
            model Tire2D
			{
				file = 76chevyKseriesWheel1DL,
			}

			area = TireRearLeft,
			wheel = RearLeft,
            specificItem = false,
            itemType = Base.76chevyKseriesDoubleTires2,
			table install
			{
				requireInstalled = BrakeRearLeft;SuspensionRearLeft,
			}
		}

		part TireRearRight
		{
            model Tire2D
			{
				file = 76chevyKseriesWheel1DR,
			}

			area = TireRearRight,
			wheel = RearRight,
            specificItem = false,
            itemType = Base.76chevyKseriesDoubleTires2,
			table install
			{
				requireInstalled = BrakeRearRight;SuspensionRearRight,
			}
		}

		part Tire*
		{
			category = tire,
            durability = 3,
			container
			{
				capacity = 35,
				test = Vehicles.ContainerAccess.Tire,
				contentType = Air,
			}
			table install
			{
				items
				{
					1
					{
						type = Base.Jack,
						count = 1,
						keep = true,
					}
					2
					{
						tags = LugWrench,
						count = 1,
						keep = true,
						equip = primary,
					}
				}
				time = 400,
				skills = Mechanics:1,
				test = Vehicles.InstallTest.Default,
				complete = Vehicles.InstallComplete.Tire,
			}
			table uninstall
			{
				items
				{
					1
					{
						type = Base.Jack,
						count = 1,
						keep = true,
					}
					2
					{
						tags = LugWrench,
						count = 1,
						keep = true,
						equip = primary,
					}
				}
				time = 400,
				skills = Mechanics:1,
				test = Vehicles.UninstallTest.Default,
				complete = Vehicles.UninstallComplete.Tire,
			}

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