diff options
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. |