From d728a1cd0de075594762733936732d3d7f91f410 Mon Sep 17 00:00:00 2001 From: Matthew Cline Date: Thu, 12 Nov 2009 03:25:21 -0800 Subject: Wiz cmd "&:": list altars in overflow temples --- crawl-ref/source/wiz-dgn.cc | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'crawl-ref/source') diff --git a/crawl-ref/source/wiz-dgn.cc b/crawl-ref/source/wiz-dgn.cc index 2972d37398..69f5e1ec2a 100644 --- a/crawl-ref/source/wiz-dgn.cc +++ b/crawl-ref/source/wiz-dgn.cc @@ -25,6 +25,7 @@ #include "options.h" #include "place.h" #include "player.h" +#include "religion.h" #include "stuff.h" #include "terrain.h" #include "traps.h" @@ -388,8 +389,26 @@ void wizard_list_branches() if (temples.size() == 0) continue; - mprf(MSGCH_DIAGNOSTICS, "%lu on D:%lu", temples.size(), - i + 1); + std::vector god_names; + + for (unsigned int j = 0; j < temples.size(); j++) + { + CrawlHashTable &temple_hash = temples[j]; + CrawlVector &gods = temple_hash[TEMPLE_GODS_KEY]; + + for (unsigned int k = 0; k < gods.size(); k++) + { + god_type god = (god_type) gods[k].get_byte(); + + god_names.push_back(god_name(god)); + } + } + + mprf(MSGCH_DIAGNOSTICS, "%lu on D:%lu (%s)", temples.size(), + i + 1, + comma_separated_line( god_names.begin(), + god_names.end() ).c_str() + ); } } -- cgit v1.2.3-54-g00ecf