summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/initfile.cc
diff options
context:
space:
mode:
authorMatthew Cline <zelgadis@sourceforge.net>2009-11-19 20:32:18 -0800
committerMatthew Cline <zelgadis@sourceforge.net>2009-11-19 20:40:15 -0800
commit9c717124d2f48858824a1bfdf3fe4ff62f223e72 (patch)
treed6583372c94afdf2336cad576049149c8b3f8d5b /crawl-ref/source/initfile.cc
parent8ae09e1699c95d66263264540e13d09fcac63f59 (diff)
downloadcrawl-ref-9c717124d2f48858824a1bfdf3fe4ff62f223e72.tar.gz
crawl-ref-9c717124d2f48858824a1bfdf3fe4ff62f223e72.zip
explore_stop: greedy_pickup_smart, pickup_ignore
* Added the explore_stop option "greedy_pickup_smart", which is like greedy_pickup, but only stops for thrown items and items different than any in your inventory (and for fruit if you worship Fedhas). * Added the option explore_stop_pickup_ignore. Any items matching any of the regexes in the list will *not* cause "explore_stop = greedy_pickup" (or greedy_pickup_smart) to stop auto-explore. * "explore_stop = greedy_pickup" no longer stops when picking up gold. * "explore_stop = greedy_pickup" (or greedy_pickup_smart) now stops auto-explore after auto-pickup has happened, rather than right before it happens. * Removed obsolete ES_PICKUP.
Diffstat (limited to 'crawl-ref/source/initfile.cc')
-rw-r--r--crawl-ref/source/initfile.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/crawl-ref/source/initfile.cc b/crawl-ref/source/initfile.cc
index 37dfd8f952..30ade48c03 100644
--- a/crawl-ref/source/initfile.cc
+++ b/crawl-ref/source/initfile.cc
@@ -755,6 +755,8 @@ void game_options::reset_options()
// reading options.
explore_stop_prompt = ES_NONE;
+ explore_stop_pickup_ignore.clear();
+
explore_item_greed = 10;
explore_greedy = true;
@@ -1598,10 +1600,10 @@ int game_options::read_explore_stop_conditions(const std::string &field) const
const std::string &c = stops[i];
if (c == "item" || c == "items")
conditions |= ES_ITEM;
- else if (c == "pickup")
- conditions |= ES_PICKUP;
else if (c == "greedy_pickup" || c == "greedy pickup")
conditions |= ES_GREEDY_PICKUP;
+ else if (c == "greedy_pickup_smart" || c == "greedy pickup smart")
+ conditions |= ES_GREEDY_PICKUP_SMART;
else if (c == "shop" || c == "shops")
conditions |= ES_SHOP;
else if (c == "stair" || c == "stairs")
@@ -1975,6 +1977,7 @@ void game_options::read_option_line(const std::string &str, bool runscript)
if (key != "name" && key != "crawl_dir" && key != "macro_dir"
&& key != "species" && key != "job" && key != "ban_pickup"
&& key != "autopickup_exceptions"
+ && key != "explore_stop_pickup_ignore"
&& key != "stop_travel" && key != "sound"
&& key != "travel_stop_message" && key != "force_more_message"
&& key != "drop_filter" && key != "lua_file" && key != "terp_file"
@@ -2869,6 +2872,10 @@ void game_options::read_option_line(const std::string &str, bool runscript)
else
explore_stop_prompt |= new_conditions;
}
+ else if (key == "explore_stop_pickup_ignore")
+ {
+ append_vector(explore_stop_pickup_ignore, split_string(",", field));
+ }
else if (key == "explore_item_greed")
{
explore_item_greed = atoi( field.c_str() );