Skip to content

Commit

Permalink
dialogPaths
Browse files Browse the repository at this point in the history
  • Loading branch information
tuntematonjr committed Aug 8, 2022
1 parent d772f44 commit 9b602c0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion addons/firesupport/functions/fnc_open_dialog.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ private _variables = switch (playerSide) do {
};

//Add batteries
GVAR(dialogPaths) = [];
{
private _gunModule = _x;

private _gunName = _gunModule getVariable ["displayName", "Missing name"];;
private _gunClassname = _gunModule getVariable ["className", "Missing classname"];
private _gunCount = _gunModule getVariable ["gunCount", 1];
Expand All @@ -62,15 +62,19 @@ private _variables = switch (playerSide) do {
private _netID = _gunModule call BIS_fnc_netId;
tvSetData [ARTY_LIST_IDC, [_index], _netID];

private _ammoIndex = [];
{
private _obj = _x;
private _ammoforEachIndex = _ammoIndex pushBack _forEachIndex;
private _ammo = _obj getVariable "Ammo";
private _count = _obj getVariable "currentCount";
private _name = getText (configFile >> "CfgMagazines" >> _ammo >> "displayName");
private _indexAmmo = tvAdd [ARTY_LIST_IDC, [_index], _name];
private _netID = _obj call BIS_fnc_netId;
tvSetData [ARTY_LIST_IDC, [_index,_indexAmmo], _netID];
} forEach synchronizedObjects _gunModule;

GVAR(dialogPaths) pushBack [_forEachIndex, _ammoforEachIndex];
} forEach _variables;

//Fire types
Expand Down

0 comments on commit 9b602c0

Please sign in to comment.