mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
23 lines
627 B
Plaintext
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;
|
|
}; |