summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-10-25 05:22:59 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-10-25 05:22:59 +0000
commitcf35b85a5fffd0bf5c057bd92d4a236235d0892b (patch)
treef3880b51b2aec6696172ee29f1a29e147375faeb
parent4c3d4bef612c3add065a9791fc0087f344892753 (diff)
downloadcrawl-ref-cf35b85a5fffd0bf5c057bd92d4a236235d0892b.tar.gz
crawl-ref-cf35b85a5fffd0bf5c057bd92d4a236235d0892b.zip
Fixed bugs in greedy-explore's item ignore prompts.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2541 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/source/items.cc3
-rw-r--r--crawl-ref/source/items.h2
-rw-r--r--crawl-ref/source/travel.cc10
3 files changed, 10 insertions, 5 deletions
diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc
index 207549ddbc..53bf6cfa2c 100644
--- a/crawl-ref/source/items.cc
+++ b/crawl-ref/source/items.cc
@@ -1591,12 +1591,13 @@ int move_item_to_player( int obj, int quant_got, bool quiet )
return (retval);
} // end move_item_to_player()
-void mark_items_dropped_at(const coord_def &pos)
+void mark_items_non_pickup_at(const coord_def &pos)
{
int item = igrd(pos);
while (item != NON_ITEM)
{
mitm[item].flags |= ISFLAG_DROPPED;
+ mitm[item].flags &= ~ISFLAG_THROWN;
item = mitm[item].link;
}
}
diff --git a/crawl-ref/source/items.h b/crawl-ref/source/items.h
index 05481e63b9..1e0d548405 100644
--- a/crawl-ref/source/items.h
+++ b/crawl-ref/source/items.h
@@ -40,7 +40,7 @@ void inc_mitm_item_quantity( int obj, int amount );
bool move_item_to_grid( int *const obj, int x, int y );
void move_item_stack_to_grid( int x, int y, int targ_x, int targ_y );
int move_item_to_player( int obj, int quant_got, bool quiet = false );
-void mark_items_dropped_at(const coord_def &pos);
+void mark_items_non_pickup_at(const coord_def &pos);
bool is_stackable_item( const item_def &item );
bool items_stack( const item_def &item1, const item_def &item2,
bool force = false );
diff --git a/crawl-ref/source/travel.cc b/crawl-ref/source/travel.cc
index 78ce892ea1..08783fbdc5 100644
--- a/crawl-ref/source/travel.cc
+++ b/crawl-ref/source/travel.cc
@@ -922,7 +922,6 @@ void explore_pickup_event(int did_pickup, int tried_pickup)
// pick up, so the only thing to do is to stop.
if (tried_pickup && you.running == RMODE_EXPLORE_GREEDY)
{
- stop_delay();
if (explore_stopped_pos == you.pos()
&& !Options.pickup_dropped)
{
@@ -931,10 +930,15 @@ void explore_pickup_event(int did_pickup, int tried_pickup)
"Could not pick up %s here, shall I ignore %s? ",
tried_pickup == 1? "an item" : "some items",
tried_pickup == 1? "it" : "them");
- if (yesno(prompt.c_str(), true, 'y'))
- mark_items_dropped_at(you.pos());
+ if (yesno(prompt.c_str(), true, 'y', true, false))
+ {
+ mark_items_non_pickup_at(you.pos());
+ // Don't stop explore.
+ return;
+ }
}
explore_stopped_pos = you.pos();
+ stop_delay();
}
}