summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/settings/menu_colours.txt8
-rw-r--r--crawl-ref/source/describe.cc51
-rw-r--r--crawl-ref/source/invent.cc3
-rw-r--r--crawl-ref/source/item_use.cc5
-rw-r--r--crawl-ref/source/itemname.cc6
5 files changed, 45 insertions, 28 deletions
diff --git a/crawl-ref/settings/menu_colours.txt b/crawl-ref/settings/menu_colours.txt
index f6a2e00982..321c023392 100644
--- a/crawl-ref/settings/menu_colours.txt
+++ b/crawl-ref/settings/menu_colours.txt
@@ -3,7 +3,10 @@
menu := menu_colour
ae := autopickup_exceptions
-# Useless items, overrides all other colours
+# Bad items
+menu = lightred:.*bad_item.*
+
+# Useless items, comes here to override artefacts etc.
menu = darkgrey:.*useless_item.*
: if you.race() == "Spriggan" then
@@ -47,9 +50,6 @@ menu = yellow:.*emergency_item.*
menu = cyan:.*good_item.*
menu = cyan:.*misc.*[lL]antern
-# Bad items
-menu = lightred:.*bad_item.*
-
# Dangerous (but still useful) items
menu = magenta:.*dangerous_item.*
diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc
index 3d65db6941..9a7692f1e9 100644
--- a/crawl-ref/source/describe.cc
+++ b/crawl-ref/source/describe.cc
@@ -2079,35 +2079,46 @@ void inscribe_item(item_def &item, bool proper_prompt)
}
}
- std::string prompt = (is_inscribed ? "Add to inscription? "
- : "Inscribe item? ");
+ std::string prompt;
+ int keyin;
+ bool did_prompt = false;
- if (need_autoinscribe || is_inscribed)
+ // Don't prompt for whether to inscribe in the first place if the
+ // player is using '{' - unless autoinscribing or clearing an
+ // existing inscription become an option.
+ if (!proper_prompt || need_autoinscribe || is_inscribed)
{
- prompt += "(You may also ";
- if (need_autoinscribe)
+ prompt = (is_inscribed ? "Add to inscription? "
+ : "Inscribe item? ");
+
+ if (need_autoinscribe || is_inscribed)
{
- prompt += "(a)utoinscribe";
+ prompt += "(You may also ";
+ if (need_autoinscribe)
+ {
+ prompt += "(a)utoinscribe";
+ if (is_inscribed)
+ prompt += ", or ";
+ }
if (is_inscribed)
- prompt += ", or ";
+ prompt += "(c)lear it";
+ prompt += ".) ";
}
- if (is_inscribed)
- prompt += "(c)lear it";
- prompt += ".) ";
- }
- if (proper_prompt)
- mpr(prompt.c_str(), MSGCH_PROMPT);
- else
- {
- prompt = "<cyan>" + prompt + "</cyan>";
- formatted_string::parse_string(prompt).display();
+ if (proper_prompt)
+ mpr(prompt.c_str(), MSGCH_PROMPT);
+ else
+ {
+ prompt = "<cyan>" + prompt + "</cyan>";
+ formatted_string::parse_string(prompt).display();
- if (Options.tutorial_left && wherey() <= get_number_of_lines() - 5)
- tutorial_inscription_info(need_autoinscribe, prompt);
+ if (Options.tutorial_left && wherey() <= get_number_of_lines() - 5)
+ tutorial_inscription_info(need_autoinscribe, prompt);
+ }
+ did_prompt = true;
}
- int keyin = tolower(c_getch());
+ keyin = (did_prompt ? tolower(c_getch()) : 'y');
switch (keyin)
{
case 'c':
diff --git a/crawl-ref/source/invent.cc b/crawl-ref/source/invent.cc
index f4279e30cd..16643193fb 100644
--- a/crawl-ref/source/invent.cc
+++ b/crawl-ref/source/invent.cc
@@ -335,6 +335,8 @@ static std::string _no_selectables_message(int item_selector)
case OSEL_WIELD:
case OBJ_WEAPONS:
return("You aren't carrying any weapons.");
+ case OBJ_ARMOUR:
+ return("You aren't carrying any armour.");
case OSEL_UNIDENT:
return("You don't have any unidentified items.");
case OSEL_MEMORISE:
@@ -342,7 +344,6 @@ static std::string _no_selectables_message(int item_selector)
case OSEL_RECHARGE:
return("You aren't carrying any rechargable items.");
case OSEL_ENCH_ARM:
- case OBJ_ARMOUR:
return("You aren't carrying any armour which can be enchanted "
"further.");
case OBJ_CORPSES:
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index 00eb067077..88f6d9cb23 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -4101,9 +4101,10 @@ static bool _handle_enchant_armour( int item_slot )
OSEL_ENCH_ARM, true, true, false );
}
- if (item_slot == -1)
+ if (item_slot == PROMPT_ABORT || item_slot == PROMPT_NOTHING)
{
- canned_msg( MSG_OK );
+ if (item_slot == PROMPT_ABORT)
+ canned_msg( MSG_OK );
return (false);
}
diff --git a/crawl-ref/source/itemname.cc b/crawl-ref/source/itemname.cc
index 71f15c9565..a8f79190b3 100644
--- a/crawl-ref/source/itemname.cc
+++ b/crawl-ref/source/itemname.cc
@@ -2178,7 +2178,7 @@ bool is_interesting_item( const item_def& item )
}
const std::string iname = menu_colour_item_prefix(item, false)
- + item.name(DESC_PLAIN);
+ + item.name(DESC_PLAIN);
for (unsigned i = 0; i < Options.note_items.size(); ++i)
if (Options.note_items[i].matches(iname))
return (true);
@@ -2437,6 +2437,10 @@ bool is_useless_item(const item_def &item, bool temp)
if (!item_type_known(item))
return (false);
+ // A bad item is always useless.
+ if (is_bad_item(item, temp))
+ return (true);
+
switch (item.sub_type)
{
case POT_BERSERK_RAGE: