summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/dat/clua
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-03 10:47:44 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-03 10:47:44 +0000
commitfb869dee39e5953d9240ac1344d029c3ff62d624 (patch)
treeee2a92547a332d91ff0cfafb6e7927868cf5b84c /crawl-ref/source/dat/clua
parentdf23c385f390c4a7beb7c24826085c35e6145b95 (diff)
downloadcrawl-ref-fb869dee39e5953d9240ac1344d029c3ff62d624.tar.gz
crawl-ref-fb869dee39e5953d9240ac1344d029c3ff62d624.zip
[2468791] Reduce distinction between minivaults and floating vaults. All vaults are now handled by _build_vaults.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8169 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/dat/clua')
-rw-r--r--crawl-ref/source/dat/clua/ziggurat.lua9
1 files changed, 4 insertions, 5 deletions
diff --git a/crawl-ref/source/dat/clua/ziggurat.lua b/crawl-ref/source/dat/clua/ziggurat.lua
index a022da3c27..d25e194ce1 100644
--- a/crawl-ref/source/dat/clua/ziggurat.lua
+++ b/crawl-ref/source/dat/clua/ziggurat.lua
@@ -452,8 +452,7 @@ local function ziggurat_create_loot_vault(entry, exit)
end
local connect_point = exit - inc * 3
-
- local map = dgn.map_by_tag("ziggurat_loot_chamber", false)
+ local map = dgn.map_by_tag("ziggurat_loot_chamber")
if not map then
return exit
@@ -467,7 +466,7 @@ local function ziggurat_create_loot_vault(entry, exit)
return res
end
- local function bad_loot_bounds(map, px, py, xs, ys)
+ local function good_loot_bounds(map, px, py, xs, ys)
local vc = dgn.point(px + math.floor(xs / 2),
py + math.floor(ys / 2))
@@ -485,11 +484,11 @@ local function ziggurat_create_loot_vault(entry, exit)
local linc = (exit - vc):sgn()
-- The map's positions should be at the same increment to the exit
-- as the exit is to the entrance, else reject the place.
- return not (inc == linc) or not safe_area()
+ return (inc == linc) and safe_area()
end
local function connect_loot_chamber()
- return dgn.with_map_bounds_fn(bad_loot_bounds, place_loot_chamber)
+ return dgn.with_map_bounds_fn(good_loot_bounds, place_loot_chamber)
end
local res = dgn.with_map_anchors(connect_point.x, connect_point.y,