module Base
{

	model 86chevyCUCVWindowfl
	{
		mesh = vehicles/Vehicles_86chevyCUCV_Body|86cucv_window_fl,
		shader = damn_vehicle_shader,
		static = FALSE,
		scale = 0.1,
		boneWeight = window_fl_bone 1.0,
	}

	model 86chevyCUCVWindowfr
	{
		mesh = vehicles/Vehicles_86chevyCUCV_Body|86cucv_window_fr,
		shader = damn_vehicle_shader,
		static = FALSE,
		scale = 0.1,
		boneWeight = window_fr_bone 1.0,
	}

    model 86chevyCUCVWindowbl
	{
		mesh = vehicles/Vehicles_86chevyCUCV_Body|86blazer_window_rl,
		shader = damn_vehicle_shader,
		scale = 0.1,
	}

	model 86chevyCUCVWindowbr
	{
		mesh = vehicles/Vehicles_86chevyCUCV_Body|86blazer_window_rr,
		shader = damn_vehicle_shader,
		scale = 0.1,
	}

	template vehicle CUCV86Windows
	{
		part WindowFrontLeft
		{
			model windowFL
			{
				file = 86chevyCUCVWindowfl,
			}

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

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

		part WindowFrontRight
		{
			model windowFR
			{
				file = 86chevyCUCVWindowfr,
			}

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

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

		part WindowFront*
		{
			category = door,
			mechanicRequireKey = true,
            durability = 2,
			window
			{
				openable = true,
			}
			table install
			{
				items
				{
					1
					{
						tags = 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
					{
						tags = 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 M1009WindowsBack
	{
		part WindowBackLeft
		{
			model windowBL
			{
				file = 86chevyCUCVWindowbl,
			}

			area = SeatRearLeft,
			itemType = Base.3rdGenChevyCKseriesBackSideWindow,

			table uninstall
				{
				requireUninstalled = DAMNBackLeftArmor,
				}
		}

		part WindowBackRight
		{
			model windowBR
			{
				file = 86chevyCUCVWindowbr,
			}

			area = SeatRearRight,
			itemType = Base.3rdGenChevyCKseriesBackSideWindow,

			table uninstall
				{
				requireUninstalled = DAMNBackRightArmor,
				}
		}

		part WindowBack*
		{
			category = door,
			mechanicRequireKey = true,
            durability = 2,
			window
			{
				openable = true,
			}
			table install
			{
				items
				{
					1
					{
						tags = 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
					{
						tags = 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,
			}
		}
	}
}

