Clean up some parts of ExplosionSystem (#40485)

* Clean up some parts of ExplosionSystem

* Update Content.Shared/Damage/DamageSpecifier.cs

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>

* Review

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
This commit is contained in:
Leon Friedrich
2025-09-29 05:23:40 +13:00
committed by GitHub
parent fd5f9d7f60
commit f2d4317258
10 changed files with 109 additions and 54 deletions

View File

@@ -52,7 +52,7 @@ public sealed partial class ExplosionSystem
// get the epicenter tile indices
if (_mapManager.TryFindGridAt(epicenter, out var gridUid, out var candidateGrid) &&
_mapSystem.TryGetTileRef(gridUid, candidateGrid, _mapSystem.WorldToTile(gridUid, candidateGrid, epicenter.Position), out var tileRef) &&
_map.TryGetTileRef(gridUid, candidateGrid, _map.WorldToTile(gridUid, candidateGrid, epicenter.Position), out var tileRef) &&
!tileRef.Tile.IsEmpty)
{
epicentreGrid = gridUid;
@@ -62,7 +62,7 @@ public sealed partial class ExplosionSystem
{
// reference grid defines coordinate system that the explosion in space will use
var gridComp = Comp<MapGridComponent>(referenceGrid.Value);
initialTile = _mapSystem.WorldToTile(referenceGrid.Value, gridComp, epicenter.Position);
initialTile = _map.WorldToTile(referenceGrid.Value, gridComp, epicenter.Position);
}
else
{