Even more resolve removals.
This commit is contained in:
@@ -12,6 +12,7 @@ namespace Content.Server.Radiation
|
||||
[UsedImplicitly]
|
||||
public sealed class RadiationPulseSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly IEntityManager _entMan = default!;
|
||||
[Dependency] private readonly IEntityLookup _lookup = default!;
|
||||
|
||||
private const float RadiationCooldown = 0.5f;
|
||||
@@ -33,16 +34,16 @@ namespace Content.Server.Radiation
|
||||
comp.Update(RadiationCooldown);
|
||||
var ent = comp.Owner;
|
||||
|
||||
if ((!IoCManager.Resolve<IEntityManager>().EntityExists(ent) ? EntityLifeStage.Deleted : IoCManager.Resolve<IEntityManager>().GetComponent<MetaDataComponent>(ent).EntityLifeStage) >= EntityLifeStage.Deleted) continue;
|
||||
if ((!_entMan.EntityExists(ent) ? EntityLifeStage.Deleted : _entMan.GetComponent<MetaDataComponent>(ent).EntityLifeStage) >= EntityLifeStage.Deleted) continue;
|
||||
|
||||
foreach (var entity in _lookup.GetEntitiesInRange(IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(ent).Coordinates, comp.Range))
|
||||
foreach (var entity in _lookup.GetEntitiesInRange(_entMan.GetComponent<TransformComponent>(ent).Coordinates, comp.Range))
|
||||
{
|
||||
// For now at least still need this because it uses a list internally then returns and this may be deleted before we get to it.
|
||||
if ((!IoCManager.Resolve<IEntityManager>().EntityExists(entity) ? EntityLifeStage.Deleted : IoCManager.Resolve<IEntityManager>().GetComponent<MetaDataComponent>(entity).EntityLifeStage) >= EntityLifeStage.Deleted) continue;
|
||||
if ((!_entMan.EntityExists(entity) ? EntityLifeStage.Deleted : _entMan.GetComponent<MetaDataComponent>(entity).EntityLifeStage) >= EntityLifeStage.Deleted) continue;
|
||||
|
||||
// Note: Radiation is liable for a refactor (stinky Sloth coding a basic version when he did StationEvents)
|
||||
// so this ToArray doesn't really matter.
|
||||
foreach (var radiation in IoCManager.Resolve<IEntityManager>().GetComponents<IRadiationAct>(entity).ToArray())
|
||||
foreach (var radiation in _entMan.GetComponents<IRadiationAct>(entity).ToArray())
|
||||
{
|
||||
radiation.RadiationAct(RadiationCooldown, comp);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user