Inline GetComponentOrNull

This commit is contained in:
Vera Aguilera Puerto
2021-12-03 15:32:05 +01:00
parent ee4ff9cfe8
commit 2654775bf0
30 changed files with 55 additions and 32 deletions

View File

@@ -50,7 +50,7 @@ namespace Content.Server.Atmos.Piping.Binary.EntitySystems
private void OnPumpUpdated(EntityUid uid, GasPressurePumpComponent pump, AtmosDeviceUpdateEvent args)
{
var appearance = pump.Owner.GetComponentOrNull<AppearanceComponent>();
var appearance = IoCManager.Resolve<IEntityManager>().GetComponentOrNull<AppearanceComponent>(pump.Owner.Uid);
if (!pump.Enabled
|| !EntityManager.TryGetComponent(uid, out NodeContainerComponent? nodeContainer)