/* * Author: PabstMirror * Verifies magazines moved with exact ammo counts preserved. * Arrays will be in format from magazinesAmmo/magazinesAmmoCargo * e.g.: [["30Rnd_65x39_caseless_mag",15], ["30Rnd_65x39_caseless_mag",30]] * * Arguments: * 0: Start on container A * 1: End on container A * 2: Start on container B * 3: End on container B * * Return Value: * Verified Good * * Example: * [stuff] call ace_disarming_fnc_verifyMagazinesMoved * * Public: No */ #include "script_component.hpp" private ["_problem", "_beginingArray"]; PARAMS_4(_startA,_endA,_startB,_endB); //Quick Lazy Count Check if (((count _startA) + (count _startB)) != ((count _endA) + (count _endB))) exitWith { false }; _beginingArray = (_startA + _startB); _problem = false; { _index = _beginingArray find _x; if (_index == -1) exitWith {_problem = true;}; _beginingArray deleteAt _index; } forEach (_endA + _endB); (!_problem) && {_beginingArray isEqualTo []}