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

@@ -2,7 +2,6 @@ using System.Linq;
using Content.Server.Chat.Systems;
using Content.Server.Station.Systems;
using Content.Shared.CCVar;
using Content.Shared.PDA;
using Robust.Shared.Audio;
using Robust.Shared.Configuration;
using Robust.Shared.Prototypes;
@@ -83,7 +82,8 @@ public sealed class AlertLevelSystem : EntitySystem
return;
}
foreach (var comp in EntityQuery<AlertLevelComponent>())
var query = EntityQueryEnumerator<AlertLevelComponent>();
while (query.MoveNext(out var uid, out var comp))
{
comp.AlertLevels = alerts;
@@ -95,7 +95,7 @@ public sealed class AlertLevelSystem : EntitySystem
defaultLevel = comp.AlertLevels.Levels.Keys.First();
}
SetLevel(comp.Owner, defaultLevel, true, true, true);
SetLevel(uid, defaultLevel, true, true, true);
}
}