diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2006-11-13 07:56:10 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2006-11-13 07:56:10 +0000 |
commit | e14f7dc24865c935703bdbcc114ceba07097e77d (patch) | |
tree | bd3b9e3e3c6b44d3c995a85083d406c1726fbe12 | |
parent | ea0738156ef375445f43821ebe26a74fe4280dab (diff) | |
download | crawl-ref-e14f7dc24865c935703bdbcc114ceba07097e77d.tar.gz crawl-ref-e14f7dc24865c935703bdbcc114ceba07097e77d.zip |
Changes to the interface when wearing rings:
* When prompting to remove an existing ring, use the item's inventory slot
instead of L and R (for left and right), since L and R cause confusion.
* If one of the two worn rings is cursed, show the which-ring-to-remove
query anyway for keystroke consistency.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup@382 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r-- | crawl-ref/source/item_use.cc | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc index fd03ce64f3..8c5e5fdd04 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -2073,29 +2073,30 @@ static int prompt_ring_to_remove(int new_ring) mprf("You're already wearing two cursed rings!"); return (-1); } - else if (item_cursed(left)) - return you.equip[EQ_RIGHT_RING]; - else if (item_cursed(right)) - return you.equip[EQ_LEFT_RING]; mesclr(); mprf("Wearing %s.", in_name(new_ring, DESC_NOCAP_A)); + + char lslot = index_to_letter(left.link), + rslot = index_to_letter(right.link); + mprf(MSGCH_PROMPT, - "You're wearing two rings. Remove which one? (L/R/Esc)"); - mprf(" L - %s", item_name( left, DESC_NOCAP_A )); - mprf(" R - %s", item_name( right, DESC_NOCAP_A )); + "You're wearing two rings. Remove which one? (%c/%c/Esc)", + lslot, rslot); + mprf(" %s", item_name( left, DESC_INVENTORY )); + mprf(" %s", item_name( right, DESC_INVENTORY )); int c; do - c = tolower(getch()); - while (c != 'l' && c != 'r' && c != ESCAPE && c != ' '); + c = getch(); + while (c != lslot && c != rslot && c != ESCAPE && c != ' '); mesclr(); if (c == ESCAPE || c == ' ') return (-1); - int eqslot = c == 'l'? EQ_LEFT_RING : EQ_RIGHT_RING; + int eqslot = c == lslot? EQ_LEFT_RING : EQ_RIGHT_RING; return (you.equip[eqslot]); } |