mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Use the correct CBA function name, defining it in ACE as long as it doesn't exist already.
This commit is contained in:
parent
d886289716
commit
62f598b2a6
@ -4,14 +4,16 @@ ADDON = false;
|
||||
|
||||
#include "XEH_PREP.hpp"
|
||||
|
||||
FakeCBA_fnc_getMagazineIds = {
|
||||
params [["_unit", objNull, [objNull]], ["_magazine", "", [""]]];
|
||||
if (isNil "CBA_fnc_getMagazineIds") then {
|
||||
CBA_fnc_getMagazineIds = {
|
||||
params [["_unit", objNull, [objNull]], ["_magazine", "", [""]]];
|
||||
|
||||
private _displayName = getText (configFile >> "CfgMagazines" >> _magazine >> "displayName");
|
||||
private _displayName = getText (configFile >> "CfgMagazines" >> _magazine >> "displayName");
|
||||
|
||||
if (_displayName isEqualTo "") exitWith {[]};
|
||||
if (_displayName isEqualTo "") exitWith {[]};
|
||||
|
||||
magazinesDetail _unit select {_x find _displayName == 0} apply {_x = _x splitString "[:]"; _x select (count _x - 1)};
|
||||
magazinesDetail _unit select {_x find _displayName == 0} apply {_x = _x splitString "[:]"; _x select (count _x - 1)};
|
||||
};
|
||||
};
|
||||
|
||||
ADDON = true;
|
||||
|
@ -21,7 +21,7 @@ params ["_unit", "_weapon", "_weaponTemp", "_barrelMass"];
|
||||
TRACE_4("loadCoolestSpareBarrel1",_unit,_weapon,_weaponTemp,_barrelMass);
|
||||
|
||||
// Find all spare barrel the player has
|
||||
private _allBarrels = [_unit, "ACE_SpareBarrel"] call FakeCBA_fnc_getMagazineIds;
|
||||
private _allBarrels = [_unit, "ACE_SpareBarrel"] call CBA_fnc_getMagazineIds;
|
||||
TRACE_1("_allBarrels",_allBarrels);
|
||||
if ((count _allBarrels) < 1) exitWith {};
|
||||
|
||||
|
@ -19,7 +19,7 @@ params ["_player","_unit"];
|
||||
|
||||
// Find all spare barrel the player has
|
||||
TRACE_2("sendSpareBarrelsTemperatureHunt",_player,_unit);
|
||||
private _allBarrels = [_unit, "ACE_SpareBarrel"] call FakeCBA_fnc_getMagazineIds;
|
||||
private _allBarrels = [_unit, "ACE_SpareBarrel"] call CBA_fnc_getMagazineIds;
|
||||
TRACE_1("_allBarrels",_allBarrels);
|
||||
if ((count _allBarrels) < 1) exitWith {};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user