From 39f346ed420f69f85347f21be17f66a4da92890b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Aguilera=20Puerto?= Date: Sun, 23 Aug 2020 15:03:01 +0200 Subject: [PATCH] Fix stripping menu hands' items not showing correctly. --- .../GameObjects/Components/GUI/StrippableComponent.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Content.Server/GameObjects/Components/GUI/StrippableComponent.cs b/Content.Server/GameObjects/Components/GUI/StrippableComponent.cs index 38270dcf46..484a60dd53 100644 --- a/Content.Server/GameObjects/Components/GUI/StrippableComponent.cs +++ b/Content.Server/GameObjects/Components/GUI/StrippableComponent.cs @@ -43,14 +43,16 @@ namespace Content.Server.GameObjects.Components.GUI UserInterface.OnReceiveMessage += HandleUserInterfaceMessage; } - Owner.EnsureComponent(); - Owner.EnsureComponent(); - if (Owner.TryGetComponent(out InventoryComponent? inventory)) { inventory.OnItemChanged += UpdateSubscribed; } + if (Owner.TryGetComponent(out HandsComponent? hands)) + { + hands.OnItemChanged += UpdateSubscribed; + } + // Initial update. UpdateSubscribed(); }