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,3 +1,4 @@
using System.Linq;
using Content.Server.Administration.Logs;
using Content.Server.Atmos.Components;
using Content.Server.Atmos.EntitySystems;
@@ -11,7 +12,6 @@ using Content.Shared.Inventory;
using Content.Shared.Rejuvenate;
using Content.Shared.Temperature;
using Robust.Server.GameObjects;
using System.Linq;
namespace Content.Server.Temperature.Systems;
@@ -28,7 +28,7 @@ public sealed class TemperatureSystem : EntitySystem
/// This is done because both AtmosExposed and Flammable call ChangeHeat in the same tick, meaning
/// that we need some mechanism to ensure it doesn't double dip on damage for both calls.
/// </summary>
public HashSet<TemperatureComponent> ShouldUpdateDamage = new();
public HashSet<Entity<TemperatureComponent>> ShouldUpdateDamage = new();
public float UpdateInterval = 1.0f;
@@ -99,7 +99,7 @@ public sealed class TemperatureSystem : EntitySystem
if (!ignoreHeatResistance)
{
var ev = new ModifyChangedTemperatureEvent(heatAmount);
RaiseLocalEvent(uid, ev, false);
RaiseLocalEvent(uid, ev);
heatAmount = ev.TemperatureDelta;
}
@@ -189,9 +189,9 @@ public sealed class TemperatureSystem : EntitySystem
}
}
private void EnqueueDamage(EntityUid uid, TemperatureComponent component, OnTemperatureChangeEvent args)
private void EnqueueDamage(Entity<TemperatureComponent> temperature, ref OnTemperatureChangeEvent args)
{
ShouldUpdateDamage.Add(component);
ShouldUpdateDamage.Add(temperature);
}
private void ChangeDamage(EntityUid uid, TemperatureComponent temperature)