diff options
author | Chris Oelmueller <chris.oelmueller@gmail.com> | 2014-01-26 23:10:14 +0100 |
---|---|---|
committer | Shmuale Mark <shm.mark@gmail.com> | 2014-03-11 22:54:41 -0400 |
commit | c5434703b61cb9c3befa8a0969812b8ba2841f35 (patch) | |
tree | 93ca524ae310fc170cff2a1bf53a15be9f77f5f0 /crawl-ref | |
parent | e1215c86b0e34c506d8775575b1ec7b8a4aeb5f3 (diff) | |
download | crawl-ref-c5434703b61cb9c3befa8a0969812b8ba2841f35.tar.gz crawl-ref-c5434703b61cb9c3befa8a0969812b8ba2841f35.zip |
Remove `auto_list` option
It has been defaulting to `true` for a while now. That setting provides
a nicer interface overall and there is little reason to support alter-
nate input methods.
Some prompts asking for a letter have not been adjusted, for example
evoking a rod with multiple spells. Those are hopefully gone soon
anyways.
[Committer's note: The option had no known uses except by bots, and
those could work without it. And, of course, multi-spell rods are
gone.]
Diffstat (limited to 'crawl-ref')
-rw-r--r-- | crawl-ref/docs/changelog.txt | 1 | ||||
-rw-r--r-- | crawl-ref/docs/options_guide.txt | 8 | ||||
-rw-r--r-- | crawl-ref/settings/init.txt | 1 | ||||
-rw-r--r-- | crawl-ref/source/command.cc | 43 | ||||
-rw-r--r-- | crawl-ref/source/decks.cc | 3 | ||||
-rw-r--r-- | crawl-ref/source/effects.cc | 3 | ||||
-rw-r--r-- | crawl-ref/source/food.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/godprayer.cc | 9 | ||||
-rw-r--r-- | crawl-ref/source/hints.cc | 1 | ||||
-rw-r--r-- | crawl-ref/source/initfile.cc | 4 | ||||
-rw-r--r-- | crawl-ref/source/invent.cc | 6 | ||||
-rw-r--r-- | crawl-ref/source/invent.h | 4 | ||||
-rw-r--r-- | crawl-ref/source/item_use.cc | 22 | ||||
-rw-r--r-- | crawl-ref/source/l_option.cc | 1 | ||||
-rw-r--r-- | crawl-ref/source/options.h | 2 | ||||
-rw-r--r-- | crawl-ref/source/spl-book.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/spl-cast.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/spl-goditem.cc | 11 | ||||
-rw-r--r-- | crawl-ref/source/spl-selfench.cc | 4 |
19 files changed, 28 insertions, 101 deletions
diff --git a/crawl-ref/docs/changelog.txt b/crawl-ref/docs/changelog.txt index 0aa88f100f..df5c989bee 100644 --- a/crawl-ref/docs/changelog.txt +++ b/crawl-ref/docs/changelog.txt @@ -431,6 +431,7 @@ Interface * "pickup_mode = multi|single" is now "pickup_menu = true|false", with true being the default; "pickup_menu_limit" has been introduced to handle the old "auto:X" settings. +* The "auto_list" option has been removed. * The WebTiles spectator box sorts names and links online player profiles. * URLs occurring in WebTiles chat messages are hyperlinked. * New default minimap colours. diff --git a/crawl-ref/docs/options_guide.txt b/crawl-ref/docs/options_guide.txt index 738b4fe8ce..6e4a372465 100644 --- a/crawl-ref/docs/options_guide.txt +++ b/crawl-ref/docs/options_guide.txt @@ -987,14 +987,6 @@ auto_exclude += <monster name>, <monster name>, ... 3-h Command Enhancements. ----------------------------- -auto_list = true - When set (the default), the appropriate inventory items are - automatically listed for commands like eat and read. This is - like immediately hitting '?', and can be confusing to beginners - because they won't get to see the prompts. This option does not - apply to spell casting... Conjurers would probably find that - really annoying. - auto_switch = false If you've got a melee weapon in slot a and a ranged weapon in slot b (or the opposite), this option will allow you to diff --git a/crawl-ref/settings/init.txt b/crawl-ref/settings/init.txt index 5d87aa2ae7..ad6489d648 100644 --- a/crawl-ref/settings/init.txt +++ b/crawl-ref/settings/init.txt @@ -177,7 +177,6 @@ ##### 3-h Command Enhancements ################## # -# auto_list = false # auto_switch = true # easy_open = false # easy_unequip = false diff --git a/crawl-ref/source/command.cc b/crawl-ref/source/command.cc index b8c90f65ce..7007e3cb57 100644 --- a/crawl-ref/source/command.cc +++ b/crawl-ref/source/command.cc @@ -321,16 +321,7 @@ static void _adjust_spell(void) // Select starting slot mprf(MSGCH_PROMPT, "Adjust which spell? "); - - int keyin = 0; - if (Options.auto_list) - keyin = list_spells(false, false, false, "Adjust which spell?"); - else - { - keyin = get_ch(); - if (keyin == '?' || keyin == '*') - keyin = list_spells(false, false, false, "Adjust which spell?"); - } + int keyin = list_spells(false, false, false, "Adjust which spell?"); if (!isaalpha(keyin)) { @@ -396,39 +387,11 @@ static void _adjust_ability(void) return; } - int selected = -1; mprf(MSGCH_PROMPT, "Adjust which ability? "); - - if (Options.auto_list) - selected = choose_ability_menu(talents); - else - { - const int keyin = get_ch(); - - if (keyin == '?' || keyin == '*') - selected = choose_ability_menu(talents); - else if (key_is_escape(keyin) || keyin == ' ' - || keyin == '\r' || keyin == '\n') - { - canned_msg(MSG_OK); - return; - } - else if (isaalpha(keyin)) - { - // Try to find the hotkey. - for (unsigned int i = 0; i < talents.size(); ++i) - { - if (talents[i].hotkey == keyin) - { - selected = static_cast<int>(i); - break; - } - } - } - } + int selected = choose_ability_menu(talents); // If we couldn't find anything, cancel out. - if (selected < 0) + if (selected == -1) { mpr("No such ability."); return; diff --git a/crawl-ref/source/decks.cc b/crawl-ref/source/decks.cc index 5fe5b333ba..93ce614fab 100644 --- a/crawl-ref/source/decks.cc +++ b/crawl-ref/source/decks.cc @@ -1906,8 +1906,7 @@ static void _blade_card(int power, deck_rarity_type rarity) } // Pause before jumping to the list. - if (Options.auto_list) - more(); + more(); // Don't take less time if we're swapping weapons. int old_time = you.time_taken; diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc index a5a5910f16..3458e28c7b 100644 --- a/crawl-ref/source/effects.cc +++ b/crawl-ref/source/effects.cc @@ -722,8 +722,7 @@ int recharge_wand(int item_slot, bool known, string *pre_msg) if (!item_is_rechargeable(wand, known)) { mpr("Choose an item to recharge, or Esc to abort."); - if (Options.auto_list) - more(); + more(); // Try again. item_slot = -1; diff --git a/crawl-ref/source/food.cc b/crawl-ref/source/food.cc index e2326fa056..f8b8df4b0f 100644 --- a/crawl-ref/source/food.cc +++ b/crawl-ref/source/food.cc @@ -1258,7 +1258,7 @@ int eat_from_floor(bool skip_chunks) } } - if (need_more && Options.auto_list) + if (need_more) more(); return 0; diff --git a/crawl-ref/source/godprayer.cc b/crawl-ref/source/godprayer.cc index 98f351c4eb..1ca2ba1e6f 100644 --- a/crawl-ref/source/godprayer.cc +++ b/crawl-ref/source/godprayer.cc @@ -218,8 +218,7 @@ static bool _altar_prayer() && !you.one_time_ability_used[GOD_SHINING_ONE]) { simple_god_message(" will bless one of your weapons."); - if (Options.auto_list) - more(); + more(); did_something = _bless_weapon(GOD_SHINING_ONE, SPWPN_HOLY_WRATH, YELLOW); } @@ -230,8 +229,7 @@ static bool _altar_prayer() && !you.one_time_ability_used[GOD_LUGONU]) { simple_god_message(" will brand one of your weapons with the corruption of the Abyss."); - if (Options.auto_list) - more(); + more(); did_something = _bless_weapon(GOD_LUGONU, SPWPN_DISTORTION, MAGENTA); } @@ -245,8 +243,7 @@ static bool _altar_prayer() simple_god_message( " will bloody your weapon with pain or grant you the Necronomicon."); - if (Options.auto_list) - more(); + more(); if (_bless_weapon(GOD_KIKUBAAQUDGHA, SPWPN_PAIN, RED)) return true; diff --git a/crawl-ref/source/hints.cc b/crawl-ref/source/hints.cc index 72f376a0a4..a5ec2e57ad 100644 --- a/crawl-ref/source/hints.cc +++ b/crawl-ref/source/hints.cc @@ -108,7 +108,6 @@ void init_hints_options() // with messaging options. mesclr(true); // Options.clear_messages = true; - Options.auto_list = true; Options.show_more = true; Options.small_more = false; diff --git a/crawl-ref/source/initfile.cc b/crawl-ref/source/initfile.cc index 3b736a2b00..b51173a37e 100644 --- a/crawl-ref/source/initfile.cc +++ b/crawl-ref/source/initfile.cc @@ -829,9 +829,6 @@ void game_options::reset_options() note_dgl_messages = true; note_hp_percent = 5; - // [ds] Grumble grumble. - auto_list = true; - clear_messages = false; #ifdef TOUCH_UI show_more = false; @@ -2652,7 +2649,6 @@ void game_options::read_option_line(const string &str, bool runscript) macro_dir = field; #endif #endif - else BOOL_OPTION(auto_list); else if (key == "default_target") { default_target = _read_bool(field, default_target); diff --git a/crawl-ref/source/invent.cc b/crawl-ref/source/invent.cc index 919941be33..20a22de42e 100644 --- a/crawl-ref/source/invent.cc +++ b/crawl-ref/source/invent.cc @@ -1406,7 +1406,7 @@ vector<SelItem> prompt_invent_items( menu_type mtype, int type_expect, invtitle_annotator titlefn, - bool allow_auto_list, + bool auto_list, bool allow_easy_quit, const char other_valid_char, vector<text_pattern> *select_filter, @@ -1419,7 +1419,6 @@ vector<SelItem> prompt_invent_items( bool need_redraw = false; bool need_prompt = true; bool need_getch = true; - bool auto_list = Options.auto_list && allow_auto_list; if (auto_list) { @@ -1862,7 +1861,7 @@ bool check_warning_inscriptions(const item_def& item, // Note: This function never checks if the item is appropriate. int prompt_invent_item(const char *prompt, menu_type mtype, int type_expect, - bool must_exist, bool allow_auto_list, + bool must_exist, bool auto_list, bool allow_easy_quit, const char other_valid_char, int excluded_slot, @@ -1893,7 +1892,6 @@ int prompt_invent_item(const char *prompt, bool need_redraw = false; bool need_prompt = true; bool need_getch = true; - bool auto_list = Options.auto_list && allow_auto_list; if (auto_list) { diff --git a/crawl-ref/source/invent.h b/crawl-ref/source/invent.h index 42f0746a2c..0b94ef406b 100644 --- a/crawl-ref/source/invent.h +++ b/crawl-ref/source/invent.h @@ -182,7 +182,7 @@ int prompt_invent_item(const char *prompt, menu_type type, int type_expect, bool must_exist = true, - bool allow_auto_list = true, + bool auto_list = true, bool allow_easy_quit = true, const char other_valid_char = '\0', int excluded_slot = -1, @@ -201,7 +201,7 @@ vector<SelItem> prompt_invent_items( menu_type type, int type_expect, invtitle_annotator titlefn = NULL, - bool allow_auto_list = true, + bool auto_list = true, bool allow_easy_quit = true, const char other_valid_char = '\0', vector<text_pattern> *filter = NULL, diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc index 169c632cd1..1f788490ac 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -2322,8 +2322,7 @@ static item_def* _scroll_choose_weapon(bool alreadyknown, string *pre_msg, scrol || !branding && !is_item_selected(*wpn, OSEL_ENCHANTABLE_WEAPON)) { mpr("Choose a valid weapon, or Esc to abort."); - if (Options.auto_list) - more(); + more(); item_slot = -1; continue; @@ -2534,8 +2533,7 @@ static int _handle_enchant_armour(int item_slot, bool alreadyknown, if (!is_enchantable_armour(arm, true, true)) { mpr("Choose some type of armour to enchant, or Esc to abort."); - if (Options.auto_list) - more(); + more(); item_slot = -1; continue; @@ -2970,8 +2968,7 @@ void read_scroll(int slot) which_scroll == SCR_ENCHANT_WEAPON_II ? "II" : "III"); // Pause to display the message before jumping to the weapon list. - if (Options.auto_list) - more(); + more(); } cancel_scroll = !_handle_enchant_weapon(alreadyknown, &pre_succ_msg, which_scroll); @@ -2982,8 +2979,8 @@ void read_scroll(int slot) { mpr(pre_succ_msg.c_str()); mpr("It is a scroll of brand weapon."); - if (Options.auto_list) - more(); + // Pause to display the message before jumping to the weapon list. + more(); } cancel_scroll = !_handle_brand_weapon(alreadyknown, &pre_succ_msg); @@ -2994,8 +2991,7 @@ void read_scroll(int slot) { mpr(pre_succ_msg.c_str()); mpr("It is a scroll of identify."); - if (Options.auto_list) - more(); + more(); // Do this here so it doesn't turn up in the ID menu. set_ident_type(scroll, ID_KNOWN_TYPE); } @@ -3007,8 +3003,7 @@ void read_scroll(int slot) { mpr(pre_succ_msg.c_str()); mpr("It is a scroll of recharging."); - if (Options.auto_list) - more(); + more(); } cancel_scroll = (recharge_wand(-1, alreadyknown, &pre_succ_msg) == -1); break; @@ -3018,8 +3013,7 @@ void read_scroll(int slot) { mpr(pre_succ_msg.c_str()); mpr("It is a scroll of enchant armour."); - if (Options.auto_list) - more(); + more(); } cancel_scroll = (_handle_enchant_armour(-1, alreadyknown, &pre_succ_msg) == -1); diff --git a/crawl-ref/source/l_option.cc b/crawl-ref/source/l_option.cc index 314b3414cc..fc2ec41a21 100644 --- a/crawl-ref/source/l_option.cc +++ b/crawl-ref/source/l_option.cc @@ -53,7 +53,6 @@ static option_handler handlers[] = { "note_skill_max", &Options.note_skill_max, option_hboolean }, { "clear_messages", &Options.clear_messages, option_hboolean }, { "no_dark_brand", &Options.no_dark_brand, option_hboolean }, - { "auto_list", &Options.auto_list, option_hboolean }, { "pickup_thrown", &Options.pickup_thrown, option_hboolean }, { "show_waypoints", &Options.show_waypoints, option_hboolean }, { "easy_exit_menu", &Options.easy_exit_menu, option_hboolean }, diff --git a/crawl-ref/source/options.h b/crawl-ref/source/options.h index 4752e98d86..fe175dab89 100644 --- a/crawl-ref/source/options.h +++ b/crawl-ref/source/options.h @@ -213,8 +213,6 @@ public: int fire_items_start; // index of first item for fire command vector<unsigned> fire_order; // missile search order for 'f' command - bool auto_list; // automatically jump to appropriate item lists - bool flush_input[NUM_FLUSH_REASONS]; // when to flush input buff char_set_type char_set; diff --git a/crawl-ref/source/spl-book.cc b/crawl-ref/source/spl-book.cc index 592198dc45..379959a4f7 100644 --- a/crawl-ref/source/spl-book.cc +++ b/crawl-ref/source/spl-book.cc @@ -1325,7 +1325,7 @@ int rod_spell(int rod, bool check_range) "Evoke which spell from the rod ([a-%c] spell [?*] list)? ", 'a' + num_spells - 1); - // Note that auto_list is ignored here. + // Note that the list of spells is not presented here. keyin = get_ch(); if (keyin == '?' || keyin == '*') diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc index 3678623241..b06df68445 100644 --- a/crawl-ref/source/spl-cast.cc +++ b/crawl-ref/source/spl-cast.cc @@ -550,8 +550,6 @@ void inspect_spells() return; } - // Maybe we should honour auto_list here, but if you want the - // description, you probably want the listing, too. list_spells(true, true); } diff --git a/crawl-ref/source/spl-goditem.cc b/crawl-ref/source/spl-goditem.cc index 9bbf01d2cb..25510f727b 100644 --- a/crawl-ref/source/spl-goditem.cc +++ b/crawl-ref/source/spl-goditem.cc @@ -92,8 +92,7 @@ int identify(int power, int item_slot, bool alreadyknown, string *pre_msg) && (!is_deck(item) || top_card_is_known(item))) { mpr("Choose an unidentified item, or Esc to abort."); - if (Options.auto_list) - more(); + more(); item_slot = -1; continue; } @@ -137,7 +136,7 @@ int identify(int power, int item_slot, bool alreadyknown, string *pre_msg) learned_something_new(HINT_INACCURACY); } - if (Options.auto_list && id_used > identified) + if (id_used > identified) more(); // In case we get to try again. @@ -663,8 +662,7 @@ static bool _selectively_remove_curse(string *pre_msg) || &item == you.weapon() && !is_weapon(item)) { mpr("Choose a cursed equipped item, or Esc to abort."); - if (Options.auto_list) - more(); + more(); continue; } @@ -751,8 +749,7 @@ static bool _selectively_curse_item(bool armour, string *pre_msg) { mprf("Choose an uncursed equipped piece of %s, or Esc to abort.", armour ? "armour" : "jewellery"); - if (Options.auto_list) - more(); + more(); continue; } diff --git a/crawl-ref/source/spl-selfench.cc b/crawl-ref/source/spl-selfench.cc index 159e0a8506..a81d123da4 100644 --- a/crawl-ref/source/spl-selfench.cc +++ b/crawl-ref/source/spl-selfench.cc @@ -281,9 +281,7 @@ int cast_selective_amnesia(string *pre_msg) // Pick a spell to forget. mprf(MSGCH_PROMPT, "Forget which spell ([?*] list [ESC] exit)? "); - keyin = Options.auto_list - ? list_spells(false, false, false, "Forget which spell?") - : get_ch(); + keyin = list_spells(false, false, false, "Forget which spell?"); redraw_screen(); while (true) |