summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/settings/autopickup_exceptions.txt11
-rw-r--r--crawl-ref/settings/menu_colours.txt16
-rw-r--r--crawl-ref/source/items.cc3
-rw-r--r--crawl-ref/source/misc.cc25
-rw-r--r--crawl-ref/source/shopping.cc41
5 files changed, 50 insertions, 46 deletions
diff --git a/crawl-ref/settings/autopickup_exceptions.txt b/crawl-ref/settings/autopickup_exceptions.txt
index af54da7878..d846db23c8 100644
--- a/crawl-ref/settings/autopickup_exceptions.txt
+++ b/crawl-ref/settings/autopickup_exceptions.txt
@@ -15,7 +15,16 @@ function ch_autopickup(it)
end
end >
-# Exclude potentially useful items of high risk, like ?torment.
+# Exclude items useless in general (?paper, bad potions unless you know
+# Evaporate) or for your current character (such as food for Mummies or
+# armour you can't wear).
+ae = useless_item
+
+# Exclude food items your character cannot eat.
+ae = inedible
+
+# Exclude potentially useful items of high risk, like ?torment or
+# !mutation.
ae = dangerous_item
# Excluding amulets as you only need one of each. (If you know the
diff --git a/crawl-ref/settings/menu_colours.txt b/crawl-ref/settings/menu_colours.txt
index eb6b1effdb..fe3636919b 100644
--- a/crawl-ref/settings/menu_colours.txt
+++ b/crawl-ref/settings/menu_colours.txt
@@ -3,6 +3,14 @@
menu := menu_colour
ae := autopickup_exceptions
+# Useless items, overrides all other colours
+menu = darkgrey:.*useless_item.*
+
+: if you.race() == "Spriggan" then
+menu = darkgrey:.*jewellery.*(sustenance)
+ae = >ring.*(sustenance)
+:end
+
# Important game items
#
menu = lightmagenta:.*misc.*rune( of Zot)?
@@ -45,14 +53,6 @@ menu = lightred:.*bad_item.*
# Dangerous (but still useful) items
menu = magenta:.*dangerous_item.*
-# Useless items
-menu = darkgrey:.*useless_item.*
-
-: if you.race() == "Spriggan" then
-menu = darkgrey:.*jewellery.*(sustenance)
-ae = >ring.*(sustenance)
-:end
-
# Evil items
inv = $evil:.*evil_item.*
diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc
index 624d9a81fe..b47c332ffe 100644
--- a/crawl-ref/source/items.cc
+++ b/crawl-ref/source/items.cc
@@ -2232,8 +2232,7 @@ bool item_needs_autopickup(const item_def &item)
std::string itemname;
return ((Options.autopickups & (1L << item.base_type)
- && !is_useless_item(item) && !is_inedible(item)
- || _is_forced_autopickup(item, itemname))
+ || _is_forced_autopickup(item, itemname))
&& (Options.pickup_dropped || !(item.flags & ISFLAG_DROPPED))
&& !_is_denied_autopickup(item, itemname));
}
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc
index 4dd1b21753..f5be8ee92e 100644
--- a/crawl-ref/source/misc.cc
+++ b/crawl-ref/source/misc.cc
@@ -611,18 +611,19 @@ bool maybe_coagulate_blood_potions_inv(item_def &blood)
if (freeslot >= 0 && freeslot < ENDOFPACK
&& !is_valid_item(you.inv[freeslot]))
{
- item_def &item = you.inv[freeslot];
- item.link = freeslot;
- item.slot = index_to_letter(item.link);
- item.base_type = OBJ_POTIONS;
- item.sub_type = POT_BLOOD_COAGULATED;
- item.quantity = coag_count;
- item.x = -1;
- item.y = -1;
- item.plus = 0;
- item.plus2 = 0;
- item.special = 0;
- item.flags = 0;
+ item_def &item = you.inv[freeslot];
+ item.link = freeslot;
+ item.slot = index_to_letter(item.link);
+ item.base_type = OBJ_POTIONS;
+ item.sub_type = POT_BLOOD_COAGULATED;
+ item.quantity = coag_count;
+ item.x = -1;
+ item.y = -1;
+ item.plus = 0;
+ item.plus2 = 0;
+ item.special = 0;
+ item.flags = 0;
+ item.inscription = "";
item_colour(item);
CrawlHashTable &props_new = item.props;
diff --git a/crawl-ref/source/shopping.cc b/crawl-ref/source/shopping.cc
index 01044a58e0..2d8a89827d 100644
--- a/crawl-ref/source/shopping.cc
+++ b/crawl-ref/source/shopping.cc
@@ -206,29 +206,24 @@ static std::string _shop_print_stock( const std::vector<int>& stock,
}
-/*
- Rather than prompting for each individual item, I think it should be
-like multi-pickup, in that pressing a letter only "selects" an item
-(changing the '-' next to its name to a '+').
-
-New, suggested shopping keys:
-* letter keys [a-t] (de)select item
-* Enter buys (with prompt)
-* ? toggles examination mode (where letter keys view items)
-* \ shows discovered items
-* * lists inventory
-* x exits (also Esc)
-
-For the ? key, the text should read:
-[?] switch to examination mode
-[?] switch to selection mode
-
-Display selected items in yellow.
-Use red/green letters to indicated availability as now. Update these as
-items are (de)selected.
-List funds: "You now have 119 gold pieces. After the purchase, you will
-have 24 gold pieces."
-*/
+// Rather than prompting for each individual item, shopping now works more
+// like multi-pickup, in that pressing a letter only "selects" an item
+// (changing the '-' next to its name to a '+'). Affordability is shown
+// via colours that are updated every time the contents of your shopping
+// cart change.
+//
+// New, suggested shopping keys:
+// * letter keys [a-t] (de)select item, as now
+// * Enter buys (with prompt), as now
+// * \ shows discovered items, as now
+// * x exits (also Esc), as now
+// --------
+// * ? toggles examination mode (where letter keys view items)
+// * * lists inventory (currently also ?)
+//
+// For the ? key, the text should read:
+// [?] switch to examination mode
+// [?] switch to selection mode
static void _in_a_shop( int shopidx )
{
const shop_struct& shop = env.shop[shopidx];