diff options
author | Steve Melenchuk <smelenchuk@gmail.com> | 2013-06-23 19:14:27 -0600 |
---|---|---|
committer | Steve Melenchuk <smelenchuk@gmail.com> | 2013-06-23 19:14:27 -0600 |
commit | d8cc944761be2da2aa5871f835112a5acb13f3bc (patch) | |
tree | 93f7c8454dca41d867b68a1a338fc5f17adb468a /crawl-ref/source/wiz-dgn.cc | |
parent | 1cc1d03c18bf89cdb604b02b4031775c5a0ed763 (diff) | |
download | crawl-ref-d8cc944761be2da2aa5871f835112a5acb13f3bc.tar.gz crawl-ref-d8cc944761be2da2aa5871f835112a5acb13f3bc.zip |
Handle wizmode reporting of multi-god overflow temples better.
Instead of just listing all of the gods on the level in a
comma-separated list, comma-separated lists are printed for each temple,
and temples are separated with semicolons (so, "Elyvilon, Zin, and the
Shining One; Trog and Okawaru; Ashenzari").
Diffstat (limited to 'crawl-ref/source/wiz-dgn.cc')
-rw-r--r-- | crawl-ref/source/wiz-dgn.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/crawl-ref/source/wiz-dgn.cc b/crawl-ref/source/wiz-dgn.cc index e5a5ddb01a..41b4345275 100644 --- a/crawl-ref/source/wiz-dgn.cc +++ b/crawl-ref/source/wiz-dgn.cc @@ -358,6 +358,9 @@ void wizard_list_branches() CrawlVector &levels = you.props[OVERFLOW_TEMPLES_KEY].get_vector(); + vector<string> temple_strings; + vector<string> god_names; + for (unsigned int i = 0; i < levels.size(); i++) { CrawlStoreValue &val = levels[i]; @@ -371,10 +374,11 @@ void wizard_list_branches() if (temples.empty()) continue; - vector<string> god_names; + temple_strings.clear(); for (unsigned int j = 0; j < temples.size(); j++) { + god_names.clear(); CrawlHashTable &temple_hash = temples[j]; CrawlVector &gods = temple_hash[TEMPLE_GODS_KEY]; @@ -384,12 +388,14 @@ void wizard_list_branches() god_names.push_back(god_name(god)); } + temple_strings.push_back( + comma_separated_line(god_names.begin(), god_names.end())); } mprf(MSGCH_DIAGNOSTICS, "%u on D:%u (%s)", temples.size(), i + 1, - comma_separated_line(god_names.begin(), - god_names.end()).c_str() + comma_separated_line(temple_strings.begin(), + temple_strings.end(), "; ", "; ").c_str() ); } } |