mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 12:12:34 +03:00
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:
@@ -91,7 +91,8 @@ if (isNil "Z_AdvancedTradingInit") then {
|
||||
Z_calcBuyableList = compile preprocessFileLineNumbers (Z_AT_FolderLocation + "\functions\z_at_calcBuyableList.sqf");
|
||||
Z_fillBuyableList = compile preprocessFileLineNumbers (Z_AT_FolderLocation + "\functions\z_at_fillBuyableList.sqf");
|
||||
Z_fillBuyingList = compile preprocessFileLineNumbers (Z_AT_FolderLocation + "\functions\z_at_fillBuyingList.sqf");
|
||||
Z_calculateFreeSpace = compile preprocessFileLineNumbers (Z_AT_FolderLocation + "\functions\z_at_calculateFreeSpace.sqf");
|
||||
Z_calcFreeSpace = compile preprocessFileLineNumbers (Z_AT_FolderLocation + "\functions\z_at_calcFreeSpace.sqf");
|
||||
Z_displayFreeSpace = compile preprocessFileLineNumbers (Z_AT_FolderLocation + "\functions\z_at_displayFreeSpace.sqf");
|
||||
Z_checkCloseVehicle = compile preprocessFileLineNumbers (Z_AT_FolderLocation + "\functions\z_at_checkCloseVehicle.sqf");
|
||||
Z_allowBuying = compile preprocessFileLineNumbers (Z_AT_FolderLocation + "\functions\z_at_allowBuying.sqf");
|
||||
Z_canAfford = compile preprocessFileLineNumbers (Z_AT_FolderLocation + "\functions\z_at_canAfford.sqf");
|
||||
|
||||
Reference in New Issue
Block a user