From 8f574480e681337439068d056108596ef7ce7f67 Mon Sep 17 00:00:00 2001 From: Johanna Ploog Date: Tue, 12 Jan 2010 21:51:42 +0100 Subject: Without Spellcasting skill, make L-click on book call read_book instead. --- crawl-ref/source/item_use.cc | 3 ++- crawl-ref/source/tilereg.cc | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'crawl-ref') 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) -- cgit v1.2.3-54-g00ecf