diff options
Diffstat (limited to 'crawl-ref/source')
-rw-r--r-- | crawl-ref/source/describe.cc | 24 | ||||
-rw-r--r-- | crawl-ref/source/describe.h | 2 | ||||
-rw-r--r-- | crawl-ref/source/invent.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/item_use.cc | 2 |
4 files changed, 17 insertions, 13 deletions
diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc index d1d2401f9d..9adc69245b 100644 --- a/crawl-ref/source/describe.cc +++ b/crawl-ref/source/describe.cc @@ -3369,7 +3369,7 @@ static bool describe_spells(const item_def &item) // Describes all items in the game. // //--------------------------------------------------------------- -void describe_item( item_def &item ) +void describe_item( item_def &item, bool allow_inscribe ) { for (;;) { @@ -3391,19 +3391,23 @@ void describe_item( item_def &item ) gotoxy(1, wherey() + 2); tutorial_describe_item(item); } - - gotoxy(1, wherey() + 2); - formatted_string::parse_string("<cyan>Do you wish to inscribe this item? ").display(); - - if (toupper(getch()) == 'Y') + if (allow_inscribe) { - char buf[79]; - cprintf("\nInscribe with what? "); - if (!cancelable_get_line(buf, sizeof buf)) + gotoxy(1, wherey() + 2); + formatted_string::parse_string("<cyan>Do you wish to inscribe this item? ").display(); + + if (toupper(getch()) == 'Y') { - item.inscription = std::string(buf); + char buf[79]; + cprintf("\nInscribe with what? "); + if (!cancelable_get_line(buf, sizeof buf)) + { + item.inscription = std::string(buf); + } } } + else if (getch() == 0) + getch(); } diff --git a/crawl-ref/source/describe.h b/crawl-ref/source/describe.h index d2dcf9edb3..aaa6044e33 100644 --- a/crawl-ref/source/describe.h +++ b/crawl-ref/source/describe.h @@ -43,7 +43,7 @@ void describe_feature_wide(int x, int y); /* *********************************************************************** * called from: item_use - shopping * *********************************************************************** */ -void describe_item( item_def &item ); +void describe_item( item_def &item, bool allow_inscribe = false ); /* *********************************************************************** * called from: direct diff --git a/crawl-ref/source/invent.cc b/crawl-ref/source/invent.cc index 082b9bb6d1..c3e8603b76 100644 --- a/crawl-ref/source/invent.cc +++ b/crawl-ref/source/invent.cc @@ -536,7 +536,7 @@ unsigned char get_invent( int invent_type ) { const int invidx = letter_to_index(select); if ( is_valid_item(you.inv[invidx]) ) - describe_item( you.inv[invidx] ); + describe_item( you.inv[invidx], true ); } redraw_screen(); return select; diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc index 5d7a49a509..eeab91d2cc 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -3788,7 +3788,7 @@ void examine_object(void) return; } - describe_item( you.inv[item_slot] ); + describe_item( you.inv[item_slot], true ); redraw_screen(); mesclr(true); } // end original_name() |