From e5425f03baf5050c807791da4befa60de0cd6263 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Fri, 18 Apr 2008 16:25:07 +0000 Subject: [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 --- crawl-ref/source/item_use.cc | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) (limited to 'crawl-ref/source/item_use.cc') 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); } } -- cgit v1.2.3-54-g00ecf