From 50d63f4c4af4c9392c69ac8513467f9bad924c22 Mon Sep 17 00:00:00 2001 From: dshaligram Date: Sun, 30 Dec 2007 11:25:00 +0000 Subject: [1833997] Fixed autopickup being blocked by first item that finds pack is full - autopickup now checks all items anyway, looking to find items that stack or that need no slots (gold). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3152 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/items.cc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc index 339ccb1c39..e240a435ad 100644 --- a/crawl-ref/source/items.cc +++ b/crawl-ref/source/items.cc @@ -2989,6 +2989,7 @@ static void do_autopickup() int o = igrd[you.x_pos][you.y_pos]; + std::string pickup_warning; while (o != NON_ITEM) { const int next = mitm[o].link; @@ -3027,19 +3028,21 @@ static void do_autopickup() { n_tried_pickup++; if (result == 0) - mpr("You can't carry any more."); + pickup_warning = "You can't carry any more."; else - mpr("Your pack is full."); + pickup_warning = "Your pack is full."; mitm[o].flags = iflags; - break; } - - n_did_pickup++; + else + n_did_pickup++; } o = next; } + if (!pickup_warning.empty()) + mpr(pickup_warning.c_str()); + if (n_did_pickup) you.turn_is_over = true; -- cgit v1.2.3-54-g00ecf