Remove 700 usages of Component.Owner (#21100)

This commit is contained in:
DrSmugleaf
2023-10-19 12:34:31 -07:00
committed by GitHub
parent 5825ffb95c
commit f560f88eb5
261 changed files with 2291 additions and 2036 deletions

View File

@@ -1,3 +1,6 @@
using Content.Server.Singularity.Components;
using Content.Shared.Ghost;
using Content.Shared.Singularity.EntitySystems;
using Robust.Shared.Map;
using Robust.Shared.Map.Components;
using Robust.Shared.Physics;
@@ -5,10 +8,6 @@ using Robust.Shared.Physics.Components;
using Robust.Shared.Physics.Systems;
using Robust.Shared.Timing;
using Content.Shared.Singularity.EntitySystems;
using Content.Server.Singularity.Components;
using Content.Shared.Ghost;
namespace Content.Server.Singularity.EntitySystems;
/// <summary>
@@ -58,11 +57,12 @@ public sealed class GravityWellSystem : SharedGravityWellSystem
if(!_timing.IsFirstTimePredicted)
return;
foreach(var (gravWell, xform) in EntityManager.EntityQuery<GravityWellComponent, TransformComponent>())
var query = EntityQueryEnumerator<GravityWellComponent, TransformComponent>();
while (query.MoveNext(out var uid, out var gravWell, out var xform))
{
var curTime = _timing.CurTime;
if (gravWell.NextPulseTime <= curTime)
Update(gravWell.Owner, curTime - gravWell.LastPulseTime, gravWell, xform);
Update(uid, curTime - gravWell.LastPulseTime, gravWell, xform);
}
}