mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-05-15 07:03:21 +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:
@@ -220,7 +220,7 @@ if (typeName _money == "SCALAR") then {
|
||||
_success = [player,_money] call SC_fnc_addCoins;
|
||||
systemChat format[localize "STR_EPOCH_TRADE_SUCCESS_CHANGE", _money , CurrencyName];
|
||||
} else {
|
||||
_success = [_money, 0] call Z_returnChange;
|
||||
_success = [_money,0,false,0] call Z_returnChange;
|
||||
_tCost = "";
|
||||
_tCost = _money call z_calcDefaultCurrencyNoImg;
|
||||
if (_tCost != "") then { systemChat format[localize "STR_EPOCH_TRADE_SELL_SUCCESS",_tCost]; };
|
||||
|
||||
Reference in New Issue
Block a user