Attached Files |
0001-Menu-for-pickup-new-option-pickup_menu_limit.patch [^] (4,974 bytes) 2014-01-08 23:44 [Show Content] [Hide Content]From 5d6c13f1f8dbcfd182d4fd6218ee08195a21efc4 Mon Sep 17 00:00:00 2001
From: Cedor <cedordark@yahoo.fr>
Date: Wed, 8 Jan 2014 22:19:59 +0100
Subject: [PATCH] Menu for pickup : new option 'pickup_menu_limit'
'pickup_menu' option behavior adjusted:
* true : same behavior
* false : like the old auto:X, X is given with a new option:
'pickup_menu_limit', default 4.
Why 4? starting to 4 questions, you got a --more-- prompt, and starting to
6 items on the square, items are displayed with glyphs instead of full names.
---
crawl-ref/docs/options_guide.txt | 16 +++++++++++-----
crawl-ref/settings/init.txt | 1 +
crawl-ref/source/initfile.cc | 3 +++
crawl-ref/source/items.cc | 2 +-
crawl-ref/source/options.h | 3 ++-
5 files changed, 18 insertions(+), 7 deletions(-)
diff --git a/crawl-ref/docs/options_guide.txt b/crawl-ref/docs/options_guide.txt
index f264139..3a29388 100644
--- a/crawl-ref/docs/options_guide.txt
+++ b/crawl-ref/docs/options_guide.txt
@@ -24,8 +24,8 @@ 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, drop_filter,
- default_friendly_pickup
+ assign_item_slot, drop_mode, pickup_menu, pick_menu_limit,
+ drop_filter, default_friendly_pickup
3-b Targeting.
default_target, target_unshifted_dirs, darken_beyond_range
3-c Passive Sightings (detected and remembered entities).
@@ -509,9 +509,15 @@ 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.
-
+ Setting this to false invokes another behaviour: when picking up
+ items, if there are at least 5 items on your square, the menu will
+ appear, and you are prompted one by one otherwise.
+ This number can be adjusted with the pick_menu_limit option.
+
+pick_menu_limit = 4
+ The number of items on your square that will activate menu for pickup
+ when pickup_menu is set to false.
+
drop_filter += <regex>, <regex>, ...
(List option)
When selecting items using the global (de)select keys (',' or
diff --git a/crawl-ref/settings/init.txt b/crawl-ref/settings/init.txt
index 19dffa4..f6fd911 100644
--- a/crawl-ref/settings/init.txt
+++ b/crawl-ref/settings/init.txt
@@ -88,6 +88,7 @@
#
# drop_mode = (multi | single)
# pickup_menu = false
+# pickup_menu_limit = 4
# 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 2ecfa81..5362992 100644
--- a/crawl-ref/source/initfile.cc
+++ b/crawl-ref/source/initfile.cc
@@ -909,6 +909,7 @@ void game_options::reset_options()
drop_mode = DM_MULTI;
pickup_menu = true;
+ pickup_menu_limit = 4;
flush_input[ FLUSH_ON_FAILURE ] = true;
flush_input[ FLUSH_BEFORE_COMMAND ] = false;
@@ -3385,6 +3386,8 @@ void game_options::read_option_line(const string &str, bool runscript)
drop_mode = DM_SINGLE;
}
else BOOL_OPTION(pickup_menu);
+ else if (key == "pickup_menu_limit")
+ pickup_menu_limit = atoi(field.c_str());
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 dd05a6f..8740d91 100644
--- a/crawl-ref/source/items.cc
+++ b/crawl-ref/source/items.cc
@@ -1265,7 +1265,7 @@ void pickup(bool partial_quantity)
// a killed item here.
pickup_single_item(o, partial_quantity ? 0 : mitm[o].quantity);
}
- else if (Options.pickup_menu)
+ else if (Options.pickup_menu || num_nonsquelched >= Options.pickup_menu_limit)
pickup_menu(o);
else
{
diff --git a/crawl-ref/source/options.h b/crawl-ref/source/options.h
index 1b419eb..f21389c 100644
--- a/crawl-ref/source/options.h
+++ b/crawl-ref/source/options.h
@@ -338,7 +338,8 @@ public:
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
bool easy_exit_menu; // Menus are easier to get out of
int assign_item_slot; // How free slots are assigned
--
1.8.4.msysgit.0
0001-Menu-for-pickup-new-option-pickup_menu_limit(updated).patch [^] (5,235 bytes) 2014-01-09 19:42 [Show Content] [Hide Content]From 3c081ad6953dd520cd1d4d8317f794751a68a49e Mon Sep 17 00:00:00 2001
From: Cedor <cedordark@yahoo.fr>
Date: Wed, 8 Jan 2014 22:19:59 +0100
Subject: [PATCH] Menu for pickup : new option 'pickup_menu_limit'
'pickup_menu' option behavior adjusted:
* true : same behavior
* false : like the old auto:X, X is given with a new option:
'pickup_menu_limit', default 4, negatives value considered
as item_stack_summary_minimum.
Why 4? starting to 4 questions, you got a --more-- prompt, and starting to
6 items on the square, items are displayed with glyphs instead of full names.
---
crawl-ref/docs/options_guide.txt | 17 ++++++++++++-----
crawl-ref/settings/init.txt | 1 +
crawl-ref/source/initfile.cc | 7 +++++++
crawl-ref/source/items.cc | 2 +-
crawl-ref/source/options.h | 3 ++-
5 files changed, 23 insertions(+), 7 deletions(-)
diff --git a/crawl-ref/docs/options_guide.txt b/crawl-ref/docs/options_guide.txt
index f264139..adb2413 100644
--- a/crawl-ref/docs/options_guide.txt
+++ b/crawl-ref/docs/options_guide.txt
@@ -24,8 +24,8 @@ 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, drop_filter,
- default_friendly_pickup
+ assign_item_slot, drop_mode, pickup_menu, pick_menu_limit,
+ drop_filter, default_friendly_pickup
3-b Targeting.
default_target, target_unshifted_dirs, darken_beyond_range
3-c Passive Sightings (detected and remembered entities).
@@ -509,9 +509,16 @@ 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.
-
+ Setting this to false invokes another behaviour: when picking up
+ items, if there are at least 4 items on your square, the menu will
+ appear, and you are prompted one by one otherwise.
+ This number can be adjusted with the pick_menu_limit option.
+
+pick_menu_limit = 4
+ The number of items on your square that will activate menu for pickup
+ when pickup_menu is set to false.
+ Negatives value will be considered as item_stack_summary_minimum.
+
drop_filter += <regex>, <regex>, ...
(List option)
When selecting items using the global (de)select keys (',' or
diff --git a/crawl-ref/settings/init.txt b/crawl-ref/settings/init.txt
index 19dffa4..f6fd911 100644
--- a/crawl-ref/settings/init.txt
+++ b/crawl-ref/settings/init.txt
@@ -88,6 +88,7 @@
#
# drop_mode = (multi | single)
# pickup_menu = false
+# pickup_menu_limit = 4
# 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 2ecfa81..bbb7d1b 100644
--- a/crawl-ref/source/initfile.cc
+++ b/crawl-ref/source/initfile.cc
@@ -909,6 +909,7 @@ void game_options::reset_options()
drop_mode = DM_MULTI;
pickup_menu = true;
+ pickup_menu_limit = 4;
flush_input[ FLUSH_ON_FAILURE ] = true;
flush_input[ FLUSH_BEFORE_COMMAND ] = false;
@@ -3385,6 +3386,12 @@ void game_options::read_option_line(const string &str, bool runscript)
drop_mode = DM_SINGLE;
}
else BOOL_OPTION(pickup_menu);
+ else if (key == "pickup_menu_limit")
+ {
+ pickup_menu_limit = atoi(field.c_str());
+ if (pickup_menu_limit < 0 )
+ pickup_menu_limit = item_stack_summary_minimum;
+ }
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 dd05a6f..8740d91 100644
--- a/crawl-ref/source/items.cc
+++ b/crawl-ref/source/items.cc
@@ -1265,7 +1265,7 @@ void pickup(bool partial_quantity)
// a killed item here.
pickup_single_item(o, partial_quantity ? 0 : mitm[o].quantity);
}
- else if (Options.pickup_menu)
+ else if (Options.pickup_menu || num_nonsquelched >= Options.pickup_menu_limit)
pickup_menu(o);
else
{
diff --git a/crawl-ref/source/options.h b/crawl-ref/source/options.h
index 1b419eb..f21389c 100644
--- a/crawl-ref/source/options.h
+++ b/crawl-ref/source/options.h
@@ -338,7 +338,8 @@ public:
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
bool easy_exit_menu; // Menus are easier to get out of
int assign_item_slot; // How free slots are assigned
--
1.8.4.msysgit.0
0001-Menu-for-pickup-new-option-pickup_menu_limit(upcorr).patch [^] (5,197 bytes) 2014-01-09 22:26 [Show Content] [Hide Content]From 3d3ee5fce76bda6a3fd0ea4b62ce586cd5bb3c0d Mon Sep 17 00:00:00 2001
From: Cedor <cedordark@yahoo.fr>
Date: Wed, 8 Jan 2014 22:19:59 +0100
Subject: [PATCH] Menu for pickup : new option 'pickup_menu_limit'
'pickup_menu' option behavior adjusted:
* true : same behavior
* false : like the old auto:X, X is given with a new option:
'pickup_menu_limit', default 4, negatives value considered
as item_stack_summary_minimum.
Why 4? starting to 4 questions, you got a --more-- prompt, and starting to
6 items on the square, items are displayed with glyphs instead of full names.
---
crawl-ref/docs/options_guide.txt | 15 +++++++++++----
crawl-ref/settings/init.txt | 1 +
crawl-ref/source/initfile.cc | 5 +++++
crawl-ref/source/items.cc | 6 +++++-
crawl-ref/source/options.h | 3 ++-
5 files changed, 24 insertions(+), 6 deletions(-)
diff --git a/crawl-ref/docs/options_guide.txt b/crawl-ref/docs/options_guide.txt
index f264139..e69e321 100644
--- a/crawl-ref/docs/options_guide.txt
+++ b/crawl-ref/docs/options_guide.txt
@@ -24,8 +24,8 @@ 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, drop_filter,
- default_friendly_pickup
+ assign_item_slot, drop_mode, pickup_menu, pickup_menu_limit,
+ drop_filter, default_friendly_pickup
3-b Targeting.
default_target, target_unshifted_dirs, darken_beyond_range
3-c Passive Sightings (detected and remembered entities).
@@ -509,8 +509,15 @@ 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.
+ Setting this to false invokes another behaviour: when picking up
+ items, if there are at least 4 items on your square, the menu will
+ appear, and you are prompted one by one otherwise.
+ This number can be adjusted with the pickup_menu_limit option.
+
+pickup_menu_limit = 4
+ The number of items on your square that will activate menu for pickup
+ when pickup_menu is set to false.
+ Negatives value will be considered as item_stack_summary_minimum.
drop_filter += <regex>, <regex>, ...
(List option)
diff --git a/crawl-ref/settings/init.txt b/crawl-ref/settings/init.txt
index 19dffa4..f6fd911 100644
--- a/crawl-ref/settings/init.txt
+++ b/crawl-ref/settings/init.txt
@@ -88,6 +88,7 @@
#
# drop_mode = (multi | single)
# pickup_menu = false
+# pickup_menu_limit = 4
# 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 2ecfa81..e385725 100644
--- a/crawl-ref/source/initfile.cc
+++ b/crawl-ref/source/initfile.cc
@@ -909,6 +909,7 @@ void game_options::reset_options()
drop_mode = DM_MULTI;
pickup_menu = true;
+ pickup_menu_limit = 4;
flush_input[ FLUSH_ON_FAILURE ] = true;
flush_input[ FLUSH_BEFORE_COMMAND ] = false;
@@ -3385,6 +3386,10 @@ void game_options::read_option_line(const string &str, bool runscript)
drop_mode = DM_SINGLE;
}
else BOOL_OPTION(pickup_menu);
+ else if (key == "pickup_menu_limit")
+ {
+ pickup_menu_limit = atoi(field.c_str());
+ }
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 dd05a6f..bb19b27 100644
--- a/crawl-ref/source/items.cc
+++ b/crawl-ref/source/items.cc
@@ -1265,7 +1265,11 @@ void pickup(bool partial_quantity)
// a killed item here.
pickup_single_item(o, partial_quantity ? 0 : mitm[o].quantity);
}
- else if (Options.pickup_menu)
+ else if (Options.pickup_menu
+ || (num_nonsquelched >=
+ (Options.pickup_menu_limit < 0)?
+ Options.item_stack_summary_minimum:
+ Options.pickup_menu_limit))
pickup_menu(o);
else
{
diff --git a/crawl-ref/source/options.h b/crawl-ref/source/options.h
index 1b419eb..bb1c887 100644
--- a/crawl-ref/source/options.h
+++ b/crawl-ref/source/options.h
@@ -338,7 +338,8 @@ public:
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
bool easy_exit_menu; // Menus are easier to get out of
int assign_item_slot; // How free slots are assigned
--
1.8.4.msysgit.0
|