Skip to content

Commit

Permalink
Add missing cell height checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Starkku committed Jun 19, 2024
1 parent 669c9b9 commit 4cab9da
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ public override void Perform()
else
{
var targetTile = MutationTarget.Map.GetTile(targetCellCoords);

if (targetTile == null || targetTile.Level <= 0)
return;

var tilesToProcess = Helpers.GetFillAreaTiles(targetTile, MutationTarget.Map, MutationTarget.TheaterGraphics);

// Process tiles
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ public override void Perform()
else
{
var targetTile = MutationTarget.Map.GetTile(targetCellCoords);

if (targetTile == null || targetTile.Level >= Constants.MaxMapHeightLevel)
return;

var tilesToProcess = Helpers.GetFillAreaTiles(targetTile, MutationTarget.Map, MutationTarget.TheaterGraphics);

// Process tiles
Expand Down

0 comments on commit 4cab9da

Please sign in to comment.