diff options
-rw-r--r-- | crawl-ref/source/item_use.cc | 7 | ||||
-rw-r--r-- | crawl-ref/source/libgui.cc | 12 |
2 files changed, 16 insertions, 3 deletions
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc index 4e28412557..e5b12df2ef 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -4503,6 +4503,13 @@ void tile_use_item(int idx, InvAction act) return; case OBJ_BOOKS: + if (you.inv[idx].sub_type == BOOK_MANUAL + || you.inv[idx].sub_type == BOOK_DESTRUCTION) + { + handle_read_book(idx); + return; + } + // else it's a spellbook learn_spell(idx); return; diff --git a/crawl-ref/source/libgui.cc b/crawl-ref/source/libgui.cc index 3c98350c39..68b49f4609 100644 --- a/crawl-ref/source/libgui.cc +++ b/crawl-ref/source/libgui.cc @@ -1249,12 +1249,18 @@ static int handle_mouse_motion(int mouse_x, int mouse_y, bool init) case OBJ_WANDS: desc += "*(z)ap"; break; + case OBJ_BOOKS: + if (item_type_known(you.inv[ix]) + && you.inv[ix].sub_type != BOOK_MANUAL + && you.inv[ix].sub_type != BOOK_DESTRUCTION) + { + desc += "*(M)emorize"; + break; + } + // else fall-through case OBJ_SCROLLS: desc += "*(r)ead"; break; - case OBJ_BOOKS: - desc += "*(M)emorize"; - break; case OBJ_JEWELLERY: desc += "*(P)ut on"; break; |