module Base
{
	model 86fordE150windowfl
	{
		mesh = vehicles/Vehicles_86fordE150_Body|e150_window_fl,
		shader = damn_vehicle_shader,
		static = FALSE,
		scale = 0.1,
		boneWeight = window_fl_bone 1.0,
	}

	model 86fordE150windowfr
	{
		mesh = vehicles/Vehicles_86fordE150_Body|e150_window_fr,
		shader = damn_vehicle_shader,
		static = FALSE,
		scale = 0.1,
		boneWeight = window_fr_bone 1.0,
	}

    model 86fordE150windowrl
	{
		mesh = vehicles/Vehicles_86fordE150_Body|e150_window_rl,
		shader = damn_vehicle_shader,
		static = FALSE,
		scale = 0.1,
		boneWeight = window_rl_bone 1.0,
	}

	model 86fordE150windowrr
	{
		mesh = vehicles/Vehicles_86fordE150_Body|e150_window_rr,
		shader = damn_vehicle_shader,
		static = FALSE,
		scale = 0.1,
		boneWeight = window_rr_bone 1.0,
	}

    model 86fordE150windowbl
	{
		mesh = vehicles/Vehicles_86fordE150_Body|e150_window_bl,
		shader = damn_vehicle_shader,
		scale = 0.1,
	}

	model 86fordE150windowbr
	{
		mesh = vehicles/Vehicles_86fordE150_Body|e150_window_br,
		shader = damn_vehicle_shader,
		scale = 0.1,
	}

	template vehicle E150Windows
	{
		part WindowFrontLeft
		{
			model windowFLl45164
			{
				file = 86fordE150windowfl,
			}

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

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

		part WindowFrontRight
		{
			model windowFR15647
			{
				file = 86fordE150windowfr,
			}

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

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

		part Window*
		{
			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 E150WindowsFull
	{
        template! = E150Windows,

        part WindowRearLeft
		{
			model windowRLl45164
			{
				file = 86fordE150windowrl,
			}
            window
			{
				openable = false,
			}

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

		part WindowRearRight
		{
			model windowRR15647
			{
				file = 86fordE150windowrr,
			}
            window
			{
				openable = false,
			}

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

        part WindowBackLeft
		{
			model windowBLl45164
			{
				file = 86fordE150windowbl,
			}
            window
			{
				openable = false,
			}

			area = SeatRearLeft,
			itemType = Base.E150RearSideWindow,
			table uninstall
				{
				requireUninstalled = DAMNBackLeftArmor,
				}
		}

		part WindowBackRight
		{
			model windowBR15647
			{
				file = 86fordE150windowbr,
			}
            window
			{
				openable = false,
			}

			area = SeatRearRight,
			itemType = Base.E150RearSideWindow,
			table uninstall
				{
				requireUninstalled = DAMNBackRightArmor,
				}
		}

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

