diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-07-09 17:41:11 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-07-09 17:41:11 +0000 |
commit | 0ec7cf7056fb1e230696a46f0f776f72bd49a6fe (patch) | |
tree | 6e5b484718ee4a9edfc8567864fffcfe3c74eedf /crawl-ref/source/dungeon.cc | |
parent | b26e4bf0ba4e7b2522dbff7330ebc2b74f380ab5 (diff) | |
download | crawl-ref-0ec7cf7056fb1e230696a46f0f776f72bd49a6fe.tar.gz crawl-ref-0ec7cf7056fb1e230696a46f0f776f72bd49a6fe.zip |
Superior minivault handling. Minivaults without floor padding are finally
supported (see mines4_lemuel for an example).
Set default depth to D:a-b in all .des files. Random vaults that want to live
in a non-main-dungeon branch must explicitly specify this in a DEPTH: line.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1823 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/dungeon.cc')
-rw-r--r-- | crawl-ref/source/dungeon.cc | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc index cd0ae021a5..2106a55c36 100644 --- a/crawl-ref/source/dungeon.cc +++ b/crawl-ref/source/dungeon.cc @@ -161,6 +161,10 @@ static int box_room_doors( int bx1, int bx2, int by1, int by2, int new_doors); static void city_level(int level_number); static void diamond_rooms(int level_number); +static void pick_float_exits(vault_placement &place, + std::vector<coord_def> &targets); +static void connect_vault(const vault_placement &vp); + // ITEM & SHOP FUNCTIONS static void place_shops(int level_number); static object_class_type item_in_shop(unsigned char shop_type); @@ -2687,9 +2691,10 @@ static bool build_minivaults(int level_number, int force_vault, apply_place_masks(place); // these two are throwaways: - std::vector<coord_def> dummy; int num_runes = 0; + std::vector<coord_def> &target_connections = place.exits; + // paint the minivault onto the grid for (int vx = v1x; vx < v1x + place.width; vx++) { @@ -2701,11 +2706,17 @@ static bool build_minivaults(int level_number, int force_vault, altar_count = vault_grid( place, level_number, vx, vy, altar_count, acq_item_class, - feat, dummy, + feat, target_connections, num_runes ); } } + if (target_connections.empty() && place.map.has_tag("mini_float")) + pick_float_exits(place, target_connections); + + if (!target_connections.empty()) + connect_vault(place); + return (true); } // end build_minivaults() |