Fix bluespace anomaly (#13968)
This commit is contained in:
@@ -3,7 +3,6 @@ using Content.Shared.Anomaly.Components;
|
|||||||
using Content.Shared.Anomaly.Effects.Components;
|
using Content.Shared.Anomaly.Effects.Components;
|
||||||
using Content.Shared.Mobs.Components;
|
using Content.Shared.Mobs.Components;
|
||||||
using Content.Shared.Teleportation.Components;
|
using Content.Shared.Teleportation.Components;
|
||||||
using Robust.Shared.Map;
|
|
||||||
using Robust.Shared.Random;
|
using Robust.Shared.Random;
|
||||||
|
|
||||||
namespace Content.Shared.Anomaly.Effects;
|
namespace Content.Shared.Anomaly.Effects;
|
||||||
@@ -32,17 +31,17 @@ public sealed class BluespaceAnomalySystem : EntitySystem
|
|||||||
allEnts.Add(uid);
|
allEnts.Add(uid);
|
||||||
|
|
||||||
var xformQuery = GetEntityQuery<TransformComponent>();
|
var xformQuery = GetEntityQuery<TransformComponent>();
|
||||||
var coords = new List<EntityCoordinates>();
|
var coords = new List<Vector2>();
|
||||||
foreach (var ent in allEnts)
|
foreach (var ent in allEnts)
|
||||||
{
|
{
|
||||||
if (xformQuery.TryGetComponent(ent, out var xf))
|
if (xformQuery.TryGetComponent(ent, out var xf))
|
||||||
coords.Add(xf.Coordinates);
|
coords.Add(xf.MapPosition.Position);
|
||||||
}
|
}
|
||||||
|
|
||||||
_random.Shuffle(coords);
|
_random.Shuffle(coords);
|
||||||
for (var i = 0; i < allEnts.Count; i++)
|
for (var i = 0; i < allEnts.Count; i++)
|
||||||
{
|
{
|
||||||
_xform.SetCoordinates(allEnts[i], coords[i]);
|
_xform.SetWorldPosition(allEnts[i], coords[i], xformQuery);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
sound:
|
sound:
|
||||||
path: /Audio/Ambience/anomaly_drone.ogg
|
path: /Audio/Ambience/anomaly_drone.ogg
|
||||||
- type: Transform
|
- type: Transform
|
||||||
anchored: true
|
anchored: false
|
||||||
- type: Physics
|
- type: Physics
|
||||||
bodyType: Static
|
bodyType: Static
|
||||||
- type: Fixtures
|
- type: Fixtures
|
||||||
|
|||||||
Reference in New Issue
Block a user