Make it work

This commit is contained in:
PabstMirror 2015-04-01 15:09:05 -05:00
parent 1303f59cd8
commit 4e66aea25d
3 changed files with 15 additions and 15 deletions

View File

@ -5,7 +5,6 @@ ADDON = false;
PREP(getMagazineChildren);
PREP(magazineRepackFinish);
PREP(magazineRepackProgress);
PREP(openSelectMagazineUI);
PREP(simulateRepackEvents);
PREP(startRepackingMagazine);

View File

@ -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);

View File

@ -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;