diff options
author | Johanna Ploog <j-p-e-g@users.sourceforge.net> | 2010-01-12 21:51:42 +0100 |
---|---|---|
committer | Johanna Ploog <j-p-e-g@users.sourceforge.net> | 2010-01-12 21:51:42 +0100 |
commit | 8f574480e681337439068d056108596ef7ce7f67 (patch) | |
tree | 0299e514f3fd614033d6c9f96deffd19dd2e9939 /crawl-ref | |
parent | 0b63c742e449325509fad22dc792257e18475c52 (diff) | |
download | crawl-ref-8f574480e681337439068d056108596ef7ce7f67.tar.gz crawl-ref-8f574480e681337439068d056108596ef7ce7f67.zip |
Without Spellcasting skill, make L-click on book call read_book instead.
Diffstat (limited to 'crawl-ref')
-rw-r--r-- | crawl-ref/source/item_use.cc | 3 | ||||
-rw-r--r-- | crawl-ref/source/tilereg.cc | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc index bcd3e0f29c..f438fc122a 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -6041,7 +6041,8 @@ void tile_item_use(int idx) case OBJ_BOOKS: if (item.sub_type == BOOK_MANUAL - || item.sub_type == BOOK_DESTRUCTION) + || item.sub_type == BOOK_DESTRUCTION + || you.skills[SK_SPELLCASTING] == 0) { if (check_warning_inscriptions(item, OPER_READ)) handle_read_book(idx); diff --git a/crawl-ref/source/tilereg.cc b/crawl-ref/source/tilereg.cc index 7c5eaaca62..04cbd5c33c 100644 --- a/crawl-ref/source/tilereg.cc +++ b/crawl-ref/source/tilereg.cc @@ -2821,7 +2821,8 @@ bool InventoryRegion::update_tip_text(std::string& tip) case OBJ_BOOKS: if (item_type_known(item) && item.sub_type != BOOK_MANUAL - && item.sub_type != BOOK_DESTRUCTION) + && item.sub_type != BOOK_DESTRUCTION + && you.skills[SK_SPELLCASTING] > 0) { tip += "Memorise (M)"; if (wielded) |