mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Cache dogtag actions (#6625)
This commit is contained in:
parent
98bf92f406
commit
9aa34ab462
@ -17,17 +17,22 @@
|
||||
|
||||
params ["_player"];
|
||||
|
||||
private _cfgWeapons = configFile >> "CfgWeapons";
|
||||
private _actions = [];
|
||||
private _fnc_getActions = {
|
||||
private _actions = [];
|
||||
private _cfgWeapons = configFile >> "CfgWeapons";
|
||||
|
||||
{
|
||||
private _config = _cfgWeapons >> _x;
|
||||
if (getNumber (_config >> QGVAR(tagID)) > 0) then {
|
||||
private _displayName = getText (_config >> "displayName");
|
||||
private _picture = getText (_config >> "picture");
|
||||
private _action = [_x, _displayName, _picture, {_this call FUNC(checkDogtagItem)}, {true}, {}, _x] call EFUNC(interact_menu,createAction);
|
||||
_actions pushBack [_action, [], _player];
|
||||
};
|
||||
} forEach (_player call EFUNC(common,uniqueItems));
|
||||
{
|
||||
private _config = _cfgWeapons >> _x;
|
||||
if (getNumber (_config >> QGVAR(tagID)) > 0) then {
|
||||
private _displayName = getText (_config >> "displayName");
|
||||
private _picture = getText (_config >> "picture");
|
||||
|
||||
_actions
|
||||
private _action = [_x, _displayName, _picture, FUNC(checkDogtagItem), {true}, {}, _x] call EFUNC(interact_menu,createAction);
|
||||
_actions pushBack [_action, [], _player];
|
||||
};
|
||||
} forEach (_player call EFUNC(common,uniqueItems));
|
||||
|
||||
_actions
|
||||
};
|
||||
|
||||
[[], _fnc_getActions, _player, QGVAR(actionsCache), 9999, "cba_events_loadoutEvent"] call EFUNC(common,cachedCall);
|
||||
|
Loading…
Reference in New Issue
Block a user