From c6c218acfcec5e1d73faf274668f3b00d211f6ec Mon Sep 17 00:00:00 2001 From: haranp Date: Sat, 13 Dec 2008 14:32:28 +0000 Subject: autopickup_no_burden no longer influences manual pickup. Fixes 2375482. This might have unintended consequences; jpeg, can you review? git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7824 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/items.cc | 43 +------------------------------------------ 1 file changed, 1 insertion(+), 42 deletions(-) (limited to 'crawl-ref/source') diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc index 1eb3693b81..6d935b48a2 100644 --- a/crawl-ref/source/items.cc +++ b/crawl-ref/source/items.cc @@ -801,26 +801,6 @@ static void _pickup_menu(int item_link) item_link = mitm[j].link; int num_to_take = selected[i].quantity; - if (Options.autopickup_no_burden && item_mass(mitm[j]) != 0) - { - int num_can_take = - (carrying_capacity(you.burden_state) - you.burden) / - item_mass(mitm[j]); - - if (num_can_take < num_to_take) - { - if (!n_tried_pickup) - { - mpr("You can't pick everything up without " - "burdening yourself."); - } - n_tried_pickup++; - num_to_take = num_can_take; - } - - if (num_can_take == 0) - continue; - } unsigned long oldflags = mitm[j].flags; mitm[j].flags &= ~(ISFLAG_THROWN | ISFLAG_DROPPED); int result = move_item_to_player( j, num_to_take ); @@ -1244,7 +1224,6 @@ void pickup() { int next; mpr("There are several objects here."); - bool tried_pickup = false; std::string pickup_warning; while ( o != NON_ITEM ) { @@ -1282,26 +1261,6 @@ void pickup() if (keyin == 'y' || keyin == 'a') { int num_to_take = mitm[o].quantity; - if (Options.autopickup_no_burden && item_mass(mitm[o]) != 0) - { - int num_can_take = - (carrying_capacity(you.burden_state) - you.burden) / - item_mass(mitm[o]); - - if (num_can_take < num_to_take) - { - if (!tried_pickup) - { - mpr("You can't pick everything up without " - "burdening yourself."); - tried_pickup = true; - } - num_to_take = num_can_take; - } - - if (num_can_take == 0) - continue; - } const unsigned long old_flags(mitm[o].flags); mitm[o].flags &= ~(ISFLAG_THROWN | ISFLAG_DROPPED); int result = move_item_to_player( o, num_to_take ); @@ -1309,7 +1268,7 @@ void pickup() if (result == 0 || result == -1) { if (result == 0) - pickup_warning = "You can't carry that much weight."; + pickup_warning = "You can't carry that much weight."; else pickup_warning = "You can't carry that many items."; -- cgit v1.2.3-54-g00ecf