Remove Explicit GridId References (#8315)

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
Acruid
2022-06-11 18:54:41 -07:00
committed by GitHub
parent 846321cebb
commit 4f9be42f40
131 changed files with 531 additions and 588 deletions

View File

@@ -1,4 +1,4 @@
using System.Linq;
using System.Linq;
using Content.Server.Cleanable;
using Content.Server.Decals;
using Content.Shared.Chemistry.Reaction;
@@ -39,9 +39,9 @@ namespace Content.Server.Chemistry.TileReactions
}
var decalSystem = EntitySystem.Get<DecalSystem>();
foreach (var (uid, _) in decalSystem.GetDecalsInRange(tile.GridIndex, tile.GridIndices+new Vector2(0.5f, 0.5f), validDelegate: x => x.Cleanable))
foreach (var (uid, _) in decalSystem.GetDecalsInRange(tile.GridUid, tile.GridIndices+new Vector2(0.5f, 0.5f), validDelegate: x => x.Cleanable))
{
decalSystem.RemoveDecal(tile.GridIndex, uid);
decalSystem.RemoveDecal(tile.GridUid, uid);
}
return amount;

View File

@@ -1,4 +1,4 @@
using Content.Server.Atmos.EntitySystems;
using Content.Server.Atmos.EntitySystems;
using Content.Shared.Atmos;
using Content.Shared.Chemistry.Reaction;
using Content.Shared.Chemistry.Reagent;
@@ -21,17 +21,17 @@ namespace Content.Server.Chemistry.TileReactions
var atmosphereSystem = EntitySystem.Get<AtmosphereSystem>();
var environment = atmosphereSystem.GetTileMixture(tile.GridIndex, tile.GridIndices, true);
var environment = atmosphereSystem.GetTileMixture(tile.GridUid, tile.GridIndices, true);
if (environment == null || !atmosphereSystem.IsHotspotActive(tile.GridIndex, tile.GridIndices))
if (environment == null || !atmosphereSystem.IsHotspotActive(tile.GridUid, tile.GridIndices))
return FixedPoint2.Zero;
environment.Temperature =
MathF.Max(MathF.Min(environment.Temperature - (_coolingTemperature * 1000f),
environment.Temperature / _coolingTemperature), Atmospherics.TCMB);
atmosphereSystem.React(tile.GridIndex, tile.GridIndices);
atmosphereSystem.HotspotExtinguish(tile.GridIndex, tile.GridIndices);
atmosphereSystem.React(tile.GridUid, tile.GridIndices);
atmosphereSystem.HotspotExtinguish(tile.GridUid, tile.GridIndices);
return FixedPoint2.Zero;
}

View File

@@ -1,4 +1,4 @@
using Content.Server.Atmos.EntitySystems;
using Content.Server.Atmos.EntitySystems;
using Content.Shared.Chemistry.Reaction;
using Content.Shared.Chemistry.Reagent;
using Content.Shared.FixedPoint;
@@ -20,12 +20,12 @@ namespace Content.Server.Chemistry.TileReactions
var atmosphereSystem = EntitySystem.Get<AtmosphereSystem>();
var environment = atmosphereSystem.GetTileMixture(tile.GridIndex, tile.GridIndices, true);
if (environment == null || !atmosphereSystem.IsHotspotActive(tile.GridIndex, tile.GridIndices))
var environment = atmosphereSystem.GetTileMixture(tile.GridUid, tile.GridIndices, true);
if (environment == null || !atmosphereSystem.IsHotspotActive(tile.GridUid, tile.GridIndices))
return FixedPoint2.Zero;
environment.Temperature *= MathF.Max(_temperatureMultiplier * reactVolume.Float(), 1f);
atmosphereSystem.React(tile.GridIndex, tile.GridIndices);
atmosphereSystem.React(tile.GridUid, tile.GridIndices);
return reactVolume;
}