Skip to content

Commit

Permalink
Only consider TileSets with AllowToPlace=yes when looking up connecte…
Browse files Browse the repository at this point in the history
…d tiles
  • Loading branch information
Rampastring committed Jun 18, 2024
1 parent e115f81 commit 27e3812
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/TSMapEditor/Mutations/Classes/DrawCliffMutation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ private void PlaceCliffs(CliffAStarNode endNode)
{
if (node.Tile != null)
{
var tileSet = MutationTarget.Map.TheaterInstance.Theater.FindTileSet(node.Tile.TileSetName);
var tileSet = MutationTarget.Map.TheaterInstance.Theater.TileSets.Find(ts => ts.SetName == node.Tile.TileSetName && ts.AllowToPlace);
if (tileSet != null)
{
int tileIndex;
Expand Down
2 changes: 1 addition & 1 deletion src/TSMapEditor/UI/Windows/MainMenuWindows/MapSetup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ private static void FillConnectedTileFoundations(TheaterGraphics theaterGraphics
cliffTypeTile.Foundation = new HashSet<GameMath.Point2D>();

int firstTileIndexWithinSet = cliffTypeTile.IndicesInTileSet[0];
var tileSet = theaterGraphics.Theater.TileSets.Find(ts => ts.SetName == cliffTypeTile.TileSetName);
var tileSet = theaterGraphics.Theater.TileSets.Find(ts => ts.SetName == cliffTypeTile.TileSetName && ts.AllowToPlace);
if (tileSet == null)
{
throw new INIConfigException($"Unable to find TileSet \"{cliffTypeTile.TileSetName}\" " +
Expand Down

0 comments on commit 27e3812

Please sign in to comment.