Remove 700 usages of Component.Owner (#21100)
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
using Content.Server.Polymorph.Systems;
|
||||
using Content.Server.Xenoarchaeology.XenoArtifacts.Effects.Components;
|
||||
using Content.Server.Xenoarchaeology.XenoArtifacts.Events;
|
||||
using Content.Shared.Humanoid;
|
||||
using Content.Server.Polymorph.Systems;
|
||||
using Content.Shared.Mobs.Systems;
|
||||
using Content.Shared.Polymorph;
|
||||
|
||||
namespace Content.Server.Xenoarchaeology.XenoArtifacts.Effects.Systems;
|
||||
|
||||
@@ -28,7 +27,10 @@ public sealed class PolyArtifactSystem : EntitySystem
|
||||
private void OnActivate(EntityUid uid, PolyArtifactComponent component, ArtifactActivatedEvent args)
|
||||
{
|
||||
var xform = Transform(uid);
|
||||
foreach (var comp in _lookup.GetComponentsInRange<HumanoidAppearanceComponent>(xform.Coordinates, component.Range))
|
||||
var humanoids = new HashSet<Entity<HumanoidAppearanceComponent>>();
|
||||
_lookup.GetEntitiesInRange(xform.Coordinates, component.Range, humanoids);
|
||||
|
||||
foreach (var comp in humanoids)
|
||||
{
|
||||
var target = comp.Owner;
|
||||
if (_mob.IsAlive(target))
|
||||
|
||||
@@ -23,7 +23,7 @@ public sealed class ShuffleArtifactSystem : EntitySystem
|
||||
var mobState = GetEntityQuery<MobStateComponent>();
|
||||
|
||||
List<EntityCoordinates> allCoords = new();
|
||||
List<TransformComponent> toShuffle = new();
|
||||
List<Entity<TransformComponent>> toShuffle = new();
|
||||
|
||||
foreach (var ent in _lookup.GetEntitiesInRange(uid, component.Radius, LookupFlags.Dynamic | LookupFlags.Sundries))
|
||||
{
|
||||
@@ -32,7 +32,7 @@ public sealed class ShuffleArtifactSystem : EntitySystem
|
||||
|
||||
var xform = Transform(ent);
|
||||
|
||||
toShuffle.Add(xform);
|
||||
toShuffle.Add((ent, xform));
|
||||
allCoords.Add(xform.Coordinates);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user