diff options
author | Matthew Cline <zelgadis@sourceforge.net> | 2009-11-19 20:32:18 -0800 |
---|---|---|
committer | Matthew Cline <zelgadis@sourceforge.net> | 2009-11-19 20:40:15 -0800 |
commit | 9c717124d2f48858824a1bfdf3fe4ff62f223e72 (patch) | |
tree | d6583372c94afdf2336cad576049149c8b3f8d5b /crawl-ref/source/travel.cc | |
parent | 8ae09e1699c95d66263264540e13d09fcac63f59 (diff) | |
download | crawl-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/travel.cc')
-rw-r--r-- | crawl-ref/source/travel.cc | 38 |
1 files changed, 5 insertions, 33 deletions
diff --git a/crawl-ref/source/travel.cc b/crawl-ref/source/travel.cc index 7af3080f09..f0965784ce 100644 --- a/crawl-ref/source/travel.cc +++ b/crawl-ref/source/travel.cc @@ -795,8 +795,8 @@ void explore_pickup_event(int did_pickup, int tried_pickup) if (did_pickup) { const int estop = - (you.running == RMODE_EXPLORE_GREEDY) ? ES_GREEDY_PICKUP - : ES_PICKUP; + (you.running == RMODE_EXPLORE_GREEDY) ? ES_GREEDY_PICKUP_MASK + : ES_NONE; if ((Options.explore_stop & estop) && prompt_stop_explore(estop)) { @@ -932,35 +932,6 @@ command_type travel() prev_travel_index = !prev_travel_index; } - if ((*move_x || *move_y) && you.running == RMODE_EXPLORE_GREEDY) - { - // Greedy explore should cut off on reaching an item. We can't - // check after reaching the item, because at that point the stash - // tracker will have verified the stash and say "false" to - // needs_visit. - const coord_def newpos = you.pos() + coord_def(*move_x, *move_y); - - if (newpos == you.running.pos) - { - const LevelStashes *lev = StashTrack.find_current_level(); - if (lev && lev->needs_visit(newpos) - && !lev->shop_needs_visit(newpos)) - { - const int estop = - (you.running == RMODE_EXPLORE_GREEDY) ? - ES_GREEDY_PICKUP : ES_PICKUP; - - if ((Options.explore_stop & estop) - && prompt_stop_explore(estop)) - { - explore_stopped_pos = newpos; - stop_running(); - } - return direction_to_command( *move_x, *move_y ); - } - } - } - if (!*move_x && !*move_y) { // If we've reached the square we were traveling towards, travel @@ -4053,8 +4024,9 @@ void explore_discoveries::found_item(const coord_def &pos, const item_def &i) } // if (you.running == RMODE_EXPLORE_GREEDY) add_item(i); - es_flags |= (you.running == RMODE_EXPLORE_GREEDY) ? ES_GREEDY_PICKUP - : ES_PICKUP; + // MATT + es_flags |= (you.running == RMODE_EXPLORE_GREEDY) ? ES_GREEDY_PICKUP_MASK + : ES_NONE; } // Expensive O(n^2) duplicate search, but we can live with that. |