Barotrauma
Barotrauma copied to clipboard
Saving and loading restocks stores and delivers the items you purchased
Disclaimers
- [X] I have searched the issue tracker to check if the issue has already been reported.
- [ ] My issue happened while using mods.
What happened?
As a host in a multiplayer campaign I purchased a toy hammer and saved, quit then hit continue (to load the save) giving me my bought goods - then I noticed the store still had it for sale (originally 1, still 1 after the load but I already owned the hammer I bought).
Decided to try something bulkier (25 bandages) and I received them all and the money was spent as expected, but the store in game had again another 25 bandages with me now owning 33 - saving at the outpost does not update store quantities despite making purchases.
Reproduction steps
- Start a multiplayer campaign or load one
- Have some money.
- Go to a store and buy goods
- Save and quit to lobby.
- Hit continue to start the round again in campaign
- go on your second shopping spree, everything's at its original stock.
This appears to only occur on multiplayer campaign's, single player saves the stock on save and quit correctly.
Bug prevalence
Happens every time I play
Version
Other
-
0.19.0.0 - Unstable
Which operating system did you encounter this bug on?
Windows
Relevant error messages and crash reports
No response
- Now, honestly - having your store items delivered seems like a good unintentional QOL feature, especially for resuming multiplayer campaigns and not exactly being sure what you bought. Prevents wasting money on re-buying something that's already in queue.
the bug is not that the items get delivered, I too think thats fine. its the fact we do not update/save the store inventory when saving and quitting to lobby.
I'm fairly sure this is how it works in single player too, so I doubt this is a networking issue.
Hm, I had tried to re-create it on single player and changed it to networking as simply saving and exiting in single player campaign was updating the store inventory (Least, that is what I remember when writing this).
Tested on 0.18.15.1 (I know I probably should have tested dev, but I imagine the issue is still the same)
In single player, after saving and quitting the purchased supplies are delivered to the submarine, however the store inventory does correctly update and lose inventory for both daily specials and regular store items.
in multiplayer, the store does not save what items were purchased when going back to lobby and saving, but the items are delivered allowing one to keep reloading to buy more of the same item.
Fixed in Regalis11/Barotrauma-development@f29b975
Tested against bugfixes commit https://github.com/Regalis11/Barotrauma-development/commit/14457d7dc22a5b12de8d84d2e57268378e1454d8, no issues found, closing.