ACE3/TO_MERGE/ace/arty_ammunition/fnc_openPrepDialog.sqf

23 lines
627 B
Plaintext

//#define DEBUG_MODE_FULL
#include "script_component.hpp"
private["_cargoArray", "_isRound"];
TRACE_1("", _this);
// dont open the dialog if there are no arty rounds in thebox
PARAMS_1(_ammoCrate);
GVAR(currentAmmoCrate) = _ammoCrate;
_cargoArray = getMagazineCargo _ammoCrate;
_isRound = false;
{
_isRound = [_x, "ace_arty_howitzer_default", "CfgMagazines"] call FUNC(isKindOf);
if (_isRound) exitWith { };
} foreach (_cargoArray select 0);
if (_isRound) then {
createDialog "ace_arty_ammoprep_Display";
} else {
hintSilent "No artillery munitions in this box.";
GVAR(currentAmmoCrate) = nil;
};