Closed asquared31415 closed 4 years ago
This is what happens when i pick up an item from the box. It updates my inventory properly but the server doesn't send any box update message so it appears as if the item is still in the box.
Thank you for the detailed description and comments! I tracked this down to a missing component on the container. I forgot that a container must have a "look" component in order for the Coordinator to know which players to notify if the contents of the container changes. After adding the missing component, the container started updating properly from the player's point of view.
No code changes are necessary, although I would like to add code to the front-end admin tool that creates containers, so that it creates the "look" component automatically (also, when removing the container aspect of an entity, it should also remove the "look" component). I'll keep this issue open until I've done this work.
I've updated the front-end to add/remove the "look" component along with "container" to ensure the container change feedback mechanism works for players.
When a player moves an item into or out of a container, the front end does not change the UI. This means that visually only it appears that the entity has duplicated or been deleted. The server knows the proper state of inventories, so nothing is actually duplicated or lost.
Example of visual duplication:
The 100 gold in my first inventory slot does exist, but the 100 in the box does not. The items in the box can be dragged, but the server does not do anything, and the duplicate item does not move. If the box is closed and re-opened, the client does see the correct data, which should be synchronized with the server. The same bug happens if a user places an item inside a box, the item is removed from the player's inventory visually, but not placed in the box visually, and the item looks to have been destroyed. Re-opening the container similarly resolves this issue.
A related issue is that other players interacting with items will not update the box either.
To reproduce: