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-07-15 22:46:43 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-15 22:46:43 +0000
commite7a22ae2c3721277180443d930d110edb7e180b8 (patch)
tree431769e55e76872ed810fb77b9a68da015a604a3 /crawl-ref/source/item_use.cc
parentdc0f066ad0fa14a48e652914b9a27e626f5eded1 (diff)
downloadcrawl-ref-e7a22ae2c3721277180443d930d110edb7e180b8.tar.gz
crawl-ref-e7a22ae2c3721277180443d930d110edb7e180b8.zip
Apply commit r6569 to 0.4 trunk.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6570 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/item_use.cc')
-rw-r--r--crawl-ref/source/item_use.cc21
1 files changed, 9 insertions, 12 deletions
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index e449ce82cd..3a202aa312 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -798,7 +798,7 @@ bool armour_prompt( const std::string & mesg, int *index, operation_types oper)
}
return (succeeded);
-} // end armour_prompt()
+}
static bool cloak_is_being_removed( void )
{
@@ -3163,8 +3163,8 @@ bool puton_ring(int slot, bool prompt_finger)
else
{
item_slot = prompt_invent_item( "Put on which piece of jewellery?",
- MT_INVLIST, OBJ_JEWELLERY, true, true, true, 0, -1,
- NULL, OPER_PUTON );
+ MT_INVLIST, OBJ_JEWELLERY, true, true,
+ true, 0, -1, NULL, OPER_PUTON );
}
if (prompt_failed(item_slot))
@@ -3309,10 +3309,10 @@ bool remove_ring(int slot, bool announce)
if (hand_used == EQ_NONE)
{
const int equipn =
- (slot == -1)? prompt_invent_item( "Remove which piece of jewellery?",
- MT_INVLIST,
- OBJ_JEWELLERY, true, true, true,
- 0, -1, NULL, OPER_REMOVE)
+ (slot == -1)? prompt_invent_item("Remove which piece of jewellery?",
+ MT_INVLIST,
+ OBJ_JEWELLERY, true, true, true,
+ 0, -1, NULL, OPER_REMOVE)
: slot;
if (prompt_failed(equipn))
@@ -3598,6 +3598,7 @@ void prompt_inscribe_item()
}
item_slot = prompt_invent_item("Inscribe which item? ",
MT_INVLIST, OSEL_ANY );
+
if (prompt_failed(item_slot))
return;
@@ -4110,12 +4111,8 @@ static bool _handle_enchant_armour( int item_slot )
OSEL_ENCH_ARM, true, true, false );
}
- if (item_slot == PROMPT_ABORT || item_slot == PROMPT_NOTHING)
- {
- if (item_slot == PROMPT_ABORT)
- canned_msg( MSG_OK );
+ if (prompt_failed(item_slot))
return (false);
- }
item_def& arm(you.inv[item_slot]);