summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/items.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2008-12-13 14:32:28 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2008-12-13 14:32:28 +0000
commitc6c218acfcec5e1d73faf274668f3b00d211f6ec (patch)
treeadd454a79b5351d7f4cdbecfefb47f91daa4179b /crawl-ref/source/items.cc
parent59ed12959885ad6abb1b8c3cbe31e66e74417136 (diff)
downloadcrawl-ref-c6c218acfcec5e1d73faf274668f3b00d211f6ec.tar.gz
crawl-ref-c6c218acfcec5e1d73faf274668f3b00d211f6ec.zip
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
Diffstat (limited to 'crawl-ref/source/items.cc')
-rw-r--r--crawl-ref/source/items.cc43
1 files changed, 1 insertions, 42 deletions
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.";