Barotrauma icon indicating copy to clipboard operation
Barotrauma copied to clipboard

Saving and loading restocks stores and delivers the items you purchased

Open NilanthAnimosus opened this issue 2 years ago • 2 comments

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

  1. Start a multiplayer campaign or load one
  2. Have some money.
  3. Go to a store and buy goods
  4. Save and quit to lobby.
  5. Hit continue to start the round again in campaign
  6. 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

NilanthAnimosus avatar Jul 26 '22 06:07 NilanthAnimosus

  • 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.

Ek-Videogames avatar Aug 12 '22 05:08 Ek-Videogames

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.

NilanthAnimosus avatar Aug 12 '22 07:08 NilanthAnimosus

I'm fairly sure this is how it works in single player too, so I doubt this is a networking issue.

Regalis11 avatar Aug 16 '22 07:08 Regalis11

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).

NilanthAnimosus avatar Aug 16 '22 13:08 NilanthAnimosus

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.

NilanthAnimosus avatar Aug 18 '22 16:08 NilanthAnimosus

Fixed in Regalis11/Barotrauma-development@f29b975

ekqvist avatar Dec 02 '22 13:12 ekqvist

Tested against bugfixes commit https://github.com/Regalis11/Barotrauma-development/commit/14457d7dc22a5b12de8d84d2e57268378e1454d8, no issues found, closing.

NilanthAnimosus avatar Dec 07 '22 14:12 NilanthAnimosus