module Base
{

	model 89dodgeCaravanWindowfl
	{
		mesh = vehicles/Vehicles_89dodgeCaravan_Body|caravan_window_fl,
		shader = damn_vehicle_shader,
		static = FALSE,
		scale = 0.1,
		boneWeight = window_fl_bone 1.0,
	}

	model 89dodgeCaravanWindowfr
	{
		mesh = vehicles/Vehicles_89dodgeCaravan_Body|caravan_window_fr,
		shader = damn_vehicle_shader,
		static = FALSE,
		scale = 0.1,
		boneWeight = window_fr_bone 1.0,
	}

	model 89dodgeCaravanWindowrl
	{
		mesh = vehicles/Vehicles_89dodgeCaravan_Body|caravan_window_rl,
		shader = damn_vehicle_shader,
		scale = 0.1,
	}

	model 89dodgeCaravanWindowrr
	{
		mesh = vehicles/Vehicles_89dodgeCaravan_Body|caravan_window_rr,
		shader = damn_vehicle_shader,
		static = FALSE,
		scale = 0.1,
		boneWeight = window_rr_bone 1.0,
	}

	model 89dodgeCaravanWindowbl
	{
		mesh = vehicles/Vehicles_89dodgeCaravan_Body|caravan_window_bl,
		shader = damn_vehicle_shader,
		scale = 0.1,
	}

	model 89dodgeCaravanWindowbr
	{
		mesh = vehicles/Vehicles_89dodgeCaravan_Body|caravan_window_br,
		shader = damn_vehicle_shader,
		scale = 0.1,
	}

	template vehicle DGC89Windows
	{
		part WindowFrontLeft
		{
			model windowFL
			{
				file = 89dodgeCaravanWindowfl,
			}

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

			window
			{
				openable = true,
			}

			parent = DoorFrontLeft,
			area = SeatFrontLeft,
			itemType = Base.89dodgeCaravanFrontSideWindow,
			table install
			{
				requireInstalled = DoorFrontLeft,
			}
			table uninstall
				{
				requireUninstalled = DGC89FrontLeftArmor,
				}
		}

		part WindowFrontRight
		{
			model windowFR
			{
				file = 89dodgeCaravanWindowfr,
			}

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

			window
			{
				openable = true,
			}

			parent = DoorFrontRight,
			area = SeatFrontRight,
			itemType = Base.89dodgeCaravanFrontSideWindow,
			table install
			{
				requireInstalled = DoorFrontRight,
			}
			table uninstall
				{
				requireUninstalled = DGC89FrontRightArmor,
				}
		}

		part WindowRearLeft
		{
			model windowRL
			{
				file = 89dodgeCaravanWindowrl,
			}

			window
			{
				openable = false,
			}

			area = SeatRearLeft,
			itemType = Base.89dodgeCaravanRearSideWindow,

			table uninstall
				{
				requireUninstalled = DGC89RearLeftArmor,
				}
		}

		part WindowRearRight
		{
			model windowRR
			{
				file = 89dodgeCaravanWindowrr,
			}

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

			window
			{
				openable = false,
			}

			parent = DoorRearRight,
			area = SeatRearRight,
			itemType = Base.89dodgeCaravanRearSideWindow,
			table install
			{
				requireInstalled = DoorRearRight,
			}
			table uninstall
				{
				requireUninstalled = DGC89RearRightArmor,
				}
		}

		part WindowBackLeft
		{
			model windowBL
			{
				file = 89dodgeCaravanWindowbl,
			}

			window
			{
				openable = false,
			}

			area = SeatRearLeft,
			itemType = Base.89dodgeCaravanRearSideWindow,
			table uninstall
				{
				requireUninstalled = DGC89BackLeftArmor,
				}
		}

		part WindowBackRight
		{
			model windowBR
			{
				file = 89dodgeCaravanWindowbr,
			}

			window
			{
				openable = false,
			}

			area = SeatRearRight,
			itemType = Base.89dodgeCaravanRearSideWindow,

			table uninstall
				{
				requireUninstalled = DGC89BackRightArmor,
				}
		}

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

