Bunch more resolves removed.
This commit is contained in:
@@ -14,6 +14,8 @@ namespace Content.Server.Doors.Components
|
||||
[RegisterComponent]
|
||||
public class FirelockComponent : Component
|
||||
{
|
||||
[Dependency] private readonly IEntityManager _entMan = default!;
|
||||
|
||||
public override string Name => "Firelock";
|
||||
|
||||
[ComponentDependency]
|
||||
@@ -31,7 +33,7 @@ namespace Content.Server.Doors.Components
|
||||
if (DoorComponent != null && DoorComponent.State == SharedDoorComponent.DoorState.Open && DoorComponent.CanCloseGeneric())
|
||||
{
|
||||
DoorComponent.Close();
|
||||
if (IoCManager.Resolve<IEntityManager>().TryGetComponent(Owner, out AirtightComponent? airtight))
|
||||
if (_entMan.TryGetComponent(Owner, out AirtightComponent? airtight))
|
||||
{
|
||||
EntitySystem.Get<AirtightSystem>().SetAirblocked(airtight, true);
|
||||
}
|
||||
@@ -47,7 +49,7 @@ namespace Content.Server.Doors.Components
|
||||
var minMoles = float.MaxValue;
|
||||
var maxMoles = 0f;
|
||||
|
||||
foreach (var adjacent in atmosphereSystem.GetAdjacentTileMixtures(IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(Owner).Coordinates))
|
||||
foreach (var adjacent in atmosphereSystem.GetAdjacentTileMixtures(_entMan.GetComponent<TransformComponent>(Owner).Coordinates))
|
||||
{
|
||||
var moles = adjacent.TotalMoles;
|
||||
if (moles < minMoles)
|
||||
@@ -63,7 +65,7 @@ namespace Content.Server.Doors.Components
|
||||
{
|
||||
var atmosphereSystem = EntitySystem.Get<AtmosphereSystem>();
|
||||
|
||||
if (!atmosphereSystem.TryGetGridAndTile(IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(Owner).Coordinates, out var tuple))
|
||||
if (!atmosphereSystem.TryGetGridAndTile(_entMan.GetComponent<TransformComponent>(Owner).Coordinates, out var tuple))
|
||||
return false;
|
||||
|
||||
if (atmosphereSystem.GetTileMixture(tuple.Value.Grid, tuple.Value.Tile) == null)
|
||||
@@ -72,7 +74,7 @@ namespace Content.Server.Doors.Components
|
||||
if (atmosphereSystem.IsHotspotActive(tuple.Value.Grid, tuple.Value.Tile))
|
||||
return true;
|
||||
|
||||
foreach (var adjacent in atmosphereSystem.GetAdjacentTiles(IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(Owner).Coordinates))
|
||||
foreach (var adjacent in atmosphereSystem.GetAdjacentTiles(_entMan.GetComponent<TransformComponent>(Owner).Coordinates))
|
||||
{
|
||||
if (atmosphereSystem.IsHotspotActive(tuple.Value.Grid, adjacent))
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user