This commit is contained in:
Swept
2020-09-20 15:29:11 +00:00
committed by GitHub
parent 9c72008ece
commit 0ea8792501
22 changed files with 24 additions and 45 deletions

View File

@@ -20,9 +20,6 @@ namespace Content.Server.GameObjects.Components.Atmos
[RegisterComponent]
public class AirtightComponent : Component, IMapInit
{
[Dependency] private readonly IMapManager _mapManager = default!;
[Dependency] private readonly IEntityManager _entityManager = default!;
private (GridId, MapIndices) _lastPosition;
private AtmosphereSystem _atmosphereSystem = default!;
@@ -86,7 +83,7 @@ namespace Content.Server.GameObjects.Components.Atmos
// will not be airtight. A warning is much easier to track down than the object magically
// not being airtight, so log one if the SnapGrid component is missing.
if (!Owner.EnsureComponent(out SnapGridComponent _))
Logger.Warning($"Entity {Owner} at {Owner.Transform.MapPosition.ToString()} didn't have a {nameof(SnapGridComponent)}");
Logger.Warning($"Entity {Owner} at {Owner.Transform.MapPosition} didn't have a {nameof(SnapGridComponent)}");
Owner.EntityManager.EventBus.SubscribeEvent<RotateEvent>(EventSource.Local, this, RotateEvent);
@@ -106,7 +103,7 @@ namespace Content.Server.GameObjects.Components.Atmos
var newAirBlockedDirs = AtmosDirection.Invalid;
// TODO ATMOS MULTIZ When we make multiZ atmos, special case this.
for (int i = 0; i < Atmospherics.Directions; i++)
for (var i = 0; i < Atmospherics.Directions; i++)
{
var direction = (AtmosDirection) (1 << i);
if (!AirBlockedDirection.HasFlag(direction)) continue;

View File

@@ -14,7 +14,6 @@ using Robust.Server.Interfaces.Player;
using Robust.Shared.GameObjects;
using Robust.Shared.GameObjects.Systems;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Map;
using Robust.Shared.IoC;
using Robust.Shared.Localization;
using Robust.Shared.Map;
@@ -25,7 +24,6 @@ namespace Content.Server.GameObjects.Components.Atmos
[RegisterComponent]
public class GasAnalyzerComponent : SharedGasAnalyzerComponent, IAfterInteract, IDropped, IUse
{
[Dependency] private readonly IMapManager _mapManager = default!;
[Dependency] private readonly IEntityManager _entityManager = default!;
private GasAnalyzerDanger _pressureDanger;