From: <dsh...@us...> - 2007-12-30 11:25:02
|
Revision: 3152 http://crawl-ref.svn.sourceforge.net/crawl-ref/?rev=3152&view=rev Author: dshaligram Date: 2007-12-30 03:25:00 -0800 (Sun, 30 Dec 2007) Log Message: ----------- [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). Modified Paths: -------------- trunk/crawl-ref/source/items.cc Modified: trunk/crawl-ref/source/items.cc =================================================================== --- trunk/crawl-ref/source/items.cc 2007-12-30 11:09:14 UTC (rev 3151) +++ trunk/crawl-ref/source/items.cc 2007-12-30 11:25:00 UTC (rev 3152) @@ -2989,6 +2989,7 @@ 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 @@ { 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; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |