I found a bug with addItem to the player when this action is delayed and in the meantime map is changed.
Might it be related to the state stored per room (map)?
Here is the video explaining issue:
Steps to reproduce:
- When the game starts go to the next map
- Wait for 5 seconds
- Click the action button to trigger console.log for items on the backend
- On the backend it seems that potion added in the setTimeout was stored, but it doubled all the items
- On the frontend it seems that items are not synced properly anymore with backend, because for the potion object there is only