Remove 700 usages of Component.Owner (#21100)
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
using Content.Server.Power.Components;
|
||||
using Content.Server.Station.Systems;
|
||||
using Content.Shared.AlertLevel;
|
||||
using Robust.Server.GameObjects;
|
||||
|
||||
namespace Content.Server.AlertLevel;
|
||||
|
||||
@@ -19,9 +18,10 @@ public sealed class AlertLevelDisplaySystem : EntitySystem
|
||||
|
||||
private void OnAlertChanged(AlertLevelChangedEvent args)
|
||||
{
|
||||
foreach (var (_, appearance) in EntityManager.EntityQuery<AlertLevelDisplayComponent, AppearanceComponent>())
|
||||
var query = EntityQueryEnumerator<AlertLevelDisplayComponent, AppearanceComponent>();
|
||||
while (query.MoveNext(out var uid, out _, out var appearance))
|
||||
{
|
||||
_appearance.SetData(appearance.Owner, AlertLevelDisplay.CurrentLevel, args.AlertLevel, appearance);
|
||||
_appearance.SetData(uid, AlertLevelDisplay.CurrentLevel, args.AlertLevel, appearance);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user