* Revert "Fix chat bubbles (#25643)" This reverts commit23d2c4d924. * Revert "Fixes obsolete Transform warnings in Content. (#25256)" This reverts commitf284b43ff6.
This commit is contained in:
@@ -58,7 +58,6 @@ public sealed partial class ShuttleSystem : SharedShuttleSystem
|
||||
public sealed class EmergencyShuttleOverlay : Overlay
|
||||
{
|
||||
private IEntityManager _entManager;
|
||||
private SharedTransformSystem _xformSystem;
|
||||
|
||||
public override OverlaySpace Space => OverlaySpace.WorldSpace;
|
||||
|
||||
@@ -68,14 +67,13 @@ public sealed class EmergencyShuttleOverlay : Overlay
|
||||
public EmergencyShuttleOverlay(IEntityManager entManager)
|
||||
{
|
||||
_entManager = entManager;
|
||||
_xformSystem = _entManager.System<SharedTransformSystem>();
|
||||
}
|
||||
|
||||
protected override void Draw(in OverlayDrawArgs args)
|
||||
{
|
||||
if (Position == null || !_entManager.TryGetComponent<TransformComponent>(StationUid, out var xform)) return;
|
||||
|
||||
args.WorldHandle.SetTransform(_xformSystem.GetWorldMatrix(xform));
|
||||
args.WorldHandle.SetTransform(xform.WorldMatrix);
|
||||
args.WorldHandle.DrawRect(Position.Value, Color.Red.WithAlpha(100));
|
||||
args.WorldHandle.SetTransform(Matrix3.Identity);
|
||||
}
|
||||
|
||||
@@ -18,7 +18,6 @@ public class DockingControl : Control
|
||||
{
|
||||
private readonly IEntityManager _entManager;
|
||||
private readonly IMapManager _mapManager;
|
||||
private readonly SharedTransformSystem _xformSystem;
|
||||
|
||||
private float _range = 8f;
|
||||
private float _rangeSquared = 0f;
|
||||
@@ -51,7 +50,6 @@ public class DockingControl : Control
|
||||
{
|
||||
_entManager = IoCManager.Resolve<IEntityManager>();
|
||||
_mapManager = IoCManager.Resolve<IMapManager>();
|
||||
_xformSystem = _entManager.System<SharedTransformSystem>();
|
||||
_rangeSquared = _range * _range;
|
||||
MinSize = new Vector2(SizeFull, SizeFull);
|
||||
}
|
||||
@@ -145,8 +143,8 @@ public class DockingControl : Control
|
||||
ScalePosition(rotation.Transform(new Vector2(0.5f, -0.5f)))), Color.Green);
|
||||
|
||||
// Draw nearby grids
|
||||
var worldPos = _xformSystem.GetWorldMatrix(gridXform).Transform(Coordinates.Value.Position);
|
||||
var gridInvMatrix = _xformSystem.GetInvWorldMatrix(gridXform);
|
||||
var worldPos = gridXform.WorldMatrix.Transform(Coordinates.Value.Position);
|
||||
var gridInvMatrix = gridXform.InvWorldMatrix;
|
||||
Matrix3.Multiply(in gridInvMatrix, in matrix, out var invMatrix);
|
||||
|
||||
// TODO: Getting some overdraw so need to fix that.
|
||||
@@ -164,7 +162,7 @@ public class DockingControl : Control
|
||||
if (!_entManager.TryGetComponent<FixturesComponent>(grid, out var gridFixtures))
|
||||
continue;
|
||||
|
||||
var gridMatrix = _xformSystem.GetWorldMatrix(grid);
|
||||
var gridMatrix = xformQuery.GetComponent(grid).WorldMatrix;
|
||||
|
||||
Matrix3.Multiply(in gridMatrix, in invMatrix, out var matty);
|
||||
|
||||
|
||||
@@ -21,7 +21,6 @@ public sealed partial class ShuttleConsoleWindow : FancyWindow,
|
||||
{
|
||||
private readonly IEntityManager _entManager;
|
||||
private readonly IGameTiming _timing;
|
||||
private SharedTransformSystem? _xformSystem = null;
|
||||
|
||||
private EntityUid? _shuttleEntity;
|
||||
|
||||
@@ -310,9 +309,7 @@ public sealed partial class ShuttleConsoleWindow : FancyWindow,
|
||||
{
|
||||
base.Draw(handle);
|
||||
|
||||
_xformSystem ??= _entManager.SystemOrNull<SharedTransformSystem>();
|
||||
if (_xformSystem is null ||
|
||||
!_entManager.TryGetComponent<PhysicsComponent>(_shuttleEntity, out var gridBody) ||
|
||||
if (!_entManager.TryGetComponent<PhysicsComponent>(_shuttleEntity, out var gridBody) ||
|
||||
!_entManager.TryGetComponent<TransformComponent>(_shuttleEntity, out var gridXform))
|
||||
{
|
||||
return;
|
||||
@@ -325,7 +322,7 @@ public sealed partial class ShuttleConsoleWindow : FancyWindow,
|
||||
|
||||
FTLTimer.Text = GetFTLText();
|
||||
|
||||
var (_, worldRot, worldMatrix) = _xformSystem.GetWorldPositionRotationMatrix(gridXform);
|
||||
var (_, worldRot, worldMatrix) = gridXform.GetWorldPositionRotationMatrix();
|
||||
var worldPos = worldMatrix.Transform(gridBody.LocalCenter);
|
||||
|
||||
// Get the positive reduced angle.
|
||||
|
||||
Reference in New Issue
Block a user