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,9 +1,7 @@
using System.Linq;
using Content.Client.Actions;
using Content.Client.Items;
using Content.Client.Message;
using Content.Client.Stylesheets;
using Content.Shared.Actions;
using Content.Shared.DeviceNetwork.Components;
using Content.Shared.DeviceNetwork.Systems;
using Content.Shared.Input;
@@ -94,9 +92,10 @@ public sealed class NetworkConfiguratorSystem : SharedNetworkConfiguratorSystem
return;
}
foreach (var tracker in EntityQuery<NetworkConfiguratorActiveLinkOverlayComponent>())
var query = EntityQueryEnumerator<NetworkConfiguratorActiveLinkOverlayComponent>();
while (query.MoveNext(out var uid, out _))
{
RemCompDeferred<NetworkConfiguratorActiveLinkOverlayComponent>(tracker.Owner);
RemCompDeferred<NetworkConfiguratorActiveLinkOverlayComponent>(uid);
}
_actions.RemoveAction(overlay.Action);