Replace obsolete GetTilesIntersecting methods (#32455)
* Remove usage of obsolete GetTilesIntersecting round 1 * Oop wrong uids * Remove usage of obsolete GetLocalTilesIntersecting round 2 * Remove usage of obsolete GetLocalTilesIntersecting final round * weh * Fix using `SharedMapSystem` in `StencilOverlay`
This commit is contained in:
@@ -43,6 +43,7 @@ public sealed partial class RevenantSystem
|
||||
[Dependency] private readonly TileSystem _tile = default!;
|
||||
[Dependency] private readonly EntityWhitelistSystem _whitelistSystem = default!;
|
||||
[Dependency] private readonly SharedTransformSystem _transformSystem = default!;
|
||||
[Dependency] private readonly SharedMapSystem _mapSystem = default!;
|
||||
|
||||
private void InitializeAbilities()
|
||||
{
|
||||
@@ -228,8 +229,12 @@ public sealed partial class RevenantSystem
|
||||
var xform = Transform(uid);
|
||||
if (!TryComp<MapGridComponent>(xform.GridUid, out var map))
|
||||
return;
|
||||
var tiles = map.GetTilesIntersecting(Box2.CenteredAround(_transformSystem.GetWorldPosition(xform),
|
||||
new Vector2(component.DefileRadius * 2, component.DefileRadius))).ToArray();
|
||||
var tiles = _mapSystem.GetTilesIntersecting(
|
||||
xform.GridUid.Value,
|
||||
map,
|
||||
Box2.CenteredAround(_transformSystem.GetWorldPosition(xform),
|
||||
new Vector2(component.DefileRadius * 2, component.DefileRadius)))
|
||||
.ToArray();
|
||||
|
||||
_random.Shuffle(tiles);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user