mirror of
https://github.com/DramaticShape/DramaticShapeVoxelMod.git
synced 2026-08-12 10:00:50 +02:00
add doors to s/w/e sides of gate houses
This commit is contained in:
+7
-1
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user