Remove 700 usages of Component.Owner (#21100)
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
using Content.Server.Morgue.Components;
|
||||
using Content.Server.Storage.Components;
|
||||
using Content.Shared.Body.Components;
|
||||
using Content.Shared.Examine;
|
||||
@@ -79,20 +78,21 @@ public sealed class MorgueSystem : EntitySystem
|
||||
{
|
||||
base.Update(frameTime);
|
||||
|
||||
foreach (var (comp, storage, appearance) in EntityQuery<MorgueComponent, EntityStorageComponent, AppearanceComponent>())
|
||||
var query = EntityQueryEnumerator<MorgueComponent, EntityStorageComponent, AppearanceComponent>();
|
||||
while (query.MoveNext(out var uid, out var comp, out var storage, out var appearance))
|
||||
{
|
||||
comp.AccumulatedFrameTime += frameTime;
|
||||
|
||||
CheckContents(comp.Owner, comp, storage);
|
||||
CheckContents(uid, comp, storage);
|
||||
|
||||
if (comp.AccumulatedFrameTime < comp.BeepTime)
|
||||
continue;
|
||||
|
||||
comp.AccumulatedFrameTime -= comp.BeepTime;
|
||||
|
||||
if (comp.DoSoulBeep && _appearance.TryGetData<MorgueContents>(appearance.Owner, MorgueVisuals.Contents, out var contents, appearance) && contents == MorgueContents.HasSoul)
|
||||
if (comp.DoSoulBeep && _appearance.TryGetData<MorgueContents>(uid, MorgueVisuals.Contents, out var contents, appearance) && contents == MorgueContents.HasSoul)
|
||||
{
|
||||
_audio.PlayPvs(comp.OccupantHasSoulAlarmSound, comp.Owner);
|
||||
_audio.PlayPvs(comp.OccupantHasSoulAlarmSound, uid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user