From 1395f15a3e6ee7e9b934da41b694c9beef71abda Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Wed, 6 Aug 2008 14:23:46 +0000 Subject: * Note items bought in shops along with their price * Note donations made to Zin * Add option autoinscribe_randarts that, if true, autoinscribes artefacts of its own whenever some new properties become known, be it by using it or identifying. Also applies to shops. This is still unfinished and buggy. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6785 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/randart.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'crawl-ref/source/randart.cc') diff --git a/crawl-ref/source/randart.cc b/crawl-ref/source/randart.cc index 65c2c512be..7c6d1ee8c0 100644 --- a/crawl-ref/source/randart.cc +++ b/crawl-ref/source/randart.cc @@ -25,6 +25,7 @@ #include "externs.h" #include "database.h" +#include "describe.h" #include "itemname.h" #include "itemprop.h" #include "items.h" @@ -371,7 +372,7 @@ void randart_desc_properties( const item_def &item, if (!force_fake_props && item_ident( item, ISFLAG_KNOW_PROPERTIES )) return; - // only jewellery need fake randart properties + // Only jewellery need fake randart properties. if (item.base_type != OBJ_JEWELLERY) return; @@ -1138,7 +1139,7 @@ void randart_wpn_properties( const item_def &item, ASSERT( known_vec.size() == RA_PROPERTIES); ASSERT( known_vec.get_max_size() == RA_PROPERTIES); - if ( item_ident( item, ISFLAG_KNOW_PROPERTIES ) ) + if (item_ident( item, ISFLAG_KNOW_PROPERTIES )) { for (vec_size i = 0; i < RA_PROPERTIES; i++) known[i] = (bool) true; @@ -1244,10 +1245,12 @@ void randart_wpn_learn_prop( item_def &item, randart_prop_type prop ) ASSERT( known_vec.size() == RA_PROPERTIES); ASSERT( known_vec.get_max_size() == RA_PROPERTIES); - if ( item_ident( item, ISFLAG_KNOW_PROPERTIES ) ) + if (item_ident( item, ISFLAG_KNOW_PROPERTIES )) return; known_vec[prop] = (bool) true; + if (Options.autoinscribe_randarts) + add_autoinscription( item, randart_auto_inscription(item)); } bool randart_wpn_known_prop( const item_def &item, randart_prop_type prop ) -- cgit v1.2.3-54-g00ecf