diff options
Diffstat (limited to 'crawl-ref')
-rw-r--r-- | crawl-ref/source/acr.cc | 36 | ||||
-rw-r--r-- | crawl-ref/source/output.cc | 27 | ||||
-rw-r--r-- | crawl-ref/source/output.h | 3 | ||||
-rw-r--r-- | crawl-ref/source/religion.cc | 15 |
4 files changed, 33 insertions, 48 deletions
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc index bf8fc64634..0a9eae96e5 100644 --- a/crawl-ref/source/acr.cc +++ b/crawl-ref/source/acr.cc @@ -1785,21 +1785,21 @@ static void _print_friendly_pickup_setting(bool was_changed) if (you.friendly_pickup == FRIENDLY_PICKUP_NONE) { - mprf("Your allies are %sforbidden to pick up anything at all.", + mprf("Your intelligent, permanent allies are %sforbidden to pick up anything at all.", now.c_str()); } else if (you.friendly_pickup == FRIENDLY_PICKUP_FRIEND) { - mprf("Your allies may %sonly pick up items dropped by allies.", + mprf("Your intelligent, permanent allies may %sonly pick up items dropped by allies.", now.c_str()); } else if (you.friendly_pickup == FRIENDLY_PICKUP_ALL) { - mprf("Your allies may %spick up anything they need.", now.c_str()); + mprf("Your intelligent, permanent allies may %spick up anything they need.", now.c_str()); } else { - mprf("Your allies%s are collecting bugs!", now.c_str()); + mprf(MSGCH_ERROR, "Your allies%s are collecting bugs!", now.c_str()); } } @@ -1934,23 +1934,17 @@ void process_command( command_type cmd ) case CMD_TOGGLE_FRIENDLY_PICKUP: { -#ifndef WIZARD - if (!god_gives_permanent_followers(you.religion)) - { - mpr("I'm sorry, your allies won't ever be able to pick up items."); - if (Options.tutorial_left) - { - mpr("Only intelligent permanent allies may equip themselves, " - "and these two restrictions are only met by allies of the " - "followers of four gods in the pantheon: the Shining " - "One, Yredelemnul, Kikubaaqudgha, and Beogh.", - MSGCH_TUTORIAL); - } - break; - } -#endif // Toggle pickup mode for friendlies. _print_friendly_pickup_setting(false); + + if (Options.tutorial_left + && !god_gives_permanent_followers(you.religion)) + { + mpr("Only intelligent, permanent allies may equip themselves, " + "which excludes all types of zombies as well as enslaved and " + "summoned monsters.", MSGCH_TUTORIAL); + } + mpr("Change to (d)efault, (n)othing, (f)riend-dropped, or (a)ll? ", MSGCH_PROMPT); @@ -4068,9 +4062,7 @@ static bool _initialise(void) if (newc) // start a new game { - you.friendly_pickup = FRIENDLY_PICKUP_NONE; - if (god_gives_permanent_followers(you.religion)) - you.friendly_pickup = Options.default_friendly_pickup; + you.friendly_pickup = Options.default_friendly_pickup; // Mark items in inventory as of unknown origin. origin_set_inventory(origin_set_unknown); diff --git a/crawl-ref/source/output.cc b/crawl-ref/source/output.cc index b05dbbc515..76ed767ef2 100644 --- a/crawl-ref/source/output.cc +++ b/crawl-ref/source/output.cc @@ -1190,14 +1190,17 @@ monster_pane_info::monster_pane_info(const monsters *m) if (m->has_ench(ENCH_BERSERK)) m_brands |= 4; } -// Sort monsters by: -// attitude -// difficulty -// type -// brand -bool // static -monster_pane_info::less_than(const monster_pane_info& m1, - const monster_pane_info& m2, bool zombified) +// Needed because gcc 4.3 sort does not like comparison functions that take +// more than 2 arguments. +bool monster_pane_info::less_than_wrapper(const monster_pane_info& m1, + const monster_pane_info& m2) +{ + return monster_pane_info::less_than(m1, m2, true); +} + +// Sort monsters by (in that order): attitude, difficulty, type, brand +bool monster_pane_info::less_than(const monster_pane_info& m1, + const monster_pane_info& m2, bool zombified) { if (m1.m_attitude < m2.m_attitude) return (true); @@ -1468,7 +1471,7 @@ void get_monster_pane_info(std::vector<monster_pane_info>& mons) mons.push_back(monster_pane_info(visible[i])); } } - std::sort(mons.begin(), mons.end(), monster_pane_info::less_than); + std::sort(mons.begin(), mons.end(), monster_pane_info::less_than_wrapper); } #define BOTTOM_JUSTIFY_MONSTER_LIST 0 @@ -1484,7 +1487,7 @@ int update_monster_pane() std::vector<monster_pane_info> mons; get_monster_pane_info(mons); - std::sort(mons.begin(), mons.end(), monster_pane_info::less_than); + std::sort(mons.begin(), mons.end(), monster_pane_info::less_than_wrapper); // Count how many groups of monsters there are unsigned int lines_needed = mons.size(); @@ -1501,7 +1504,9 @@ int update_monster_pane() // "rat zombie") in order to take up less lines. for (unsigned int i = 0; i < mons.size(); i++) mons[i].m_fullname = false; - std::sort(mons.begin(), mons.end(), monster_pane_info::less_than); + + std::sort(mons.begin(), mons.end(), + monster_pane_info::less_than_wrapper); lines_needed = mons.size(); for (unsigned int i = 1; i < mons.size(); i++) diff --git a/crawl-ref/source/output.h b/crawl-ref/source/output.h index abb0b72722..61e524a732 100644 --- a/crawl-ref/source/output.h +++ b/crawl-ref/source/output.h @@ -74,6 +74,9 @@ class monster_pane_info static bool less_than(const monster_pane_info& m1, const monster_pane_info& m2, bool zombified = true); + static bool less_than_wrapper(const monster_pane_info& m1, + const monster_pane_info& m2); + monster_pane_info(const monsters* m); void to_string(int count, std::string& desc, int& desc_color) const; diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index 46d6e633d1..8d7ba6d663 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -5493,21 +5493,6 @@ void god_pitch(god_type which_god) you.gift_timeout = 0; } - if (god_gives_permanent_followers(you.religion)) - { - // Enable ally pickup control for gods that give you permanent - // followers. - you.friendly_pickup = Options.default_friendly_pickup; - } - else - { - // With other gods, you can only get stupid (zombies!), - // summoned, or charmed allies, so pickup control makes no - // sense. Sorry about that! - you.friendly_pickup = FRIENDLY_PICKUP_NONE; - } - - set_god_ability_slots(); // remove old god's slots, reserve new god's #ifdef DGL_WHEREIS whereis_record(); |