Show loading overlay on inventory slots until their contents arrive - #3555
Show loading overlay on inventory slots until their contents arrive#3555yel0h wants to merge 2 commits into
Conversation
| if (count == 0) { | ||
| _ = loadingInventories.remove(clientId); |
There was a problem hiding this comment.
this should never happen right?
(the remove not the == 0, so I would either do an assert that nothing was removed or just do an early return
There was a problem hiding this comment.
Well if the client receives that the inventory is empty, I immediately remove it from the inventories being loaded since there's nothing to wait for
|
I think the best solution is to make chest opening server initiated. |
|
Ok, I added a |
|
I kind of would like to have a more generic interface. It goes beyond just the chest, and it goes beyond just inventories. All I know is that we need a generic way for the server to tell the client to open a specific window, including the data relevant for it. And on the site of the client, we need a way to share block interactions with the server through the sync system. All in all this probably requires more discussion and design work. The only reason this issue landed in the 0.4.0 milestone is because I was confident I could get it done in #2564, but after introduction of the ECS I have paused my efforts on it to see how the ECS would evolve first. |
The server now also sends the number of items to expect, and the client counts them down as they arrive. Slots for an inventory that isn't loaded yet render with a dark overlay. All
.serverSharedinventories are tracked.Fixes #2700