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,5 +1,3 @@
namespace Content.Server.Chat.Systems;
using System.Linq;
using Content.Shared.Chat.Prototypes;
using Robust.Shared.Prototypes;
@@ -7,6 +5,8 @@ using Robust.Shared.Random;
using Robust.Shared.Timing;
using Robust.Shared.Utility;
namespace Content.Server.Chat.Systems;
public sealed class AutoEmoteSystem : EntitySystem
{
[Dependency] private readonly IGameTiming _gameTiming = default!;
@@ -27,14 +27,13 @@ public sealed class AutoEmoteSystem : EntitySystem
base.Update(frameTime);
var curTime = _gameTiming.CurTime;
foreach (var autoEmote in EntityQuery<AutoEmoteComponent>())
var query = EntityQueryEnumerator<AutoEmoteComponent>();
while (query.MoveNext(out var uid, out var autoEmote))
{
var uid = autoEmote.Owner;
if (autoEmote.NextEmoteTime > curTime)
continue;
foreach ((var key, var time) in autoEmote.EmoteTimers)
foreach (var (key, time) in autoEmote.EmoteTimers)
{
if (time > curTime)
continue;