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

@@ -118,13 +118,13 @@ namespace Content.Server.StationEvents.Events
if (!_foundTile ||
_targetGrid == default ||
_entityManager.Deleted(_targetGrid) ||
!atmosphereSystem.IsSimulatedGrid(_entityManager.GetComponent<TransformComponent>(_targetGrid).GridID))
!atmosphereSystem.IsSimulatedGrid(_entityManager.GetComponent<TransformComponent>(_targetGrid).GridEntityId))
{
Running = false;
return;
}
var environment = atmosphereSystem.GetTileMixture(_entityManager.GetComponent<TransformComponent>(_targetGrid).GridID, _targetTile, true);
var environment = atmosphereSystem.GetTileMixture(_entityManager.GetComponent<TransformComponent>(_targetGrid).GridEntityId, _targetTile, true);
environment?.AdjustMoles(_leakGas, LeakCooldown * _molesPerSecond);
}
@@ -151,14 +151,14 @@ namespace Content.Server.StationEvents.Events
if (!_foundTile ||
_targetGrid == default ||
(!_entityManager.EntityExists(_targetGrid) ? EntityLifeStage.Deleted : _entityManager.GetComponent<MetaDataComponent>(_targetGrid).EntityLifeStage) >= EntityLifeStage.Deleted ||
!atmosphereSystem.IsSimulatedGrid(_entityManager.GetComponent<TransformComponent>(_targetGrid).GridID))
!atmosphereSystem.IsSimulatedGrid(_entityManager.GetComponent<TransformComponent>(_targetGrid).GridEntityId))
{
return;
}
// Don't want it to be so obnoxious as to instantly murder anyone in the area but enough that
// it COULD start potentially start a bigger fire.
atmosphereSystem.HotspotExpose(_entityManager.GetComponent<TransformComponent>(_targetGrid).GridID, _targetTile, 700f, 50f, true);
atmosphereSystem.HotspotExpose(_entityManager.GetComponent<TransformComponent>(_targetGrid).GridEntityId, _targetTile, 700f, 50f, true);
SoundSystem.Play(Filter.Pvs(_targetCoords), "/Audio/Effects/sparks4.ogg", _targetCoords);
}
}

View File

@@ -86,7 +86,7 @@ namespace Content.Server.StationEvents.Events
if (!_entityManager.TryGetComponent<IMapGridComponent>(stationEnt, out var grid))
return;
if (mapManager.IsGridPaused(grid.GridIndex))
if (mapManager.IsGridPaused(grid.Owner))
return;
SpawnPulse(grid.Grid);
@@ -112,7 +112,7 @@ namespace Content.Server.StationEvents.Events
private bool TryFindRandomGrid(IMapGrid mapGrid, out EntityCoordinates coordinates)
{
if (!mapGrid.Index.IsValid())
if (!(mapGrid.GridEntityId).IsValid())
{
coordinates = default;
return false;