Prevent MeleeMagazines being counted by BIS_fnc_inv

This commit is contained in:
ebaydayz
2016-05-03 12:21:43 -04:00
parent f8b3ba2105
commit 2f98fc0451
18 changed files with 42 additions and 18 deletions

View File

@@ -1,7 +1,8 @@
private ["_selection","_return","_toBuyWeaps","_toBuyMags","_toBuyBags","_toolsToBuy","_sidearmToBuy","_primaryToBuy","_currentPrimarys"
,"_currentSecondarys","_currentSec","_currentPrim","_currentTool","_p","_s","_b","_check0","_check1","_check2","_check3","_check4","_mags","_weaps","_bags"
,"_normalBags","_normalMags","_normalWeaps","_allowedMags","_allowedPrimary","_allowedTools","_allowedSidearm","_allowedWeapons","_allowedBackpacks"
,"_totalSpace","_totalNewSpace","_counter","_parentClasses","_alreadyInBackpack","_kinds","_kinds2","_kinds3","_ammmounts","_ammmounts2","_ammmounts3"
,"_totalSpace","_totalNewSpace","_counter","_parentClasses","_alreadyInBackpack","_kinds","_kinds2","_kinds3","_ammmounts","_ammmounts2","_ammmounts3",
"_actualMags"
];
_selection = Z_SellingFrom;
_return = false;
@@ -19,7 +20,8 @@ if (_vehiclesToBuy > 0) then {
};
if(_selection == 2) then{ //gear
_allowedMags = 20 - count(magazines player);
_actualMags = {!(_x in MeleeMagazines)} count (magazines player);
_allowedMags = 20 - _actualMags;
_currentPrimarys = 0;

View File

@@ -1,11 +1,12 @@
private["_selection","_returnArray","_allowedMags","_allowedWeapons","_allowedBackpacks","_allowedTools","_allowedPrimary","_allowedSidearm","_formattedText","_pic"
,"_backpack","_backpackAmount","_vehicleWeapons","_vehicleMagazines","_vehicleBackpacks","_tempWeaponsArray","_tempBackpackArray","_tempMagazinesArray"];
,"_backpack","_backpackAmount","_vehicleWeapons","_vehicleMagazines","_vehicleBackpacks","_tempWeaponsArray","_tempBackpackArray","_tempMagazinesArray","_actualMags"];
#include "defines.sqf";
_selection = _this select 0;
_returnArray = [0,0,0];
if(_selection == 2) then{ //gear
_allowedMags = 20 - count(magazines player);
_actualMags = {!(_x in MeleeMagazines)} count (magazines player);
_allowedMags = 20 - _actualMags;
_allowedWeapons = 14 - count(weapons player);
_pic = getText (configFile >> 'CfgVehicles' >> (typeOf player) >> 'picture');

View File

@@ -21,7 +21,7 @@ if (!isNil '_pic' && _pic == "") then {
};
_formattedText = format [
"<t size='1' align='center' color='#ffffff'> %2 </t>"
"<t size='1' align='center' color='#ffffff'>%1 %2</t>"
, _pic, localize "STR_UI_GEAR"
];