module Base
{

	model 89fordBroncowindowfl
	{
		mesh = vehicles/Vehicles_89fordBronco_Body|89bronco_window_fl,
		shader = damn_vehicle_shader,
		static = FALSE,
		scale = 0.1,
		boneWeight = window_fl_bone 1.0,
	}

	model 89fordBroncowindowfr
	{
		mesh = vehicles/Vehicles_89fordBronco_Body|89bronco_window_fr,
		shader = damn_vehicle_shader,
		static = FALSE,
		scale = 0.1,
		boneWeight = window_fr_bone 1.0,
	}

	model 89fordBroncowindowrl
	{
		mesh = vehicles/Vehicles_89fordBronco_Body|89bronco_window_rl,
		shader = damn_vehicle_shader,
		scale = 0.1,
	}

	model 89fordBroncowindowrr
	{
		mesh = vehicles/Vehicles_89fordBronco_Body|89bronco_window_rr,
		shader = damn_vehicle_shader,
		scale = 0.1,
	}

	template vehicle BR89Windows
	{
		part WindowFrontLeft
		{
			model windowFL433
			{
				file = 89fordBroncowindowfl,
			}

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

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

		part WindowFrontRight
		{
			model windowFR54
			{
				file = 89fordBroncowindowfr,
			}

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

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

		part WindowRearLeft
		{
			model windowRL34
			{
				file = 89fordBroncowindowrl,
			}

			area = TireRearLeft,
			itemType = Base.89BroncoWindowSideRear,
			table install
			{
				requireInstalled = BR89BedCover,
			}
			table uninstall
				{
				requireUninstalled = DAMNRearLeftArmor,
				}
		}

		part WindowRearRight
		{
			model windowRR124
			{
				file = 89fordBroncowindowrr,
			}

			area = TireRearRight,
			itemType = Base.89BroncoWindowSideRear,
			table install
			{
				requireInstalled = BR89BedCover,
			}
			table uninstall
				{
				requireUninstalled = DAMNRearRightArmor,
				}
		}

		part WindowFront*
		{
			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,
			}
		}

		part WindowRear*
		{
			category = door,
			mechanicRequireKey = true,
            durability = 2,
			window
			{
				openable = false,
			}
			table install
			{
				items
				{
					1
					{
						type = Base.Screwdriver,
						count = 1,
						keep = true,
						equip = primary,
					}
				}
				time = 500,
				skills = Mechanics:3,
				recipes = Intermediate Mechanics,
				test = DAMN.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 = DAMN.UninstallTest.Default,
				complete = Vehicles.UninstallComplete.Default,
			}
			lua
			{
				create = Vehicles.Create.Window,
				init = Vehicles.Init.Window,
			}
		}
	}
}

