summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/item_use.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-18 16:25:07 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-18 16:25:07 +0000
commite5425f03baf5050c807791da4befa60de0cd6263 (patch)
tree305d105d26e82b996c53fa5d1688a60174f602c1 /crawl-ref/source/item_use.cc
parent06b329e318a5b42a008d09bffd5fd38831cf324d (diff)
downloadcrawl-ref-e5425f03baf5050c807791da4befa60de0cd6263.tar.gz
crawl-ref-e5425f03baf5050c807791da4befa60de0cd6263.zip
[1945775] Print "Okay, then." when aborting wear/take off prompt.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4335 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/item_use.cc')
-rw-r--r--crawl-ref/source/item_use.cc31
1 files changed, 15 insertions, 16 deletions
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index ad37d5f351..f125c32cef 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -771,7 +771,9 @@ bool armour_prompt( const std::string & mesg, int *index, operation_types oper)
true, true, true, 0, NULL,
oper );
- if (slot != PROMPT_ABORT)
+ if (slot == PROMPT_ABORT)
+ canned_msg(MSG_OK);
+ else
{
*index = slot;
succeeded = true;
@@ -1017,17 +1019,8 @@ bool do_wear_armour( int item, bool quiet )
return (false);
}
- if ( wearing_slot(item) )
- {
-// if (Options.easy_unequip)
- return (!takeoff_armour(item));
-/*
- if (!quiet)
- mpr("You are already wearing that!");
-
- return (false);
-*/
- }
+ if (wearing_slot(item) )
+ return (!takeoff_armour(item));
// if you're wielding something,
if (you.equip[EQ_WEAPON] != -1
@@ -1053,9 +1046,11 @@ bool do_wear_armour( int item, bool quiet )
item_cursed(you.inv[you.equip[EQ_BODY_ARMOUR]]) )
{
if ( !quiet )
+ {
mprf("%s is stuck to your body!",
you.inv[you.equip[EQ_BODY_ARMOUR]].name(DESC_CAP_YOUR)
.c_str());
+ }
return (false);
}
if (!item_cursed( you.inv[you.equip[EQ_CLOAK]] ))
@@ -2823,10 +2818,12 @@ bool safe_to_remove_or_wear(const item_def &item, bool remove,
prompt += item.base_type == OBJ_WEAPONS ? "Unwield" : "Remove";
prompt += " anyway?";
- if ((prop_str >= you.strength || prop_int >= you.intel ||
- prop_dex >= you.dex)
+ if ((prop_str >= you.strength || prop_int >= you.intel
+ || prop_dex >= you.dex)
&& (quiet || !yesno(prompt.c_str(), false, 'n')))
{
+ if (!quiet)
+ canned_msg(MSG_OK);
return (false);
}
}
@@ -2838,10 +2835,12 @@ bool safe_to_remove_or_wear(const item_def &item, bool remove,
prompt += item.base_type == OBJ_WEAPONS ? "Wield" : "Put on";
prompt += " anyway?";
- if ((-prop_str >= you.strength || -prop_int >= you.intel ||
- -prop_dex >= you.dex)
+ if ((-prop_str >= you.strength || -prop_int >= you.intel
+ || -prop_dex >= you.dex)
&& (quiet || !yesno(prompt.c_str(), false, 'n')))
{
+ if (!quiet)
+ canned_msg(MSG_OK);
return (false);
}
}