module Base
{

	model 89dodgeCaravanWheelStock
	{
		mesh = vehicles/Vehicles_89dodgeCaravan_Wheels|caravan_tire_stock,
		texture = vehicles/Vehicles_89dodgeCaravan_Wheel_stock,
		shader = damn_wheel_shader,
		scale = 0.1,
	}

	model 89dodgeCaravanWheelNomad
	{
		mesh = vehicles/Vehicles_89dodgeCaravan_Wheels|caravan_tire_nomad,
		texture = vehicles/Vehicles_89dodgeCaravan_Wheel_offroad,
		shader = damn_wheel_shader,
		scale = 0.1,
	}

    model 89dodgeCaravan1L
	{
		mesh = vehicles/Vehicles_damnBasic_tires|damn_stock_tire0,
		texture = vehicles/Vehicles_damnBasic_Wheel1,
		shader = damn_wheel_shader,
		scale = 0.106,
	}
    model 89dodgeCaravan1R
	{
		mesh = vehicles/Vehicles_damnBasic_tires|damn_stock_tire0,
		texture = vehicles/Vehicles_damnBasic_Wheel1,
		shader = damn_wheel_shader,
		scale = 0.106,
        invertX = TRUE,
	}

	template vehicle DGC89Tires
	{
		part TireFrontLeft
		{
            model DGCTireN
			{
				file = 89dodgeCaravanWheelNomad,
			}

			model DGCTireS
			{
				file = 89dodgeCaravanWheelStock,
			}

            model DMTireSL
			{
				file = 89dodgeCaravan1L,
			}

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

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

		}

		part TireFrontRight
		{
            model DGCTireN
			{
				file = 89dodgeCaravanWheelNomad,
			}

			model DGCTireS
			{
				file = 89dodgeCaravanWheelStock,
			}

            model DMTireSR
			{
				file = 89dodgeCaravan1R,
			}

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

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

		part TireRearLeft
		{
            model DGCTireN
			{
				file = 89dodgeCaravanWheelNomad,
			}

			model DGCTireS
			{
				file = 89dodgeCaravanWheelStock,
			}

            model DMTireSL
			{
				file = 89dodgeCaravan1L,
			}

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

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

		part TireRearRight
		{
            model DGCTireN
			{
				file = 89dodgeCaravanWheelNomad,
			}

			model DGCTireS
			{
				file = 89dodgeCaravanWheelStock,
			}

            model DMTireSR
			{
				file = 89dodgeCaravan1R,
			}

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

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

		part Tire*
		{
			category = tire,
			specificItem = false,
			itemType = Base.89dodgeCaravanTireOffroad2;Base.89dodgeCaravanTire1;damnCraft.SmallTire1,
            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,

			}

		}
	}
}

