Attached Files |
0001-Remove-pickup_mode-option-introduce-pickup_menu.patch [^] (5,800 bytes) 2013-12-30 08:25 [Show Content] [Hide Content]From 664d5c08ae99641c3d1ce3b9f6b7dcded0a39715 Mon Sep 17 00:00:00 2001
From: Chris Oelmueller <chris.oelmueller@gmail.com>
Date: Mon, 30 Dec 2013 08:08:49 +0100
Subject: Remove `pickup_mode` option, introduce `pickup_menu`
End result is that:
* `pickup_menu = true` is old `pickup_mode = multi`, and new default
* `pickup_menu = false` is old `pickup_mode = single`
* `pickup_mode = auto:X` is gone without replacement for being of little use
Recognizing the old option in initfile did not make much sense either
because the default changed: Old `multi` was the only setting that
anybody would include in their rcfile, and that one is now meaningless.
So if your config until now included a line like the following:
pickup_mode = multi
you can now safely remove this.
If you prefer the old default behavior, use this option from now on:
pickup_menu = false
---
crawl-ref/docs/options_guide.txt | 17 +++++++----------
crawl-ref/settings/init.txt | 2 +-
crawl-ref/source/initfile.cc | 16 ++--------------
crawl-ref/source/items.cc | 5 +----
crawl-ref/source/options.h | 3 +--
5 files changed, 12 insertions(+), 31 deletions(-)
diff --git a/crawl-ref/docs/options_guide.txt b/crawl-ref/docs/options_guide.txt
index aebee97..6abcbda 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_mode, drop_filter,
+ assign_item_slot, drop_mode, pickup_menu, drop_filter,
default_friendly_pickup
3-b Targeting.
default_target, target_unshifted_dirs, darken_beyond_range
@@ -505,15 +505,12 @@ drop_mode = (multi | single)
the inventory listing, but equipped items will be dropped last,
and may be dropped out of order.
-pickup_mode = (multi | single | auto:X)
- Single is the classical behaviour (and default): when picking up
- items, you are prompted for them one by one. Multi makes a menu
- appear, where you can choose which items to pick up. Note that
- no matter how many items you choose, picking up will always take
- one turn.
- If pickup_mode is auto:X, where X is some number (for example,
- auto:5), then pickup will give a menu if there are at least X
- items on your square, and will prompt one by one otherwise.
+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
+ items you choose, picking up will always take one turn.
+ Setting this to false invokes the classical behaviour: when
+ picking up items, you are prompted for them one by one.
drop_filter += <regex>, <regex>, ...
(List option)
diff --git a/crawl-ref/settings/init.txt b/crawl-ref/settings/init.txt
index e9e211f..2262c58 100644
--- a/crawl-ref/settings/init.txt
+++ b/crawl-ref/settings/init.txt
@@ -87,7 +87,7 @@
# assign_item_slot = (forward | backward)
#
# drop_mode = (multi | single)
-# pickup_mode = (single | multi | auto:5)
+# pickup_menu = false
# drop_filter += skeleton, corpse, useless_item
# default_friendly_pickup = (none | friend | player | all)
diff --git a/crawl-ref/source/initfile.cc b/crawl-ref/source/initfile.cc
index 31f45a0..a27b8b8 100644
--- a/crawl-ref/source/initfile.cc
+++ b/crawl-ref/source/initfile.cc
@@ -908,11 +908,7 @@ void game_options::reset_options()
dump_book_spells = true;
drop_mode = DM_MULTI;
-#ifdef TOUCH_UI
- pickup_mode = 0;
-#else
- pickup_mode = -1;
-#endif
+ pickup_menu = true;
flush_input[ FLUSH_ON_FAILURE ] = true;
flush_input[ FLUSH_BEFORE_COMMAND ] = false;
@@ -3378,15 +3374,7 @@ void game_options::read_option_line(const string &str, bool runscript)
else
drop_mode = DM_SINGLE;
}
- else if (key == "pickup_mode")
- {
- if (field.find("multi") != string::npos)
- pickup_mode = 0;
- else if (field.find("single") != string::npos)
- pickup_mode = -1;
- else
- pickup_mode = _read_bool_or_number(field, pickup_mode, "auto:");
- }
+ else BOOL_OPTION(pickup_menu);
else if (key == "additional_macro_file")
{
// TODO: this option could probably be improved. For now, keep the
diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc
index 7bcf62e..dd05a6f 100644
--- a/crawl-ref/source/items.cc
+++ b/crawl-ref/source/items.cc
@@ -1265,11 +1265,8 @@ void pickup(bool partial_quantity)
// a killed item here.
pickup_single_item(o, partial_quantity ? 0 : mitm[o].quantity);
}
- else if (Options.pickup_mode != -1
- && num_nonsquelched >= Options.pickup_mode)
- {
+ else if (Options.pickup_menu)
pickup_menu(o);
- }
else
{
int next;
diff --git a/crawl-ref/source/options.h b/crawl-ref/source/options.h
index 371ba0e..6a5c18b 100644
--- a/crawl-ref/source/options.h
+++ b/crawl-ref/source/options.h
@@ -337,8 +337,7 @@ public:
int drop_mode; // Controls whether single or multidrop
// is the default.
- int pickup_mode; // -1 for single, 0 for menu,
- // X for 'if at least X items present'
+ bool pickup_menu; // false for single, true for menu
bool easy_exit_menu; // Menus are easier to get out of
--
1.8.5.2
|