Minor rearm fixes (#5572)

This commit is contained in:
PabstMirror 2017-09-30 11:14:41 -05:00 committed by GitHub
parent 45a66ccfa1
commit 5f8350d7bc
3 changed files with 6 additions and 7 deletions

View File

@ -15,6 +15,8 @@
*/
#include "script_component.hpp"
ACE_DEPRECATED(QFUNC(getHardpointMagazines),"3.12.0","getCompatiblePylonMagazines");
params ["_pylonConfig"];
private _return = GVAR(hardpointGroupsCache) getVariable (str _pylonConfig);

View File

@ -47,12 +47,9 @@ private _pylonConfigs = configProperties [configFile >> "CfgVehicles" >> (typeOf
private _currentRounds = _vehicle ammoOnPylon _pylonIndex;
if (_currentRounds < _maxRounds) then {
private _pylonTurret = getArray (_pylonConfig >> "turret");
// Converting to expected array for driver.
if (_pylonTurret isEqualTo []) then {_pylonTurret = [-1];};
// getPylonTurret expects 0 based index, and returns driver turret as [-1]
private _pylonTurret = [_vehicle, (_pylonIndex - 1)] call EFUNC(common,getPylonTurret);
_magazineInfo pushBack [_pylonMagazine, _pylonTurret, true, _pylonIndex, 1, 1, _maxRounds, [_currentRounds]];
};
};

View File

@ -31,7 +31,7 @@ if (GVAR(supply) == 1) then {
if (_supplyCount > 0 ) then {
[[LSTRING(Hint_RemainingSupplyPoints), _supplyCount], 2, _unit] call EFUNC(common,displayTextStructured);
} else {
[LSTRING(Hint_EmptySupplyPoints), 2, _unit] call EFUNC(common,displayTextStructured);
[LSTRING(Hint_Empty), 2, _unit] call EFUNC(common,displayTextStructured);
};
true
},