module Base
{

	model 92fordCVPIWindowfl
	{
		mesh = vehicles/Vehicles_92fordCVPI_Body|vic92_window_fl,
		shader = damn_vehicle_shader,
		static = FALSE,
		scale = 0.1,
	}

	model 92fordCVPIWindowfr
	{
		mesh = vehicles/Vehicles_92fordCVPI_Body|vic92_window_fr,
		shader = damn_vehicle_shader,
		static = FALSE,
		scale = 0.1,
	}

	model 92fordCVPIWindowrl
	{
		mesh = vehicles/Vehicles_92fordCVPI_Body|vic92_window_rl,
		shader = damn_vehicle_shader,
		static = FALSE,
		scale = 0.1,
	}

	model 92fordCVPIWindowrr
	{
		mesh = vehicles/Vehicles_92fordCVPI_Body|vic92_window_rr,
		shader = damn_vehicle_shader,
		static = FALSE,
		scale = 0.1,
	}

	template vehicle CVPI92Windows
	{
		part WindowFrontLeft
		{
			model windowFL
			{
				file = 92fordCVPIWindowfl,
			}

			anim ClosedToOpen
			{
				anim = window_fl_opening,
				animate = FALSE,
			}

			parent = DoorFrontLeft,
			area = SeatFrontLeft,
			itemType = Base.92fordCVPIFrontSideWindow,
			table install
			{
				requireInstalled = DoorFrontLeft,
			}
			table uninstall
				{
				requireUninstalled = CVPI92WindowFrontLeftArmor,
				}
		}

		part WindowFrontRight
		{
			model windowFR
			{
				file = 92fordCVPIWindowfr,
			}

			anim ClosedToOpen
			{
				anim = window_fr_opening,
				animate = FALSE,
			}

			parent = DoorFrontRight,
			area = SeatFrontRight,
			itemType = Base.92fordCVPIFrontSideWindow,
			table install
			{
				requireInstalled = DoorFrontRight,
			}
			table uninstall
				{
				requireUninstalled = CVPI92WindowFrontRightArmor,
				}
		}

		part WindowRearLeft
		{
			model windowRL
			{
				file = 92fordCVPIWindowrl,
			}

			anim ClosedToOpen
			{
				anim = window_rl_opening,
				animate = FALSE,
			}

			parent = DoorRearLeft,
			area = SeatRearLeft,
			itemType = Base.92fordCVPIRearSideWindow,
			table install
			{
				requireInstalled = DoorRearLeft,
			}
			table uninstall
				{
				requireUninstalled = CVPI92WindowRearLeftArmor,
				}
		}

		part WindowRearRight
		{
			model windowRR
			{
				file = 92fordCVPIWindowrr,
			}

			anim ClosedToOpen
			{
				anim = window_rr_opening,
				animate = FALSE,
			}

			parent = DoorRearRight,
			area = SeatRearRight,
			itemType = Base.92fordCVPIRearSideWindow,
			table install
			{
				requireInstalled = DoorRearRight,
			}
			table uninstall
				{
				requireUninstalled = CVPI92WindowRearRightArmor,
				}
		}

		part Window*
		{
			category = door,
			mechanicRequireKey = true,
			window
			{
				openable = true,
			}
			table install
			{
				items
				{
					1
					{
						type = Base.Screwdriver,
						count = 1,
						keep = true,
						equip = primary,
					}
				}
				time = 500,
				skills = Mechanics:3,
				recipes = Intermediate Mechanics,
				test = Vehicles.InstallTest.Default,
				complete = Vehicles.InstallComplete.Window,
			}
			table uninstall
			{
				items
				{
					1
					{
						type = Base.Screwdriver,
						count = 1,
						keep = true,
						equip = primary,
					}
				}
				time = 500,
				skills = Mechanics:3,
				recipes = Intermediate Mechanics,
				test = Vehicles.UninstallTest.Default,
				complete = Vehicles.UninstallComplete.Default,
			}
			lua
			{
				create = Vehicles.Create.Window,
				init = Vehicles.Init.Window,
			}
		}
	}

}

