mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Should avoid potential conflicts of IED codes.
This commit is contained in:
parent
749d068d2d
commit
4d38e19f8c
@ -29,12 +29,16 @@ _detonators = [_unit] call FUNC(getDetonators);
|
||||
_hasRequired = false;
|
||||
};
|
||||
} count _requiredItems;
|
||||
private ["_code", "_count"];
|
||||
_code = str(round (random 9999));
|
||||
_count = 4 - count (toArray _code);
|
||||
while {_count > 0} do {
|
||||
_code = "0" + _code;
|
||||
_count = _count - 1;
|
||||
private ["_code", "_count", "_codeSet"];
|
||||
_codeSet = false;
|
||||
while {!_codeSet} do {
|
||||
_code = str(round (random 9999));
|
||||
_count = 4 - count (toArray _code);
|
||||
while {_count > 0} do {
|
||||
_code = "0" + _code;
|
||||
_count = _count - 1;
|
||||
};
|
||||
_codeSet = (isNull [objNull,_code] call FUNC(getSpeedDialExplosive));
|
||||
};
|
||||
if (isNil QGVAR(CellphoneIEDs)) then {
|
||||
GVAR(CellphoneIEDs) = [];
|
||||
|
Loading…
Reference in New Issue
Block a user