Inline TryGetComponent completely, for real
This commit is contained in:
@@ -79,7 +79,7 @@ namespace Content.Server.PowerCell.Components
|
||||
|
||||
private void UpdateVisuals()
|
||||
{
|
||||
if (Owner.TryGetComponent(out AppearanceComponent? appearance))
|
||||
if (IoCManager.Resolve<IEntityManager>().TryGetComponent(Owner.Uid, out AppearanceComponent? appearance))
|
||||
{
|
||||
appearance.SetData(PowerCellVisuals.ChargeLevel, GetLevel(CurrentCharge / MaxCharge));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user