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,4 +1,3 @@
using System.Linq;
using System.Numerics;
using Content.Shared.Radiation.Components;
using Robust.Client.Graphics;
@@ -81,11 +80,10 @@ namespace Content.Client.Radiation.Overlays
var currentEyeLoc = currentEye.Position;
var pulses = _entityManager.EntityQuery<RadiationPulseComponent>();
foreach (var pulse in pulses) //Add all pulses that are not added yet but qualify
var pulses = _entityManager.EntityQueryEnumerator<RadiationPulseComponent>();
//Add all pulses that are not added yet but qualify
while (pulses.MoveNext(out var pulseEntity, out var pulse))
{
var pulseEntity = pulse.Owner;
if (!_pulses.ContainsKey(pulseEntity) && PulseQualifies(pulseEntity, currentEyeLoc))
{
_pulses.Add(