mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Make it work
This commit is contained in:
parent
1303f59cd8
commit
4e66aea25d
@ -5,7 +5,6 @@ ADDON = false;
|
||||
PREP(getMagazineChildren);
|
||||
PREP(magazineRepackFinish);
|
||||
PREP(magazineRepackProgress);
|
||||
PREP(openSelectMagazineUI);
|
||||
PREP(simulateRepackEvents);
|
||||
PREP(startRepackingMagazine);
|
||||
|
||||
|
@ -35,19 +35,20 @@ _structuredOutputText = if (_errorCode == 0) then {
|
||||
_picture = getText (configFile >> "CfgMagazines" >> _magazineClassname >> "picture");
|
||||
_structuredOutputText = _structuredOutputText + format ["<img align='center' size='1.8' color='#ffffff' image='%1'/> <br/>", _picture];
|
||||
|
||||
_fullMags = 0;
|
||||
_partialMags = 0;
|
||||
{
|
||||
EXPLODE_2_PVT(_x,_xClassname,_xCount);
|
||||
if ((_xClassname == _magazineClassname) && {_xCount > 0}) then {
|
||||
if (_xCount == _fullMagazineCount) then {
|
||||
_fullMags = _fullMags + 1;
|
||||
} else {
|
||||
_partialMags = _partialMags + 1;
|
||||
};
|
||||
};
|
||||
} forEach (magazinesAmmoFull ACE_player);
|
||||
//EFUNC(common,displayTextStructured) doesn't have room for this, and I don't think it's nessacary, can fix in the future if wanted:
|
||||
|
||||
_structuredOutputText = _structuredOutputText + format [("<t align='center'>" + (localize "STR_ACE_MagazineRepack_RepackedMagazinesCount") + "</t>"), _fullMags, _partialMags];
|
||||
// _fullMags = 0;
|
||||
// _partialMags = 0;
|
||||
// {
|
||||
// EXPLODE_2_PVT(_x,_xClassname,_xCount);
|
||||
// if ((_xClassname == _magazineClassname) && {_xCount > 0}) then {
|
||||
// if (_xCount == _fullMagazineCount) then {
|
||||
// _fullMags = _fullMags + 1;
|
||||
// } else {
|
||||
// _partialMags = _partialMags + 1;
|
||||
// };
|
||||
// };
|
||||
// } forEach (magazinesAmmoFull ACE_player);
|
||||
// _structuredOutputText = _structuredOutputText + format [("<t align='center'>" + (localize "STR_ACE_MagazineRepack_RepackedMagazinesCount") + "</t>"), _fullMags, _partialMags];
|
||||
|
||||
[parseText _structuredOutputText] call EFUNC(common,displayTextStructured);
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
private ["_fullMagazineCount", "_startingAmmoCounts", "_simEvents", "_totalTime", "_magazineCfg"];
|
||||
|
||||
PARAMS_2(_target,_player,_magazineClassname);
|
||||
PARAMS_3(_target,_player,_magazineClassname);
|
||||
|
||||
if (isNil "_magazineClassname" || {_magazineClassname == ""}) exitWith {ERROR("Bad Mag Classname");};
|
||||
_magazineCfg = configfile >> "CfgMagazines" >> _magazineClassname;
|
||||
|
Loading…
Reference in New Issue
Block a user