Fix 3000 errors

This commit is contained in:
DrSmugleaf
2021-12-05 18:09:01 +01:00
parent 2bfec7ec62
commit 2a3b7d809d
569 changed files with 2979 additions and 3280 deletions

View File

@@ -19,17 +19,16 @@ using Robust.Shared.Map;
using Robust.Shared.Maths;
using Robust.Shared.Timing;
// ReSharper disable once RedundantUsingDirective
using Dependency = Robust.Shared.IoC.DependencyAttribute;
namespace Content.Server.Atmos.EntitySystems
{
[UsedImplicitly]
internal sealed class GasTileOverlaySystem : SharedGasTileOverlaySystem
{
[Dependency] private readonly IGameTiming _gameTiming = default!;
[Dependency] private readonly IPlayerManager _playerManager = default!;
[Dependency] private readonly IMapManager _mapManager = default!;
[Dependency] private readonly AtmosphereSystem _atmosphereSystem = default!;
[Robust.Shared.IoC.Dependency] private readonly IGameTiming _gameTiming = default!;
[Robust.Shared.IoC.Dependency] private readonly IPlayerManager _playerManager = default!;
[Robust.Shared.IoC.Dependency] private readonly IMapManager _mapManager = default!;
[Robust.Shared.IoC.Dependency] private readonly AtmosphereSystem _atmosphereSystem = default!;
/// <summary>
/// The tiles that have had their atmos data updated since last tick
@@ -190,7 +189,7 @@ namespace Content.Server.Atmos.EntitySystems
/// </summary>
/// <param name="entity"></param>
/// <returns></returns>
private List<GasOverlayChunk> GetChunksInRange(IEntity entity)
private List<GasOverlayChunk> GetChunksInRange(EntityUid entity)
{
var inRange = new List<GasOverlayChunk>();
@@ -311,10 +310,10 @@ namespace Content.Server.Atmos.EntitySystems
// Afterwards we reset all the chunk data for the next time we tick.
foreach (var (session, overlay) in _knownPlayerChunks)
{
if (session.AttachedEntity == null) continue;
if (session.AttachedEntity is not {Valid: true} entity) continue;
// Get chunks in range and update if we've moved around or the chunks have new overlay data
var chunksInRange = GetChunksInRange(session.AttachedEntity);
var chunksInRange = GetChunksInRange(entity);
var knownChunks = overlay.GetKnownChunks();
var chunksToRemove = new List<GasOverlayChunk>();
var chunksToAdd = new List<GasOverlayChunk>();