diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-09-21 09:21:44 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-09-21 09:21:44 +0000 |
commit | d5efde9cb99ea1e17d8e7f80e865dd1cacc37149 (patch) | |
tree | de1b71627c3703167b4c2a3ac2ac207f081ce8d4 /crawl-ref/source/chardump.cc | |
parent | e1e94ced7a7e708644d23d995ee8ed6974bd50c5 (diff) | |
download | crawl-ref-d5efde9cb99ea1e17d8e7f80e865dd1cacc37149.tar.gz crawl-ref-d5efde9cb99ea1e17d8e7f80e865dd1cacc37149.zip |
Add past tense to visited branches output, and a
few corrections.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2172 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/chardump.cc')
-rw-r--r-- | crawl-ref/source/chardump.cc | 42 |
1 files changed, 22 insertions, 20 deletions
diff --git a/crawl-ref/source/chardump.cc b/crawl-ref/source/chardump.cc index 856d259935..6f38a67b65 100644 --- a/crawl-ref/source/chardump.cc +++ b/crawl-ref/source/chardump.cc @@ -277,6 +277,14 @@ static void sdump_visits(dump_params &par) { std::string &text(par.text); + std::string have = "have "; + std::string seen = "seen"; + if (par.se) // you died -> past tense + { + have = ""; + seen = "saw"; + } + std::vector<PlaceInfo> branches_visited = you.get_all_place_info(true, true); @@ -284,35 +292,29 @@ static void sdump_visits(dump_params &par) for (unsigned int i = 0; i < branches_visited.size(); i++) branches_total += branches_visited[i]; - text += make_stringf("You have visited %ld branch", - branches_visited.size()); + text += make_stringf("You %svisited %ld branch", + have.c_str(), branches_visited.size()); if (branches_visited.size() > 1) text += "es"; - text += make_stringf(" of the dungeon, and seen %ld of its level", - branches_total.levels_seen); - if (branches_total.levels_seen > 1) - text += "s"; - text += ".\n"; + text += make_stringf(" of the dungeon, and %s %ld of its levels.\n", + seen.c_str(), branches_total.levels_seen); PlaceInfo place_info = you.get_place_info(LEVEL_PANDEMONIUM); if (place_info.num_visits > 0) { - text += make_stringf("You have visited Pandemonium %ld time", - place_info.num_visits); + text += make_stringf("You %svisited Pandemonium %ld time", + have.c_str(), place_info.num_visits); if (place_info.num_visits > 1) text += "s"; - text += make_stringf(", and seen %ld of its levels.\n", - place_info.levels_seen); - if (place_info.levels_seen > 1) - text += "s"; - text += ".\n"; + text += make_stringf(", and %s %ld of its levels.\n", + seen.c_str(), place_info.levels_seen); } place_info = you.get_place_info(LEVEL_ABYSS); if (place_info.num_visits > 0) { - text += make_stringf("You have visited the Abyss %ld time", - place_info.num_visits); + text += make_stringf("You %svisited the Abyss %ld time", + have.c_str(), place_info.num_visits); if (place_info.num_visits > 1) text += "s"; text += ".\n"; @@ -321,8 +323,8 @@ static void sdump_visits(dump_params &par) place_info = you.get_place_info(LEVEL_LABYRINTH); if (place_info.num_visits > 0) { - text += make_stringf("You have visited %ld Labyrinth", - place_info.num_visits); + text += make_stringf("You %svisited %ld Labyrinth", + have.c_str(), place_info.num_visits); if (place_info.num_visits > 1) text += "s"; text += ".\n"; @@ -331,8 +333,8 @@ static void sdump_visits(dump_params &par) place_info = you.get_place_info(LEVEL_PORTAL_VAULT); if (place_info.num_visits > 0) { - text += make_stringf("You have visited %ld portal chamber", - place_info.num_visits); + text += make_stringf("You %svisited %ld portal chamber", + have.c_str(), place_info.num_visits); if (place_info.num_visits > 1) text += "s"; text += " (including bazaars).\n"; |