If two players click same chest, first one's inventory will be lost. #1

Open
opened 2025-09-06 06:35:48 +02:00 by whosit · 4 comments

Needs a check if there's something stored already.
Probably needs some logging.
Maybe needs some indication that chest is already in use.
Also, with this implementation, if server crashes, there's no in-game way to restore inventory...

Needs a check if there's something stored already. Probably needs some logging. Maybe needs some indication that chest is already in use. Also, with this implementation, if server crashes, there's no in-game way to restore inventory...
Author

Also, takes into account only main inv, bags are still accessible?

Also, takes into account only `main` inv, bags are still accessible?
Boot self-assigned this 2025-09-06 07:07:52 +02:00
Owner

Needs a check if there's something stored already.

Now a player can only use the crate once.

Probably needs some logging.

Logging has been added.

Maybe needs some indication that chest is already in use.

Now a player receives the message "You have already used an Arena Chest!".

Also, with this implementation, if server crashes, there's no in-game way to restore inventory...

Now we store data persistently with mod_storage. Backups are saved during shutdown, loaded at restart.

> Needs a check if there's something stored already. Now a player can only use the crate once. > Probably needs some logging. Logging has been added. > Maybe needs some indication that chest is already in use. Now a player receives the message "You have already used an Arena Chest!". > Also, with this implementation, if server crashes, there's no in-game way to restore inventory... Now we store data persistently with `mod_storage`. Backups are saved during shutdown, loaded at restart.
Author

Now a player receives the message "You have already used an Arena Chest!".

It does, but I think initial issue is still the same - player can lose their inventory.
Try it yourself with 2 players and single chest?

> Now a player receives the message "You have already used an Arena Chest!". It does, but I think initial issue is still the same - player can lose their inventory. Try it yourself with 2 players and single chest?
Author

Modstorage may be overkill for this - you already store inventory and owner name in meta - this should be enough to allow people to take their stuff back, no modstorage needed.

Modstorage may be overkill for this - you already store inventory and owner name in meta - this should be enough to allow people to take their stuff back, no modstorage needed.
Boot added the
1a - bug
1c - in progress
labels 2025-09-06 11:19:17 +02:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Boot/Boots_Arena-PvP_Mod#1
No description provided.