Some manual TryGetComponent inlines

This commit is contained in:
Vera Aguilera Puerto
2021-12-03 12:51:44 +01:00
parent 0feebbff00
commit f3edecf994
10 changed files with 22 additions and 15 deletions

View File

@@ -2,6 +2,7 @@ using Content.Shared.Atmos.Piping;
using JetBrains.Annotations;
using Robust.Client.GameObjects;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Maths;
namespace Content.Client.Atmos.Visualizers
@@ -13,7 +14,7 @@ namespace Content.Client.Atmos.Visualizers
{
base.OnChangeData(component);
if (!component.Owner.TryGetComponent(out SpriteComponent? sprite))
if (!IoCManager.Resolve<IEntityManager>().TryGetComponent(component.OwnerUid, out SpriteComponent? sprite))
return;
if (component.TryGetData(PipeColorVisuals.Color, out Color color))