Revert "Remove most usages of obsolete TransformComponent methods (#1… (#19714)

This commit is contained in:
metalgearsloth
2023-09-01 12:30:29 +10:00
committed by GitHub
parent 37222930d9
commit 4cfc578011
91 changed files with 227 additions and 315 deletions

View File

@@ -21,7 +21,6 @@ namespace Content.Client.Medical.CrewMonitoring
private List<(DirectionIcon Icon, Vector2 Position)> _directionIcons = new();
private readonly IEntityManager _entManager;
private readonly IEyeManager _eye;
private readonly SharedTransformSystem _transform;
private EntityUid? _stationUid;
private CrewMonitoringButton? _trackedButton;
@@ -32,7 +31,6 @@ namespace Content.Client.Medical.CrewMonitoring
RobustXamlLoader.Load(this);
_eye = IoCManager.Resolve<IEyeManager>();
_entManager = IoCManager.Resolve<IEntityManager>();
_transform = _entManager.System<SharedTransformSystem>();
_stationUid = mapUid;
if (_entManager.TryGetComponent<TransformComponent>(mapUid, out var xform))
@@ -195,7 +193,7 @@ namespace Content.Client.Medical.CrewMonitoring
// Apply the offset relative to the eye.
// For a station at 45 degrees rotation, the current eye rotation is -45 degrees.
// TODO: This feels sketchy. Is there something underlying wrong with eye rotation?
offsetAngle = -(_eye.CurrentEye.Rotation + _transform.GetWorldRotation(xform));
offsetAngle = -(_eye.CurrentEye.Rotation + xform.WorldRotation);
}
foreach (var (icon, pos) in _directionIcons)