* Revert "Fix chat bubbles (#25643)" This reverts commit23d2c4d924. * Revert "Fixes obsolete Transform warnings in Content. (#25256)" This reverts commitf284b43ff6.
This commit is contained in:
@@ -23,7 +23,6 @@ public sealed class ContainmentFieldGeneratorSystem : EntitySystem
|
||||
[Dependency] private readonly PopupSystem _popupSystem = default!;
|
||||
[Dependency] private readonly SharedPointLightSystem _light = default!;
|
||||
[Dependency] private readonly TagSystem _tags = default!;
|
||||
[Dependency] private readonly SharedTransformSystem _xformSystem = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
@@ -234,7 +233,7 @@ public sealed class ContainmentFieldGeneratorSystem : EntitySystem
|
||||
if (!gen1XForm.Anchored)
|
||||
return false;
|
||||
|
||||
var genWorldPosRot = _xformSystem.GetWorldPositionRotation(gen1XForm);
|
||||
var genWorldPosRot = gen1XForm.GetWorldPositionRotation();
|
||||
var dirRad = dir.ToAngle() + genWorldPosRot.WorldRotation; //needs to be like this for the raycast to work properly
|
||||
|
||||
var ray = new CollisionRay(genWorldPosRot.WorldPosition, dirRad.ToVec(), component.CollisionMask);
|
||||
@@ -311,14 +310,14 @@ public sealed class ContainmentFieldGeneratorSystem : EntitySystem
|
||||
var newField = Spawn(firstGen.Comp.CreatedField, currentCoords);
|
||||
|
||||
var fieldXForm = Transform(newField);
|
||||
_xformSystem.SetParent(newField, fieldXForm, firstGen);
|
||||
fieldXForm.AttachParent(firstGen);
|
||||
if (dirVec.GetDir() == Direction.East || dirVec.GetDir() == Direction.West)
|
||||
{
|
||||
var angle = fieldXForm.LocalPosition.ToAngle();
|
||||
var rotateBy90 = angle.Degrees + 90;
|
||||
var rotatedAngle = Angle.FromDegrees(rotateBy90);
|
||||
|
||||
_xformSystem.SetLocalRotation(newField, rotatedAngle, fieldXForm);
|
||||
fieldXForm.LocalRotation = rotatedAngle;
|
||||
}
|
||||
|
||||
fieldList.Add(newField);
|
||||
|
||||
@@ -13,7 +13,6 @@ public sealed class ContainmentFieldSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly ThrowingSystem _throwing = default!;
|
||||
[Dependency] private readonly PopupSystem _popupSystem = default!;
|
||||
[Dependency] private readonly SharedTransformSystem _xformSystem = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
@@ -35,8 +34,8 @@ public sealed class ContainmentFieldSystem : EntitySystem
|
||||
|
||||
if (TryComp<PhysicsComponent>(otherBody, out var physics) && physics.Mass <= component.MaxMass && physics.Hard)
|
||||
{
|
||||
var fieldDir = _xformSystem.GetWorldPosition(uid);
|
||||
var playerDir = _xformSystem.GetWorldPosition(otherBody);
|
||||
var fieldDir = Transform(uid).WorldPosition;
|
||||
var playerDir = Transform(otherBody).WorldPosition;
|
||||
|
||||
_throwing.TryThrow(otherBody, playerDir-fieldDir, strength: component.ThrowForce);
|
||||
}
|
||||
|
||||
@@ -165,7 +165,7 @@ public sealed class EventHorizonSystem : SharedEventHorizonSystem
|
||||
var range2 = range * range;
|
||||
var xformQuery = EntityManager.GetEntityQuery<TransformComponent>();
|
||||
var epicenter = _xformSystem.GetWorldPosition(xform, xformQuery);
|
||||
foreach (var entity in _lookup.GetEntitiesInRange(_xformSystem.GetMapCoordinates((uid, xform)), range, flags: LookupFlags.Uncontained))
|
||||
foreach (var entity in _lookup.GetEntitiesInRange(xform.MapPosition, range, flags: LookupFlags.Uncontained))
|
||||
{
|
||||
if (entity == uid)
|
||||
continue;
|
||||
@@ -295,7 +295,7 @@ public sealed class EventHorizonSystem : SharedEventHorizonSystem
|
||||
if (!Resolve(uid, ref xform) || !Resolve(uid, ref eventHorizon))
|
||||
return;
|
||||
|
||||
var mapPos = _xformSystem.GetMapCoordinates((uid, xform));
|
||||
var mapPos = xform.MapPosition;
|
||||
var box = Box2.CenteredAround(mapPos.Position, new Vector2(range, range));
|
||||
var circle = new Circle(mapPos.Position, range);
|
||||
var grids = new List<Entity<MapGridComponent>>();
|
||||
|
||||
Reference in New Issue
Block a user