Fix showing the inventory button on entities without any inventory slots (#29728)

This commit is contained in:
DrSmugleaf
2024-07-05 07:25:23 -07:00
committed by GitHub
parent b0ae7d5725
commit 11034a0986

View File

@@ -132,6 +132,9 @@ public sealed class InventoryUIController : UIController, IOnStateEntered<Gamepl
if (clientInv == null) if (clientInv == null)
{ {
_inventoryHotbar?.ClearButtons(); _inventoryHotbar?.ClearButtons();
if (_inventoryButton != null)
_inventoryButton.Visible = false;
return; return;
} }
@@ -409,6 +412,8 @@ public sealed class InventoryUIController : UIController, IOnStateEntered<Gamepl
{ {
slotGroup.ClearButtons(); slotGroup.ClearButtons();
} }
UpdateInventoryHotbar(null);
} }
private void SpriteUpdated(SlotSpriteUpdate update) private void SpriteUpdated(SlotSpriteUpdate update)