- 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
@icomrade - In regex character classes only match each single character.
So a range with more than one character on one end (20) won't work:
http://www.regular-expressions.info/charclass.html
You can see that by running this code in-game with your old filter and
it will kick you:
player setVariable ["hit_glass3",1,true];
Adding the + on the end makes it match the character class one or more
times, so now it will match any integer >= 0.
* Advanced trading tidying, spelling fixes, private fixes and string fixes.
Fixes snap building issue with metal floors
Fixed spelling mistakes in various scripts
Fixed formatting uglyness in various scripts
Fixed invalid private lines in various scripts
Changed Advanced trading so buying worked more like selling, You can't
select backpack if you don't have a pack nor can you select a vehicle if
you don't have a vehicle.
Removed some redundant strings from Advanced trading and changed a few
of the strings to be more englishy
Removed the ability to buy a backpack into your backpack (You cant do
this anyway)
Fixed a bug where if you had nothing in your backpack it would break the
checkArrayInConfig script so the titlebar would not refresh correctly
Removed slot counts on no backpack and no vehicle (No need for it, just
clutter)
Moved backpack/vehicle checking to z_at_getContainer.sqf
* Last part of tidyness fixes
Last part of tidyness fixes
* Actual backpack fix
Lets actually fix the buying backpack into backpack or backpack when you
already have one.
* Missing from commit
Missing from commit
When switching back to category view the item count was overwritten
from:
12a9e9f83e
It is no longer needed to set it in changeBuySell since calcPrice runs
every time changeBuySell does. The one exception is when switching back
to category view, but in that case it stays in buy mode anyway.
You forgot to add it for single currency as well @oiad
There is no point in setting inTraderCity = "Any"; since you can use the
isInTraderCity variable to check if a player is in any trader city. Also
"Any" will return false for isNil, so the only time "Unknown Trader
City" was being used was when the player had not entered any city yet.
If they left a known trader and went to an unknown one the RPT message
would say "bought x at Any". Now it will correctly say "Unknown Trader"
anytime a purchase is made without inTraderCity being set.
Requires DLL Published in this commit as well as a database update.
Execute the added SQL in the 1.0.6_Updates.sql on your database.
Use Hive child 204 to update the new column
_key = format["CHILD:204:%1:%2:%3:", (getPlayerUID player),
dayZ_instance, [Array of playerUIDs of group members]];
_key call server_hiveWrite;
The menu already says "Buying in" or "Selling from" Gear in the top left
so having it again in the top right is redundant. It was my mistake
adding it there originally.
I wasn't getting errors without if (gear_done) then {}; surrounding the
uiSleeps, so I don't quite trust the engine was executing them, I also
question the ability of uisleep to handle single frame precision (but I
haven't tested anything regarding this yet).
This is the code from 1.0.5.2 before it became 1.0.6, it contains the
fix for backpack wipes in 1.0.5.1. I lightly tested it with 1.0.6 but it
will need more testing before release.
Optimizes the code for the buyitems item listing (What was I thinking!)
Adds item count to buy/sell list (Useful for checking against
backpack/vehicle storage space constraints when buying multiple items)
Small logging fix.
The buying list now acts like a shopping cart. It is no longer cleared
when switching between categories or containers. Closing the dialog or
switching to sell mode still clears it.
Also fixed:
- Filter button in sell mode
- Bug where filtering sellable list readded items already moved to
selling list
- Visual price display not clearing when remove all button is used on
buying list
- Gear container picture showing rank instead of portrait in buy mode
- Dialog is no longer closed when trying to sell zero items
- LbCurSel is now reset when the buyable list is cleared
- Category is no longer opened onLbSelChanged. Instead you need to
double click or use the "View" button, so the arrow keys can be used for
selecting too.