From 11034a098626980e1990b0a962fd23eb6bb825f0 Mon Sep 17 00:00:00 2001 From: DrSmugleaf <10968691+DrSmugleaf@users.noreply.github.com> Date: Fri, 5 Jul 2024 07:25:23 -0700 Subject: [PATCH] Fix showing the inventory button on entities without any inventory slots (#29728) --- .../UserInterface/Systems/Inventory/InventoryUIController.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Content.Client/UserInterface/Systems/Inventory/InventoryUIController.cs b/Content.Client/UserInterface/Systems/Inventory/InventoryUIController.cs index fb74779917..5d7a775104 100644 --- a/Content.Client/UserInterface/Systems/Inventory/InventoryUIController.cs +++ b/Content.Client/UserInterface/Systems/Inventory/InventoryUIController.cs @@ -132,6 +132,9 @@ private void UpdateInventoryHotbar(InventorySlotsComponent? clientInv) if (clientInv == null) { _inventoryHotbar?.ClearButtons(); + if (_inventoryButton != null) + _inventoryButton.Visible = false; + return; } @@ -409,6 +412,8 @@ private void UnloadSlots() { slotGroup.ClearButtons(); } + + UpdateInventoryHotbar(null); } private void SpriteUpdated(SlotSpriteUpdate update)