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;
|
UserInterface.OnReceiveMessage += HandleUserInterfaceMessage;
|
||||||
}
|
}
|
||||||
|
|
||||||
Owner.EnsureComponent<InventoryComponent>();
|
|
||||||
Owner.EnsureComponent<HandsComponent>();
|
|
||||||
|
|
||||||
if (Owner.TryGetComponent(out InventoryComponent? inventory))
|
if (Owner.TryGetComponent(out InventoryComponent? inventory))
|
||||||
{
|
{
|
||||||
inventory.OnItemChanged += UpdateSubscribed;
|
inventory.OnItemChanged += UpdateSubscribed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Owner.TryGetComponent(out HandsComponent? hands))
|
||||||
|
{
|
||||||
|
hands.OnItemChanged += UpdateSubscribed;
|
||||||
|
}
|
||||||
|
|
||||||
// Initial update.
|
// Initial update.
|
||||||
UpdateSubscribed();
|
UpdateSubscribed();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user