add doors to s/w/e sides of gate houses

This commit is contained in:
DramaticShape
2026-08-08 19:57:22 -04:00
parent 99de8c2760
commit c681167475
+7 -1
View File
@@ -1633,7 +1633,13 @@ end
-- The south face is skipped whether or not it is drawn: it is the one face -- The south face is skipped whether or not it is drawn: it is the one face
-- the drawing states in full, so anything it needs it already has. -- the drawing states in full, so anything it needs it already has.
local function sideDoorsAt(map, tileset, tx, ty, bw, bh) local function sideDoorsAt(map, tileset, tx, ty, bw, bh)
local defs = _G.Game and Game.data and Game.data.maps -- through the module, NOT a global: `Game` is a local everywhere in the
-- engine (`local Game = require("src.core.Game")` in a dozen files) and
-- reading `_G.Game` came back nil every time -- which fails silently and
-- exactly like the feature being off, because a nil map table is also
-- what a headless build legitimately has.
local ok, G = pcall(require, "src.core.Game")
local defs = ok and G and G.data and G.data.maps
local warps = map.def and map.def.warps local warps = map.def and map.def.warps
if not (defs and warps and warps[1]) then return nil end if not (defs and warps and warps[1]) then return nil end
if not Buildings.sideDoorCell(tileset.id) then return nil end if not Buildings.sideDoorCell(tileset.id) then return nil end