Revert "Fix chat bubbles (#25643)" (#25645)

* Revert "Fix chat bubbles (#25643)"

This reverts commit 23d2c4d924.

* Revert "Fixes obsolete Transform warnings in Content. (#25256)"

This reverts commit f284b43ff6.
This commit is contained in:
metalgearsloth
2024-02-28 00:51:20 +11:00
committed by GitHub
parent d204896bf5
commit a9502be29e
154 changed files with 435 additions and 611 deletions

View File

@@ -69,15 +69,13 @@ public sealed class ExplosionGridTileFlood : ExplosionTileFlood
return;
_needToTransform = true;
var entMan = IoCManager.Resolve<IEntityManager>();
var xfmSys = entMan.System<SharedTransformSystem>();
var transform = IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(Grid.Owner);
var size = (float) Grid.TileSize;
_matrix.R0C2 = size / 2;
_matrix.R1C2 = size / 2;
_matrix *= xfmSys.GetWorldMatrix(transform) * Matrix3.Invert(spaceMatrix);
var relativeAngle = xfmSys.GetWorldRotation(transform) - spaceAngle;
_matrix *= transform.WorldMatrix * Matrix3.Invert(spaceMatrix);
var relativeAngle = transform.WorldRotation - spaceAngle;
_offset = relativeAngle.RotateVec(new Vector2(size / 4, size / 4));
}

View File

@@ -70,8 +70,8 @@ public sealed partial class ExplosionSystem : EntitySystem
{
var targetGrid = Comp<MapGridComponent>(referenceGrid.Value);
var xform = Transform(referenceGrid.Value);
targetAngle = _transformSystem.GetWorldRotation(xform);
targetMatrix = _transformSystem.GetInvWorldMatrix(xform);
targetAngle = xform.WorldRotation;
targetMatrix = xform.InvWorldMatrix;
tileSize = targetGrid.TileSize;
}
@@ -104,7 +104,7 @@ public sealed partial class ExplosionSystem : EntitySystem
var xforms = EntityManager.GetEntityQuery<TransformComponent>();
var xform = xforms.GetComponent(gridToTransform);
var (_, gridWorldRotation, gridWorldMatrix, invGridWorldMatrid) = _transformSystem.GetWorldPositionRotationMatrixWithInv(xform);
var (_, gridWorldRotation, gridWorldMatrix, invGridWorldMatrid) = xform.GetWorldPositionRotationMatrixWithInv(xforms);
var localEpicentre = (Vector2i) invGridWorldMatrid.Transform(epicentre.Position);
var matrix = offsetMatrix * gridWorldMatrix * targetMatrix;

View File

@@ -88,8 +88,8 @@ public sealed partial class ExplosionSystem : EntitySystem
if (referenceGrid != null)
{
var xform = Transform(_mapManager.GetGrid(referenceGrid.Value).Owner);
spaceMatrix = _transformSystem.GetWorldMatrix(xform);
spaceAngle = _transformSystem.GetWorldRotation(xform);
spaceMatrix = xform.WorldMatrix;
spaceAngle = xform.WorldRotation;
}
// is the explosion starting on a grid?

View File

@@ -382,7 +382,7 @@ public sealed partial class ExplosionSystem : EntitySystem
if (player.AttachedEntity is not EntityUid uid)
continue;
var playerPos = _transformSystem.GetWorldPosition(player.AttachedEntity!.Value);
var playerPos = Transform(player.AttachedEntity!.Value).WorldPosition;
var delta = epicenter.Position - playerPos;
if (delta.EqualsApprox(Vector2.Zero))

View File

@@ -15,7 +15,6 @@ public sealed class SmokeOnTriggerSystem : SharedSmokeOnTriggerSystem
{
[Dependency] private readonly IMapManager _mapMan = default!;
[Dependency] private readonly SmokeSystem _smoke = default!;
[Dependency] private readonly SharedTransformSystem _xformSystem = default!;
public override void Initialize()
{
@@ -27,15 +26,14 @@ public sealed class SmokeOnTriggerSystem : SharedSmokeOnTriggerSystem
private void OnTrigger(EntityUid uid, SmokeOnTriggerComponent comp, TriggerEvent args)
{
var xform = Transform(uid);
var mapCoords = _xformSystem.GetMapCoordinates((uid, xform));
if (!_mapMan.TryFindGridAt(mapCoords, out _, out var grid) ||
if (!_mapMan.TryFindGridAt(xform.MapPosition, out _, out var grid) ||
!grid.TryGetTileRef(xform.Coordinates, out var tileRef) ||
tileRef.Tile.IsSpace())
{
return;
}
var coords = grid.MapToGrid(mapCoords);
var coords = grid.MapToGrid(xform.MapPosition);
var ent = Spawn(comp.SmokePrototype, coords.SnapToGrid());
if (!TryComp<SmokeComponent>(ent, out var smoke))
{

View File

@@ -186,7 +186,7 @@ namespace Content.Server.Explosion.EntitySystems
// Gets location of the implant
var ownerXform = Transform(uid);
var pos = _transformSystem.GetMapCoordinates((uid, ownerXform));
var pos = ownerXform.MapPosition;
var x = (int) pos.X;
var y = (int) pos.Y;
var posText = $"({x}, {y})";