From 5094c9574cae8a50af17fa61c564e337c284934a Mon Sep 17 00:00:00 2001 From: Piegames <14054505+piegamesde@users.noreply.github.com> Date: Tue, 24 Apr 2018 22:05:17 +0200 Subject: [PATCH] Correct wall texture next to doors --- Assets/Scripts/Generation/DungeonGenerator.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Assets/Scripts/Generation/DungeonGenerator.cs b/Assets/Scripts/Generation/DungeonGenerator.cs index 5f4adcc..fd0980a 100644 --- a/Assets/Scripts/Generation/DungeonGenerator.cs +++ b/Assets/Scripts/Generation/DungeonGenerator.cs @@ -221,6 +221,14 @@ public class DungeonGenerator { for (int y = -TUNNEL_THICKNESS; y < TUNNEL_THICKNESS; y++) if (r.tiles.ContainsKey(v + new Vector2Int(x, y)) && r.tiles[v + new Vector2Int(x, y)].type == Room.TileType.ROCK) r.tiles[v + new Vector2Int(x, y)].type = Room.TileType.GROUND; + if (r.tiles.ContainsKey(v + new Vector2Int(0, 1)) && r.tiles[v + new Vector2Int(0, 1)].type == Room.TileType.WALL) + r.tiles.Remove(v + new Vector2Int(0, 1)); + if (r.tiles.ContainsKey(v + new Vector2Int(0, -1)) && r.tiles[v + new Vector2Int(0, -1)].type == Room.TileType.WALL) + r.tiles.Remove(v + new Vector2Int(0, -1)); + if (r.tiles.ContainsKey(v + new Vector2Int(1, 0)) && r.tiles[v + new Vector2Int(1, 0)].type == Room.TileType.WALL) + r.tiles.Remove(v + new Vector2Int(1, 0)); + if (r.tiles.ContainsKey(v + new Vector2Int(-1, 0)) && r.tiles[v + new Vector2Int(-1, 0)].type == Room.TileType.WALL) + r.tiles.Remove(v + new Vector2Int(-1, 0)); } }