Skip to content

Commit

Permalink
Fix showing the inventory button on entities without any inventory sl…
Browse files Browse the repository at this point in the history
…ots (#29728)
  • Loading branch information
DrSmugleaf authored Jul 5, 2024
1 parent b0ae7d5 commit 11034a0
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@ private void UpdateInventoryHotbar(InventorySlotsComponent? clientInv)
if (clientInv == null)
{
_inventoryHotbar?.ClearButtons();
if (_inventoryButton != null)
_inventoryButton.Visible = false;

return;
}

Expand Down Expand Up @@ -409,6 +412,8 @@ private void UnloadSlots()
{
slotGroup.ClearButtons();
}

UpdateInventoryHotbar(null);
}

private void SpriteUpdated(SlotSpriteUpdate update)
Expand Down

0 comments on commit 11034a0

Please sign in to comment.