diff options
author | nlanza <nlanza@c06c8d41-db1a-0410-9941-cceddc491573> | 2006-08-13 02:19:00 +0000 |
---|---|---|
committer | nlanza <nlanza@c06c8d41-db1a-0410-9941-cceddc491573> | 2006-08-13 02:19:00 +0000 |
commit | aa88fdd8c6ad2da5eb5bd933e2d53d56cd8c176f (patch) | |
tree | d0551b96eaebb5b55694579fb8dae4abc7a38407 /crawl-ref/source/lua/stash.lua | |
parent | 2b32f164e6ca1c4b3d587789f6cf46f46fe02fe8 (diff) | |
download | crawl-ref-aa88fdd8c6ad2da5eb5bd933e2d53d56cd8c176f.tar.gz crawl-ref-aa88fdd8c6ad2da5eb5bd933e2d53d56cd8c176f.zip |
Clean up a mistake in the SVN import.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/lua/stash.lua')
-rw-r--r-- | crawl-ref/source/lua/stash.lua | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/crawl-ref/source/lua/stash.lua b/crawl-ref/source/lua/stash.lua new file mode 100644 index 0000000000..461a504cf3 --- /dev/null +++ b/crawl-ref/source/lua/stash.lua @@ -0,0 +1,32 @@ +--------------------------------------------------------------------------- +-- stash.lua +-- Annotates items for the stash-tracker. +-- +-- To use this, add this line to your init.txt: +-- lua_file = lua/stash.lua +-- +--------------------------------------------------------------------------- + +-- Annotate items for searches +function ch_stash_search_annotate_item(it) + local annot = "" + + if item.artifact(it) then + annot = annot .. "{art} " + elseif item.branded(it) then + annot = annot .. "{ego} " + elseif item.class(it, true) == "book" then + annot = annot .. "{book} " + end + + local skill = item.weap_skill(it) + if skill then + annot = annot .. "{" .. skill .. "} " + end + + return annot +end + +--- If you want dumps (.lst files) to be annotated, uncomment this line: +-- ch_stash_dump_annotate_item = ch_stash_search_annotate_item + |