module Base
{

	model 49powerWagonwindowfl
	{
		mesh = vehicles/Vehicles_49powerWagon_Body|power_window_fl,
		shader = damn_vehicle_shader,
		static = FALSE,
		scale = 0.1,
		boneWeight = window_fl_bone 1.0,
	}

	model 49powerWagonwindowfr
	{
		mesh = vehicles/Vehicles_49powerWagon_Body|power_window_fr,
		shader = damn_vehicle_shader,
		static = FALSE,
		scale = 0.1,
		boneWeight = window_fr_bone 1.0,
	}

	model 49powerWagonwindowrl
	{
		mesh = vehicles/Vehicles_49powerWagon_Body|power_window_rl,
		shader = damn_vehicle_shader,
		static = FALSE,
		scale = 0.1,
		boneWeight = window_rl_bone 1.0,
	}

	model 49powerWagonwindowrr
	{
		mesh = vehicles/Vehicles_49powerWagon_Body|power_window_rr,
		shader = damn_vehicle_shader,
		static = FALSE,
		scale = 0.1,
		boneWeight = window_rr_bone 1.0,
	}

	template vehicle PWRWindows
	{
		part WindowFrontLeft
		{
			model windowFL
			{
				file = 49powerWagonwindowfl,
			}

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

			parent = DoorFrontLeft,
			area = SeatFrontLeft,
			itemType = Base.49powerWagonSideWindow,
			table install
			{
				requireInstalled = DoorFrontLeft,
			}
			table uninstall
				{
				requireUninstalled = PWRDoorLeftArmor,
				}
		}

		part WindowFrontRight
		{
			model windowFR
			{
				file = 49powerWagonwindowfr,
			}

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

			parent = DoorFrontRight,
			area = SeatFrontRight,
			itemType = Base.49powerWagonSideWindow,
			table install
			{
				requireInstalled = DoorFrontRight,
			}
			table uninstall
				{
				requireUninstalled = PWRDoorRightArmor,
				}
		}

		part WindowRearLeft
		{
			model windowRL
			{
				file = 49powerWagonwindowrl,
			}

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

			parent = DoorRearLeft,
			area = SeatRearLeft,
			itemType = Base.49powerWagonSideWindow,
			table install
			{
				requireInstalled = DoorRearLeft,
			}
			table uninstall
				{
				requireUninstalled = PWRDoorLeftArmor,
				}
		}

		part WindowRearRight
		{
			model windowRR
			{
				file = 49powerWagonwindowrr,
			}

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

			parent = DoorRearRight,
			area = SeatRearRight,
			itemType = Base.49powerWagonSideWindow,
			table install
			{
				requireInstalled = DoorRearRight,
			}
			table uninstall
				{
				requireUninstalled = PWRDoorRightArmor,
				}
		}

		part Window*
		{
			category = door,
			mechanicRequireKey = true,
            durability = 2,
			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,
			}
		}
	}
}

