Fix full toolbelt showing -2 tool slots in Adv. Trade

Correctly shows zero available tool slots when toolbelt, binocular and
NVG slots are full now.
This commit is contained in:
ebaydayz
2016-05-05 16:50:09 -04:00
parent fe54b78bdb
commit 7bc5d7f7f5
2 changed files with 3 additions and 2 deletions

View File

@@ -50,7 +50,7 @@ if(_selection == 2) then{ //gear
_allowedBackpacks = 1 - _currentBackpacks;
_allowedTools = 12;
_allowedTools = 14; // 12 toolbelt + 1 Binocular + 1 NVG
{
_parentClasses = [(configFile >> "CfgWeapons" >> _x ),true] call BIS_fnc_returnParents;

View File

@@ -7,7 +7,8 @@ _returnArray = [0,0,0];
if(_selection == 2) then{ //gear
_actualMags = {!(_x in MeleeMagazines)} count (magazines player);
_allowedMags = 20 - _actualMags;
_allowedWeapons = 14 - count(weapons player);
// 12 toolbelt + 1 Binoculars + 1 NVG + 1 Pistol + 1 Primary (onBack isn't counted in weapons player)
_allowedWeapons = 16 - count(weapons player);
_pic = getText (configFile >> 'CfgVehicles' >> (typeOf player) >> 'picture');