Add handling of magazine overflow in AdvTrade and free slot icons

- Added proper handling of pistol mags and regular mags in gear to
prevent magazine overflow
- Added pre-check if return change will overflow gear + backpack free
space. If change will not fit in gear + backpack free space then buy is
prevented with a message notifying the player. In the case of a sale it
proceeds anyway, but notifies player if overflow occurs (see comments in
returnChange)
- Consolidated duplicate code for calculating free space and returning
cargo of an object into new calcFreeSpace
- Old calculateFreeSpace renamed to displayFreeSpace
- Added Weps/Mags/Bags icons to free slot numbers display
This commit is contained in:
ebaydayz
2016-07-31 18:38:39 -04:00
parent d7cb2b446e
commit a5be49c546
20 changed files with 359 additions and 422 deletions

View File

@@ -393,10 +393,10 @@ class AdvancedTrading
colorBackground[] = {1,1,1,1};
color[] = {0,0,0,1};
};
class RscText_ATT8: ZSC_RscText
class RscText_ATT8: ZSC_RscStructuredText
{
idc = 7404;
text = "0/0/0";
text = "";
x = 0.45 * safezoneW + safezoneX;
y = 0.32 * safezoneH + safezoneY;
w = 0.15 * safezoneW;