summaryrefslogtreecommitdiffstats
path: root/Client/Functions/Client_UIGearFillList.sqf
diff options
context:
space:
mode:
authorhybrid <hybrid@hybridlabs.pro>2026-06-11 19:55:04 +0300
committerhybrid <hybrid@hybridlabs.pro>2026-06-11 19:55:04 +0300
commitb06990293397d4b6d0374097f09d1cc5679216e3 (patch)
tree5719922562e317a8083250c178f24376b6692569 /Client/Functions/Client_UIGearFillList.sqf
downloada2wf_saralite-b06990293397d4b6d0374097f09d1cc5679216e3.tar.gz
a2wf_saralite-b06990293397d4b6d0374097f09d1cc5679216e3.tar.bz2
a2wf_saralite-b06990293397d4b6d0374097f09d1cc5679216e3.zip
init
Diffstat (limited to 'Client/Functions/Client_UIGearFillList.sqf')
-rw-r--r--Client/Functions/Client_UIGearFillList.sqf40
1 files changed, 40 insertions, 0 deletions
diff --git a/Client/Functions/Client_UIGearFillList.sqf b/Client/Functions/Client_UIGearFillList.sqf
new file mode 100644
index 0000000..2eb0d55
--- /dev/null
+++ b/Client/Functions/Client_UIGearFillList.sqf
@@ -0,0 +1,40 @@
+Private ['_add','_currentGearUpgr','_filler','_get','_i','_listBox','_listNames','_u'];
+_listNames = _this select 0;
+_filler = _this select 1;
+_listBox = _this select 2;
+_u = 0;
+_i = 0;
+_get = [];
+
+_currentGearUpgr = ((sideJoinedText) Call GetSideUpgrades) select 13;
+
+{
+ /* Get */
+ if (_filler == 'secondary' || _filler == 'all') then {
+ _get = (_x+'_W') Call GetNamespace;
+ if (isNil '_get') then {
+ _get = _x Call GetNamespace;
+ };
+ } else {
+ _get = _x Call GetNamespace;
+ };
+
+ if !(isNil '_get') then {
+ if ((_get select QUERYGEARUPGRADE) <= _currentGearUpgr) then {
+ _add = true;
+ if (paramGearRestriction && !gearInRange) then {
+ if !(_get select QUERYGEARALLOWED) then {_add = false};
+ };
+ if (_add) then {
+ lnbAddRow [_listBox,['$'+str (_get Select QUERYGEARCOST),(_get select QUERYGEARLABEL)]];
+ lnbSetPicture [_listBox,[_i,0],_get select QUERYGEARPICTURE];
+ lnbSetData [_listBox,[_i,0],_filler];
+ lnbSetValue [_listBox,[_i,0],_u];
+ _i = _i + 1;
+ };
+ };
+ };
+ _u = _u + 1;
+} forEach _listNames;
+
+lnbSetCurSelRow [_listBox,0] \ No newline at end of file