module Base
{

	model 84buickElectraWindowfl
	{
		mesh = vehicles/Vehicles_84buickElectra_Body|electra_sedan_window_fl,
		shader = damn_vehicle_shader,
		static = FALSE,
		scale = 0.1,
	}

	model 84buickElectraWindowfr
	{
		mesh = vehicles/Vehicles_84buickElectra_Body|electra_sedan_window_fr,
		shader = damn_vehicle_shader,
		static = FALSE,
		scale = 0.1,
	}

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

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

    model 84buickElectraWindowflC
	{
		mesh = vehicles/Vehicles_84buickElectra_Body|electra_coupe_window_fl,
		shader = damn_vehicle_shader,
		static = FALSE,
		scale = 0.1,
	}

	model 84buickElectraWindowfrC
	{
		mesh = vehicles/Vehicles_84buickElectra_Body|electra_coupe_window_fr,
		shader = damn_vehicle_shader,
		static = FALSE,
		scale = 0.1,
	}

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

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

	template vehicle ELE84Windows
	{
		part WindowFrontLeft
		{
			model windowFL
			{
				file = 84buickElectraWindowfl,
			}

			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 = 84buickElectraWindowfr,
			}

			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 = 84buickElectraWindowrl,
			}

			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 = 84buickElectraWindowrr,
			}

			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 ELE84WindowsCoupe
	{
		part WindowFrontLeft
		{
			model windowFL
			{
				file = 84buickElectraWindowflC,
			}

			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 = 84buickElectraWindowfrC,
			}

			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 = 84buickElectraWindowrlC,
			}

			area = SeatRearLeft,
			itemType = Base.84gmCbodyCoupeRearSideWindow,

			table uninstall
				{
				requireUninstalled = DAMNRearLeftArmor,
				}
		}

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

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