Fix stripping menu hands' items not showing correctly.
This commit is contained in:
@@ -43,14 +43,16 @@ namespace Content.Server.GameObjects.Components.GUI
|
||||
UserInterface.OnReceiveMessage += HandleUserInterfaceMessage;
|
||||
}
|
||||
|
||||
Owner.EnsureComponent<InventoryComponent>();
|
||||
Owner.EnsureComponent<HandsComponent>();
|
||||
|
||||
if (Owner.TryGetComponent(out InventoryComponent? inventory))
|
||||
{
|
||||
inventory.OnItemChanged += UpdateSubscribed;
|
||||
}
|
||||
|
||||
if (Owner.TryGetComponent(out HandsComponent? hands))
|
||||
{
|
||||
hands.OnItemChanged += UpdateSubscribed;
|
||||
}
|
||||
|
||||
// Initial update.
|
||||
UpdateSubscribed();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user