Spreaders travels across connected grids and SpreaderIgnore tag (#15419)

This commit is contained in:
metalgearsloth
2023-04-25 06:04:49 +10:00
committed by GitHub
parent 028c363608
commit 1cde3ff112
8 changed files with 85 additions and 58 deletions

View File

@@ -28,7 +28,7 @@ public sealed class KudzuSystem : EntitySystem
return;
}
if (args.NeighborFreeTiles.Count == 0 || args.Grid == null)
if (args.NeighborFreeTiles.Count == 0)
{
RemCompDeferred<EdgeSpreaderComponent>(uid);
return;
@@ -47,7 +47,7 @@ public sealed class KudzuSystem : EntitySystem
foreach (var neighbor in args.NeighborFreeTiles)
{
var neighborUid = Spawn(prototype, args.Grid.GridTileToLocal(neighbor));
var neighborUid = Spawn(prototype, neighbor.Grid.GridTileToLocal(neighbor.Tile));
EnsureComp<EdgeSpreaderComponent>(neighborUid);
args.Updates--;