diff options
author | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-12-24 01:24:15 +0000 |
---|---|---|
committer | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-12-24 01:24:15 +0000 |
commit | 905e3a284a0aa9a06bc540fc557b423f1e850041 (patch) | |
tree | 8258f7cd72c1bdf0a0bdfccac6a357845e41ce8d | |
parent | cd0672dfe7259e91c502f61433e0382182de1650 (diff) | |
download | crawl-ref-905e3a284a0aa9a06bc540fc557b423f1e850041.tar.gz crawl-ref-905e3a284a0aa9a06bc540fc557b423f1e850041.zip |
Prevent spurious ID notes when wizard creating items (&%).
Get &Z (cast spell by name) to work with command history (re-do/repeat
command).
Fix message-type notes doubling the message with a "Found" stuck between the
copies.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7930 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r-- | crawl-ref/source/debug.cc | 8 | ||||
-rw-r--r-- | crawl-ref/source/notes.cc | 1 |
2 files changed, 5 insertions, 4 deletions
diff --git a/crawl-ref/source/debug.cc b/crawl-ref/source/debug.cc index 01921c28a8..954bbee9fe 100644 --- a/crawl-ref/source/debug.cc +++ b/crawl-ref/source/debug.cc @@ -412,9 +412,8 @@ void wizard_cast_spec_spell_name(void) char specs[80]; mpr( "Cast which spell by name? ", MSGCH_PROMPT ); - get_input_line( specs, sizeof( specs ) ); - - if (specs[0] == '\0') + if (cancelable_get_line_autohist( specs, sizeof( specs ) ) + || specs[0] == '\0') { canned_msg( MSG_OK ); crawl_state.cancel_cmd_repeat(); @@ -1348,7 +1347,8 @@ bool get_item_by_name(item_def *item, char* specs, item->special = 0; item->flags = 0; item->quantity = 1; - set_ident_flags( *item, ISFLAG_IDENT_MASK ); + // Don't use set_ident_flags(), to avoid getting a spurious ID note. + item->flags |= ISFLAG_IDENT_MASK; if (class_wanted == OBJ_MISCELLANY) { diff --git a/crawl-ref/source/notes.cc b/crawl-ref/source/notes.cc index 5a7f6bf743..d4f8c82912 100644 --- a/crawl-ref/source/notes.cc +++ b/crawl-ref/source/notes.cc @@ -368,6 +368,7 @@ std::string Note::describe( bool when, bool where, bool what ) const break; case NOTE_MESSAGE: result << name; + break; case NOTE_SEEN_FEAT: result << "Found " << name; break; |