Skip to content

Commit

Permalink
Fix calculation for min magazines when unlocks disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
jwoodruff40 committed Jan 29, 2025
1 parent edd158a commit 999063f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions A3A/addons/scrt/Arsenal/fn_arsenal_loadoutArsenal.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -1360,6 +1360,16 @@ switch _mode do {
};
};

case (IDC_RSCDISPLAYARSENAL_TAB_LOADEDMAG);
case (IDC_RSCDISPLAYARSENAL_TAB_LOADEDMAG2);
case (IDC_RSCDISPLAYARSENAL_TAB_CARGOMAG);
case (IDC_RSCDISPLAYARSENAL_TAB_CARGOMAGALL): {
_inventory select {
private _amountCfg = getNumber (configfile >> "CfgMagazines" >> _x select 0 >> "count");
(_x select 1) == -1 || {minWeaps < 0 && {(_x select 1) >= (ITEM_MIN * _amountCfg)}}
}
};

default {
// item unlocked (qty == -1) OR (unlocks disabled AND item qty more than min items)
_inventory select { (_x select 1) == -1 || {minWeaps < 0 && {(_x select 1) >= ITEM_MIN}} }
Expand Down

0 comments on commit 999063f

Please sign in to comment.