Attached Files |
0001-Remove-drop_mode-setting-and-in-game-toggle-for-sing.patch [^] (8,858 bytes) 2014-01-21 10:28 [Show Content] [Hide Content]From ab44d29b05568dc8d6a4efceb82c961c882127ff Mon Sep 17 00:00:00 2001
From: Chris Oelmueller <chris.oelmueller@gmail.com>
Date: Tue, 21 Jan 2014 10:26:36 +0100
Subject: Remove `drop_mode` setting and in-game toggle for `single` behavior
The setting itself went largely unused with a few exceptions for bot
configurations, and the toggle (either @ or Ctrl-D in the drop menu)
added nothing to the interface: It was intransparent and probably not
known to a single player out there. Like with the pickup menu, what was
old `multi` is the far superior interface, and unlike with pickup it
also has been the default for a long time.
For quickly (interface-wise) dropping items, there still exists `D` to
drop your last pickup, but even that is rather prone to input errors.
---
crawl-ref/docs/options_guide.txt | 22 +++-------------------
crawl-ref/settings/init.txt | 4 ++--
crawl-ref/source/initfile.cc | 8 --------
crawl-ref/source/initfile.h | 6 ------
crawl-ref/source/invent.cc | 25 ++-----------------------
crawl-ref/source/items.cc | 6 +-----
crawl-ref/source/options.h | 2 --
7 files changed, 8 insertions(+), 65 deletions(-)
diff --git a/crawl-ref/docs/options_guide.txt b/crawl-ref/docs/options_guide.txt
index 91b4e01..ac3b697 100644
--- a/crawl-ref/docs/options_guide.txt
+++ b/crawl-ref/docs/options_guide.txt
@@ -24,7 +24,7 @@ The contents of this text are:
3-a Dropping and Picking up.
autopickup, autopickup_exceptions, default_autopickup,
autopickup_no_burden, pickup_thrown, chunks_autopickup,
- assign_item_slot, drop_mode, pickup_menu, pickup_menu_limit,
+ assign_item_slot, pickup_menu, pickup_menu_limit,
drop_filter, default_friendly_pickup
3-b Targeting.
default_target, target_unshifted_dirs, darken_beyond_range
@@ -206,10 +206,10 @@ There are two styles you can use to set options. The classic
name=value syntax, one option per-line:
remember_name = true
explore_greedy = false
- drop_mode = multi
+ confirm_butcher= never
And the NetHack-style combined option line:
- OPTION = remember_name, !explore_greedy, drop_mode:multi
+ OPTION = remember_name, !explore_greedy, confirm_butcher:never
The second style is useful to specify simple options in a few lines,
but it cannot be used for options that take complex lists of values
@@ -490,22 +490,6 @@ assign_item_slot = (forward | backward)
With "backward", items dropped/fired and picked up later are
more likely to get their old slot back.
-drop_mode = (multi | single)
- Single is the classic behaviour; when you select an inventory
- letter, that item will be dropped immediately. Multidrop allows
- you to select multiple items to be dropped. (You can also switch
- to multidrop from the classic drop menu using the '@' key).
-
- Multidrop is the default and can be very convenient, but be
- aware that every item dropped takes one turn. (This is different
- from picking up.)
- When selecting multidrops, the top right corner shows the
- estimated number of turns.
-
- The order in which items get dropped is from top to bottom in
- the inventory listing, but equipped items will be dropped last,
- and may be dropped out of order.
-
pickup_menu = true
When true (the default), makes a menu appear, where you can
choose which items to pick up. Note that no matter how many
diff --git a/crawl-ref/settings/init.txt b/crawl-ref/settings/init.txt
index 80488d0..cf20a66 100644
--- a/crawl-ref/settings/init.txt
+++ b/crawl-ref/settings/init.txt
@@ -28,7 +28,8 @@
# Note that all boolean options (i.e. values of 'true' or 'false') have
# their non-default value commented out. You can toggle these by just
# uncommenting.
-# Options with several values, e.g. drop_mode = (multi | single),
+# Options with several values, e.g.
+# confirm_butcher = (auto | always | never),
# usually have the first value as default.
#
# The options for monster glyphs and item colours don't matter for Tiles.
@@ -86,7 +87,6 @@
# chunks_autopickup = false
# assign_item_slot = (forward | backward)
#
-# drop_mode = (multi | single)
# pickup_menu = false
# pickup_menu_limit = 4
# drop_filter += skeleton, corpse, useless_item
diff --git a/crawl-ref/source/initfile.cc b/crawl-ref/source/initfile.cc
index c4fc30f..987d2dd 100644
--- a/crawl-ref/source/initfile.cc
+++ b/crawl-ref/source/initfile.cc
@@ -907,7 +907,6 @@ void game_options::reset_options()
dump_item_origin_price = -1;
dump_book_spells = true;
- drop_mode = DM_MULTI;
pickup_menu = true;
pickup_menu_limit = 4;
@@ -3382,13 +3381,6 @@ void game_options::read_option_line(const string &str, bool runscript)
}
else if (key == "darken_beyond_range")
darken_beyond_range = _read_bool(field, darken_beyond_range);
- else if (key == "drop_mode")
- {
- if (field.find("multi") != string::npos)
- drop_mode = DM_MULTI;
- else
- drop_mode = DM_SINGLE;
- }
else BOOL_OPTION(pickup_menu);
else INT_OPTION(pickup_menu_limit, INT_MIN, INT_MAX);
else if (key == "additional_macro_file")
diff --git a/crawl-ref/source/initfile.h b/crawl-ref/source/initfile.h
index 4cab3c0..b104483 100644
--- a/crawl-ref/source/initfile.h
+++ b/crawl-ref/source/initfile.h
@@ -13,12 +13,6 @@
#include "itemprop-enum.h"
#include "unicode.h"
-enum drop_mode_type
-{
- DM_SINGLE,
- DM_MULTI,
-};
-
int str_to_summon_type(const string &str);
string gametype_to_str(game_type type);
diff --git a/crawl-ref/source/invent.cc b/crawl-ref/source/invent.cc
index c6e7470..072819a 100644
--- a/crawl-ref/source/invent.cc
+++ b/crawl-ref/source/invent.cc
@@ -992,22 +992,6 @@ bool InvMenu::process_key(int key)
}
}
- if (items.size()
- && type == MT_DROP
- && (key == CONTROL('D') || key == '@'))
- {
- int newflag = is_set(MF_MULTISELECT) ? MF_SINGLESELECT | MF_ANYPRINTABLE
- : MF_MULTISELECT;
-
- flags &= ~(MF_SINGLESELECT | MF_MULTISELECT | MF_ANYPRINTABLE);
- flags |= newflag;
-
- deselect_all();
- sel.clear();
- draw_select_count(0, true);
- return true;
- }
-
return Menu::process_key(key);
}
@@ -1461,21 +1445,16 @@ vector<SelItem> prompt_invent_items(
}
else if (keyin == '?' || keyin == '*' || keyin == ',')
{
- int selmode = Options.drop_mode == DM_SINGLE
- && (!pre_select || pre_select->empty()) ?
- MF_SINGLESELECT | MF_EASY_EXIT | MF_ANYPRINTABLE :
- MF_MULTISELECT | MF_ALLOW_FILTER;
-
// The "view inventory listing" mode.
const int ch = _invent_select(prompt,
mtype,
keyin == '*' ? OSEL_ANY : type_expect,
-1,
- selmode,
+ MF_MULTISELECT | MF_ALLOW_FILTER,
titlefn, &items, select_filter, fn,
pre_select);
- if ((selmode & MF_SINGLESELECT) || key_is_escape(ch))
+ if (key_is_escape(ch))
{
keyin = ch;
need_prompt = false;
diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc
index 98f86e4..060e768 100644
--- a/crawl-ref/source/items.cc
+++ b/crawl-ref/source/items.cc
@@ -2237,11 +2237,7 @@ void drop_last()
static string _drop_menu_title(const Menu *menu, const string &oldt)
{
- string res = _menu_burden_invstatus(menu) + " " + oldt;
- if (menu->is_set(MF_SINGLESELECT))
- res = "[Single drop] " + res;
-
- return res;
+ return _menu_burden_invstatus(menu) + " " + oldt;
}
int get_equip_slot(const item_def *item)
diff --git a/crawl-ref/source/options.h b/crawl-ref/source/options.h
index 3cde48a..b112276 100644
--- a/crawl-ref/source/options.h
+++ b/crawl-ref/source/options.h
@@ -335,8 +335,6 @@ public:
bool target_unshifted_dirs; // Unshifted keys target if cursor is
// on player.
- int drop_mode; // Controls whether single or multidrop
- // is the default.
bool pickup_menu; // false for single, true for menu
int pickup_menu_limit; // Over this number of items, menu for
// pickup
--
1.8.5.2
|