summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/item_use.cc
diff options
context:
space:
mode:
authorJude Brown <bookofjude@users.sourceforge.net>2009-12-26 13:46:39 +1000
committerJude Brown <bookofjude@users.sourceforge.net>2009-12-26 13:46:39 +1000
commit0a55f4c9f2c0a4c004a1bd6d9a2385b61134c233 (patch)
treef156ee573352fcb25976c531bbda4875ff0d420a /crawl-ref/source/item_use.cc
parent9db07b06e8c59d76596875751e239e5fff4ac50e (diff)
downloadcrawl-ref-0a55f4c9f2c0a4c004a1bd6d9a2385b61134c233.tar.gz
crawl-ref-0a55f4c9f2c0a4c004a1bd6d9a2385b61134c233.zip
Auto-ID rods when wielded (cbus).
Diffstat (limited to 'crawl-ref/source/item_use.cc')
-rw-r--r--crawl-ref/source/item_use.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index 691ffb0217..11c92d1fbe 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -517,6 +517,19 @@ void wield_effects(int item_wield_2, bool showMsgs)
// Right now that's always "uncursed". -- bwr
set_ident_flags(item, ISFLAG_KNOW_CURSE);
}
+ // Automatically identify rods; you can do this by wielding and then
+ // evoking them, so do it automatically instead. We don't need to give
+ // a message either, as the game will do that automatically. {due}
+ if (item_is_rod(item))
+ {
+ if (!item_type_known(item))
+ {
+ set_ident_type( OBJ_STAVES, item.sub_type, ID_KNOWN_TYPE );
+ set_ident_flags( item, ISFLAG_KNOW_TYPE );
+ }
+ if (!item_ident( item, ISFLAG_KNOW_PLUSES))
+ set_ident_flags( item, ISFLAG_KNOW_PLUSES );
+ }
break;
}