fix issue #1309 - secret doors in Garden rooms

Issue reported by elunna:  when a room gets converted into a theme
room with fill type Garden, its walls are changed to trees but any
secret doors in those walls are still displayed as regular walls.

This adds a new D_ARBOREAL flag for secret doors, used to force them
to be displayed as a tree instead of a wall.

Fixes #1309
This commit is contained in:
PatR
2025-04-12 17:21:40 -07:00
parent 8f344a30b5
commit e26a496088
5 changed files with 28 additions and 4 deletions

View File

@@ -1071,7 +1071,10 @@ end
-- postprocess callback: turn room walls into trees
function make_garden_walls(data)
local sel = data.sel:grow();
-- change walls to trees
des.replace_terrain({ selection = sel, fromterrain="w", toterrain = "T" });
-- update secret doors; attempting to change to AIR will set arboreal flag
des.replace_terrain({ selection = sel, fromterrain="S", toterrain = "A" });
end
-- postprocess callback: make a trap