Fix inventory flickering and missing InventoryTemplateUpdated event (#39379)
* fix flickering * move InitClothing * fix this
This commit is contained in:
@@ -115,6 +115,13 @@ namespace Content.Client.Inventory
|
||||
OnLinkInventorySlots?.Invoke(uid, component);
|
||||
}
|
||||
|
||||
protected override void OnInit(Entity<InventoryComponent> ent, ref ComponentInit args)
|
||||
{
|
||||
base.OnInit(ent, ref args);
|
||||
|
||||
_clothingVisualsSystem.InitClothing(ent.Owner, ent.Comp);
|
||||
}
|
||||
|
||||
public override void Shutdown()
|
||||
{
|
||||
CommandBinds.Unregister<ClientInventorySystem>();
|
||||
@@ -261,7 +268,6 @@ namespace Content.Client.Inventory
|
||||
TryAddSlotData((ent.Owner, inventorySlots), (SlotData)slot);
|
||||
}
|
||||
|
||||
_clothingVisualsSystem.InitClothing(ent, ent.Comp);
|
||||
if (ent.Owner == _playerManager.LocalEntity)
|
||||
ReloadInventory(inventorySlots);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user