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-05-25 13:02:35 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-25 13:02:35 +0000
commit378c95389b4ac05f90399105c705a2667a1c922e (patch)
tree1a861a0fba23ac35eb85560e820933a58cf75943 /crawl-ref/source/item_use.cc
parent440734626b1e63e9e97a8f1b3d4b08d72a3b7b18 (diff)
downloadcrawl-ref-378c95389b4ac05f90399105c705a2667a1c922e.tar.gz
crawl-ref-378c95389b4ac05f90399105c705a2667a1c922e.zip
Remove the prompt before putting/removing on stat draining items
in favour of just refusing to do so. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5233 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/item_use.cc')
-rw-r--r--crawl-ref/source/item_use.cc36
1 files changed, 16 insertions, 20 deletions
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index 727a572ca9..804995e72b 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -2871,35 +2871,31 @@ bool safe_to_remove_or_wear(const item_def &item, bool remove,
if (remove)
{
- std::string prompt =
- item.base_type == OBJ_WEAPONS ? "Unwielding" : "Removing";
- prompt += " this item could be fatal. ";
- prompt += item.base_type == OBJ_WEAPONS ? "Unwield" : "Remove";
- prompt += " anyway?";
-
- if ((prop_str >= you.strength || prop_int >= you.intel
- || prop_dex >= you.dex)
- && (quiet || !yesno(prompt.c_str(), false, 'n')))
+ if (prop_str >= you.strength || prop_int >= you.intel
+ || prop_dex >= you.dex)
{
if (!quiet)
- canned_msg(MSG_OK);
+ {
+ mprf(MSGCH_WARN, "%s this item would be fatal, so you refuse "
+ "to do that.",
+ (item.base_type == OBJ_WEAPONS ? "Unwielding"
+ : "Removing"));
+ }
return (false);
}
}
else // put on
{
- std::string prompt =
- item.base_type == OBJ_WEAPONS ? "Wield" : "Wear";
- prompt += "ing this item could be fatal. ";
- prompt += item.base_type == OBJ_WEAPONS ? "Wield" : "Put on";
- prompt += " anyway?";
-
- if ((-prop_str >= you.strength || -prop_int >= you.intel
- || -prop_dex >= you.dex)
- && (quiet || !yesno(prompt.c_str(), false, 'n')))
+ if (-prop_str >= you.strength || -prop_int >= you.intel
+ || -prop_dex >= you.dex)
{
if (!quiet)
- canned_msg(MSG_OK);
+ {
+ mprf(MSGCH_WARN, "%s this item would be fatal, so you refuse "
+ "to do that.",
+ (item.base_type == OBJ_WEAPONS ? "Wielding"
+ : "Wearing"));
+ }
return (false);
}
}