From 5f8350d7bcf1479c867eb07043206d552393fd34 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Sat, 30 Sep 2017 11:14:41 -0500 Subject: [PATCH] Minor rearm fixes (#5572) --- addons/rearm/functions/fnc_getHardpointMagazines.sqf | 2 ++ addons/rearm/functions/fnc_getNeedRearmMagazines.sqf | 9 +++------ addons/rearm/functions/fnc_readSupplyCounter.sqf | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/addons/rearm/functions/fnc_getHardpointMagazines.sqf b/addons/rearm/functions/fnc_getHardpointMagazines.sqf index 2a00fa8eb6..61a9591cd7 100644 --- a/addons/rearm/functions/fnc_getHardpointMagazines.sqf +++ b/addons/rearm/functions/fnc_getHardpointMagazines.sqf @@ -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); diff --git a/addons/rearm/functions/fnc_getNeedRearmMagazines.sqf b/addons/rearm/functions/fnc_getNeedRearmMagazines.sqf index c3ac8abfed..b4195bb966 100644 --- a/addons/rearm/functions/fnc_getNeedRearmMagazines.sqf +++ b/addons/rearm/functions/fnc_getNeedRearmMagazines.sqf @@ -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]]; }; }; diff --git a/addons/rearm/functions/fnc_readSupplyCounter.sqf b/addons/rearm/functions/fnc_readSupplyCounter.sqf index 5f1e37b466..a1b46862b9 100644 --- a/addons/rearm/functions/fnc_readSupplyCounter.sqf +++ b/addons/rearm/functions/fnc_readSupplyCounter.sqf @@ -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 },