module Base
{
	repeat
	model SVU_RL_Window_[LABEL][Postfix]_Light_a
 	{
		mesh = vehicles/[FILENAME]|windowrearlightleft[Postfix],
		shader = vehicle_armor,
 		scale = [SCALE],
		static = FALSE,
 	}
	model SVU_RL_Window_[LABEL][Postfix]_Light_Spiked_a
	{
		mesh = vehicles/[FILENAME]|windowrearlightspikedleft[Postfix],
        texture = Vehicles/puv_parts,
        shader = vehicle_armor,
        scale = [SCALE],
		static = FALSE,
	}
	model SVU_RL_Window_[LABEL][Postfix]_Heavy_a
	{
		mesh = vehicles/[FILENAME]|windowrearheavyleft[Postfix],
		texture = Vehicles/puv_parts,
		shader = vehicle_armor,
		scale = [SCALE],
		static = FALSE,
	}
	model SVU_RL_Window_[LABEL][Postfix]_Heavy_Spiked_a
	{
		mesh = vehicles/[FILENAME]|windowrearheavyspikedleft[Postfix],
		texture = Vehicles/puv_parts,
		shader = vehicle_armor,
		scale = [SCALE],
		static = FALSE,
	}
	model SVU_RL_Window_[LABEL][Postfix]_Reinforced_a
	{
		mesh = vehicles/[FILENAME]|windowrearreinforcedleft[Postfix],
		texture = Vehicles/puv_parts,
		shader = vehicle_armor,
		scale = [SCALE],
		static = FALSE,
	}
checkprop: Middle
	template vehicle PU_armor_[LABEL][Postfix]_doorwindowsML {
        part ATA2ProtectionWindowMiddleLeft
		{
			parent = DoorMiddleLeft,
			model anchorNormal {
				file = VVA_SVU_Dummy,
			}
			model anchorRusted {
				file = VVA_SVU_DummyRust,
			}
			model Light
			{
				file = SVU_RL_Window_[LABEL][Postfix]_Light_a,
			}
			model Heavy
			{
				file = SVU_RL_Window_[LABEL][Postfix]_Heavy_a,
			}
			model LightSpiked
			{
				file = SVU_RL_Window_[LABEL][Postfix]_Light_Spiked_a,
			}
			model HeavySpiked
			{
				file = SVU_RL_Window_[LABEL][Postfix]_Heavy_Spiked_a,
			}
			model LightRusted
			{
				file = SVU_RL_Window_[LABEL][Postfix]_Light_a,
			}
			model HeavyRusted
			{
				file = SVU_RL_Window_[LABEL][Postfix]_Heavy_a,
			}
			model LightSpikedRusted
			{
				file = SVU_RL_Window_[LABEL][Postfix]_Light_Spiked_a,
			}
			model HeavySpikedRusted
			{
				file = SVU_RL_Window_[LABEL][Postfix]_Heavy_Spiked_a,
			}
			model Reinforced
			{
				file = SVU_RL_Window_[LABEL][Postfix]_Reinforced_a,
			}
			model ReinforcedRusted
			{
				file = SVU_RL_Window_[LABEL][Postfix]_Reinforced_a,
			}

			table install
            {
            	complete = ATATuning2.InstallComplete.AnchorTuning,
            }
            table uninstall
            {
            	complete = ATATuning2.UninstallComplete.AnchorTuning,
            }
            lua
            {
            	create = ATATuning2.Create.AnchorTuning,
        		init = ATATuning2.Init.AnchorTuning,
        		update = ATATuning2.Update.Protection,
            }
		}
    }
	setflag: windowML
end
checkprop: Rear, !Middle
    template vehicle PU_armor_[LABEL][Postfix]_doorwindowsRL {
        part ATA2ProtectionWindowRearLeft
		{
			parent = DoorRearLeft,
			model anchorNormal {
				file = VVA_SVU_Dummy,
			}
			model anchorRusted {
				file = VVA_SVU_DummyRust,
			}
			model Light
			{
				file = SVU_RL_Window_[LABEL][Postfix]_Light_a,
			}
			model Heavy
			{
				file = SVU_RL_Window_[LABEL][Postfix]_Heavy_a,
			}
			model LightSpiked
			{
				file = SVU_RL_Window_[LABEL][Postfix]_Light_Spiked_a,
			}
			model HeavySpiked
			{
				file = SVU_RL_Window_[LABEL][Postfix]_Heavy_Spiked_a,
			}
			model LightRusted
			{
				file = SVU_RL_Window_[LABEL][Postfix]_Light_a,
			}
			model HeavyRusted
			{
				file = SVU_RL_Window_[LABEL][Postfix]_Heavy_a,
			}
			model LightSpikedRusted
			{
				file = SVU_RL_Window_[LABEL][Postfix]_Light_Spiked_a,
			}
			model HeavySpikedRusted
			{
				file = SVU_RL_Window_[LABEL][Postfix]_Heavy_Spiked_a,
			}
			model Reinforced
			{
				file = SVU_RL_Window_[LABEL][Postfix]_Reinforced_a,
			}
			model ReinforcedRusted
			{
				file = SVU_RL_Window_[LABEL][Postfix]_Reinforced_a,
			}

			table install
            {
            	complete = ATATuning2.InstallComplete.AnchorTuning,
            }
            table uninstall
            {
            	complete = ATATuning2.UninstallComplete.AnchorTuning,
            }
            lua
            {
            	create = ATATuning2.Create.AnchorTuning,
        		init = ATATuning2.Init.AnchorTuning,
        		update = ATATuning2.Update.Protection,
            }
		}
    }
	setflag: windowRL
end
	endrepeat
}