diff options
author | Jesse Luehrs <doy@tozt.net> | 2014-08-14 02:43:36 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2014-08-14 02:44:20 -0400 |
commit | 00d6247dd3f9fdcd58df1d1e8ab13913566c4571 (patch) | |
tree | 9fbc351c6c819c717bad0d5bdf4b59c90001258f | |
parent | 49c2c94070c5a027f7dcb51c6a4bc6c29564ccad (diff) | |
download | crawl-ref-00d6247dd3f9fdcd58df1d1e8ab13913566c4571.tar.gz crawl-ref-00d6247dd3f9fdcd58df1d1e8ab13913566c4571.zip |
"Maras are frozen" -> "The Maras are frozen" (5054)
-rw-r--r-- | crawl-ref/source/actor.h | 3 | ||||
-rw-r--r-- | crawl-ref/source/misc.cc | 5 | ||||
-rw-r--r-- | crawl-ref/source/misc.h | 3 | ||||
-rw-r--r-- | crawl-ref/source/monster.cc | 6 | ||||
-rw-r--r-- | crawl-ref/source/monster.h | 3 | ||||
-rw-r--r-- | crawl-ref/source/player-act.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/player.h | 3 | ||||
-rw-r--r-- | crawl-ref/source/spl-damage.cc | 2 |
8 files changed, 18 insertions, 9 deletions
diff --git a/crawl-ref/source/actor.h b/crawl-ref/source/actor.h index 1be7a73183..3c5836f857 100644 --- a/crawl-ref/source/actor.h +++ b/crawl-ref/source/actor.h @@ -154,7 +154,8 @@ public: } virtual string name(description_level_type type, - bool force_visible = false) const = 0; + bool force_visible = false, + bool force_article = false) const = 0; virtual string pronoun(pronoun_type which_pronoun, bool force_visible = false) const = 0; virtual string conj_verb(const string &verb) const = 0; diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc index ee14468b0f..64e8de280d 100644 --- a/crawl-ref/source/misc.cc +++ b/crawl-ref/source/misc.cc @@ -1263,7 +1263,8 @@ int counted_monster_list::count() return nmons; } -string counted_monster_list::describe(description_level_type desc) +string counted_monster_list::describe(description_level_type desc, + bool force_article) { string out; @@ -1278,7 +1279,7 @@ string counted_monster_list::describe(description_level_type desc) else ++i; - out += cm.second > 1 ? pluralise(cm.first->name(desc)) + out += cm.second > 1 ? pluralise(cm.first->name(desc, false, true)) : cm.first->name(desc); } return out; diff --git a/crawl-ref/source/misc.h b/crawl-ref/source/misc.h index 7dc5b67a6d..771fe607ab 100644 --- a/crawl-ref/source/misc.h +++ b/crawl-ref/source/misc.h @@ -311,6 +311,7 @@ struct counted_monster_list void add(const monster* mons); int count(); bool empty() { return list.empty(); } - string describe(description_level_type desc = DESC_THE); + string describe(description_level_type desc = DESC_THE, + bool force_article = false); }; #endif diff --git a/crawl-ref/source/monster.cc b/crawl-ref/source/monster.cc index dd7e2e2288..5198f782b1 100644 --- a/crawl-ref/source/monster.cc +++ b/crawl-ref/source/monster.cc @@ -2486,13 +2486,17 @@ static string _mon_special_name(const monster& mon, description_level_type desc, return ""; } -string monster::name(description_level_type desc, bool force_vis) const +string monster::name(description_level_type desc, bool force_vis, + bool force_article) const { string s = _mon_special_name(*this, desc, force_vis); if (!s.empty() || desc == DESC_NONE) return s; monster_info mi(this, MILEV_NAME); + // i.e. to produce "the Maras" instead of just "Maras" + if (force_article) + mi.mb.set(MB_NAME_UNQUALIFIED, false); return mi.proper_name(desc) #ifdef DEBUG_MONSTERS // This is incredibly spammy, too bad for regular debug builds, but diff --git a/crawl-ref/source/monster.h b/crawl-ref/source/monster.h index bdb6629e14..6b46049c03 100644 --- a/crawl-ref/source/monster.h +++ b/crawl-ref/source/monster.h @@ -285,7 +285,8 @@ public: bool can_use_missile(const item_def &item) const; - string name(description_level_type type, bool force_visible = false) const; + string name(description_level_type type, bool force_visible = false, + bool force_article = false) const; // Base name of the monster, bypassing any mname setting. For an orc priest // named Arbolt, name() will return "Arbolt", but base_name() will return diff --git a/crawl-ref/source/player-act.cc b/crawl-ref/source/player-act.cc index d304c60196..7ee534cc62 100644 --- a/crawl-ref/source/player-act.cc +++ b/crawl-ref/source/player-act.cc @@ -509,7 +509,7 @@ void player::make_hungry(int hunger_increase, bool silent) ::lessen_hunger(-hunger_increase, silent); } -string player::name(description_level_type dt, bool) const +string player::name(description_level_type dt, bool, bool) const { switch (dt) { diff --git a/crawl-ref/source/player.h b/crawl-ref/source/player.h index e2da239e95..2cb2c8c977 100644 --- a/crawl-ref/source/player.h +++ b/crawl-ref/source/player.h @@ -554,7 +554,8 @@ public: bool ignore_transform = false, bool quiet = true) const; - string name(description_level_type type, bool force_visible = false) const; + string name(description_level_type type, bool force_visible = false, + bool force_article = false) const; string pronoun(pronoun_type pro, bool force_visible = false) const; string conj_verb(const string &verb) const; string hand_name(bool plural, bool *can_plural = NULL) const; diff --git a/crawl-ref/source/spl-damage.cc b/crawl-ref/source/spl-damage.cc index 1bbc2ea5e6..a78055a0d0 100644 --- a/crawl-ref/source/spl-damage.cc +++ b/crawl-ref/source/spl-damage.cc @@ -437,7 +437,7 @@ static void _pre_refrigerate(actor* agent, bool player, _counted_monster_list_from_vector(seen_monsters); const string message = make_stringf("%s %s frozen.", - mons_list.describe().c_str(), + mons_list.describe(DESC_THE, true).c_str(), mons_list.count() == 1? "is" : "are"); if (strwidth(message) < get_number_of_cols() - 2) mpr(message.c_str()); |