module Base
{

	model 84cadillacDeVilleWindowfl
	{
		mesh = vehicles/Vehicles_84cadillacDeVille_Body|deville_sedan_window_fl,
		shader = damn_vehicle_shader,
		static = FALSE,
		scale = 0.1,
	}

	model 84cadillacDeVilleWindowfr
	{
		mesh = vehicles/Vehicles_84cadillacDeVille_Body|deville_sedan_window_fr,
		shader = damn_vehicle_shader,
		static = FALSE,
		scale = 0.1,
	}

	model 84cadillacDeVilleWindowrl
	{
		mesh = vehicles/Vehicles_84cadillacDeVille_Body|84c-platform_sedan_window_rl,
		shader = damn_vehicle_shader,
		static = FALSE,
		scale = 0.1,
	}

	model 84cadillacDeVilleWindowrr
	{
		mesh = vehicles/Vehicles_84cadillacDeVille_Body|84c-platform_sedan_window_rr,
		shader = damn_vehicle_shader,
		static = FALSE,
		scale = 0.1,
	}

    model 84cadillacDeVilleWindowflC
	{
		mesh = vehicles/Vehicles_84cadillacDeVille_Body|deville_coupe_window_fl,
		shader = damn_vehicle_shader,
		static = FALSE,
		scale = 0.1,
	}

	model 84cadillacDeVilleWindowfrC
	{
		mesh = vehicles/Vehicles_84cadillacDeVille_Body|deville_coupe_window_fr,
		shader = damn_vehicle_shader,
		static = FALSE,
		scale = 0.1,
	}

    model 84cadillacDeVilleWindowrlC
	{
		mesh = vehicles/Vehicles_84cadillacDeVille_Body|84c-platform_coupe_window_rl,
		shader = damn_vehicle_shader,
		scale = 0.1,
	}

	model 84cadillacDeVilleWindowrrC
	{
		mesh = vehicles/Vehicles_84cadillacDeVille_Body|84c-platform_coupe_window_rr,
		shader = damn_vehicle_shader,
		scale = 0.1,
	}

	template vehicle DEV84Windows
	{
		part WindowFrontLeft
		{
			model windowFL
			{
				file = 84cadillacDeVilleWindowfl,
			}

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

			parent = DoorFrontLeft,
			area = SeatFrontLeft,
			itemType = Base.84gmCbodyFrontSideWindow,
			table install
			{
				requireInstalled = DoorFrontLeft,
			}
			table uninstall
				{
				requireUninstalled = DAMNFrontLeftArmor,
				}
		}

		part WindowFrontRight
		{
			model windowFR
			{
				file = 84cadillacDeVilleWindowfr,
			}

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

			parent = DoorFrontRight,
			area = SeatFrontRight,
			itemType = Base.84gmCbodyFrontSideWindow,
			table install
			{
				requireInstalled = DoorFrontRight,
			}
			table uninstall
				{
				requireUninstalled = DAMNFrontRightArmor,
				}
		}

		part WindowRearLeft
		{
			model windowRL
			{
				file = 84cadillacDeVilleWindowrl,
			}

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

			parent = DoorRearLeft,
			area = SeatRearLeft,
			itemType = Base.84gmCbodyRearSideWindow,
			table install
			{
				requireInstalled = DoorRearLeft,
			}
			table uninstall
				{
				requireUninstalled = DAMNRearLeftArmor,
				}
		}

		part WindowRearRight
		{
			model windowRR
			{
				file = 84cadillacDeVilleWindowrr,
			}

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

			parent = DoorRearRight,
			area = SeatRearRight,
			itemType = Base.84gmCbodyRearSideWindow,
			table install
			{
				requireInstalled = DoorRearRight,
			}
			table uninstall
				{
				requireUninstalled = DAMNRearRightArmor,
				}
		}

		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,
			}
		}
	}

    template vehicle DEV84WindowsCoupe
	{
		part WindowFrontLeft
		{
			model windowFL
			{
				file = 84cadillacDeVilleWindowflC,
			}

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

			parent = DoorFrontLeft,
			area = SeatFrontLeft,
			itemType = Base.84gmCbodyFrontSideWindow,
			table install
			{
				requireInstalled = DoorFrontLeft,
			}
			table uninstall
				{
				requireUninstalled = DAMNFrontLeftArmor,
				}
		}

		part WindowFrontRight
		{
			model windowFR
			{
				file = 84cadillacDeVilleWindowfrC,
			}

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

			parent = DoorFrontRight,
			area = SeatFrontRight,
			itemType = Base.84gmCbodyFrontSideWindow,
			table install
			{
				requireInstalled = DoorFrontRight,
			}
			table uninstall
				{
				requireUninstalled = DAMNFrontRightArmor,
				}
		}

		part WindowRearLeft
		{
			model windowRL
			{
				file = 84cadillacDeVilleWindowrlC,
			}

			area = SeatRearLeft,
			itemType = Base.84gmCbodyCoupeRearSideWindow,

			table uninstall
				{
				requireUninstalled = DAMNRearLeftArmor,
				}
		}

		part WindowRearRight
		{
			model windowRR
			{
				file = 84cadillacDeVilleWindowrrC,
			}

			area = SeatRearRight,
			itemType = Base.84gmCbodyCoupeRearSideWindow,

			table uninstall
				{
				requireUninstalled = DAMNRearRightArmor,
				}
		}

		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,
			}
		}
	}
}