|
From: <gi...@cr...> - 2017-06-22 01:30:12
|
via 04744e27a9746e074e7847dbe04b41057bf2aeea (commit)
from 82a99e05bea1874fc1d0b095402e063f1e2daae6 (commit)
-----------------------------------------------------------------------
commit 04744e27a9746e074e7847dbe04b41057bf2aeea
Author: gammafunk <gam...@gm...>
Date: Wed Jun 21 19:52:40 2017 -0500
Allow bazaar vaults to not set floor tile "halos" (Kenran)
Previously all shops place in bazaars would always get a circle of floor
tiles set around the shop itself. This was done through the main bazaar
setup function, so it would be difficult for vault authors to use a
different kind of shop decoration. This commit adds default-true
argument to the setup function to allow disabling of these floor tile
halos on a per-vault basis.
-----------------------------------------------------------------------
Summary of changes:
crawl-ref/source/dat/des/portals/bazaar.des | 29 +++++++++++++++++++++++++----
1 file changed, 25 insertions(+), 4 deletions(-)
diff --git a/crawl-ref/source/dat/des/portals/bazaar.des b/crawl-ref/source/dat/des/portals/bazaar.des
index 2a3cfb7..94016c4 100644
--- a/crawl-ref/source/dat/des/portals/bazaar.des
+++ b/crawl-ref/source/dat/des/portals/bazaar.des
@@ -57,13 +57,26 @@ function random_bazaar_colour()
return ret
end
-function bazaar_setup(e)
+function bazaar_setup(e, shop_halo)
+ if shop_halo == nil then
+ shop_halo = true
+ end
+
e.tags('no_monster_gen')
e.kfeat("< = stone_arch")
e.kfeat("> = exit_bazaar")
+ if shop_halo then
+ dgn.set_branch_epilogue("Bazaar", "fixup_bazaar")
+ else
+ dgn.set_branch_epilogue("Bazaar", "fixup_bazaar_without_halo")
+ end
end
-function fixup_bazaar()
+function set_bazaar_tiles(shop_halo)
+ if shop_halo == nil then
+ shop_halo = true
+ end
+
dgn.change_floor_colour(random_bazaar_colour())
local default = {rock="wall_vault", floor="floor_vault", halo="halo_vault"}
@@ -83,10 +96,18 @@ function fixup_bazaar()
dgn.change_floor_tile(tile.floor)
dgn.change_rock_tile(tile.rock)
- dgn.floor_halo("enter_shop", "yellow", tile.halo)
+ if shop_halo then
+ dgn.floor_halo("enter_shop", "yellow", tile.halo)
+ end
+end
+
+function fixup_bazaar()
+ set_bazaar_tiles()
end
-dgn.set_branch_epilogue("Bazaar", "fixup_bazaar")
+function fixup_bazaar_without_halo()
+ set_bazaar_tiles(false)
+end
}}
--
Dungeon Crawl Stone Soup
|