rhymu8354 / OmniaRegna

This holds public information about OmniaRegna (https://omniaregna.com/), an online RPG. Issues for the game may be reported here or in the game itself.
8 stars 1 forks source link

Moving items into or out of a container doesn't update #266

Closed asquared31415 closed 4 years ago

asquared31415 commented 4 years ago

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: image

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:

715209 commented 4 years ago

image

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.

rhymu8354 commented 4 years ago

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.

rhymu8354 commented 4 years ago

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.