diff options
author | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-04 04:27:08 +0000 |
---|---|---|
committer | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-04 04:27:08 +0000 |
commit | 396c208cb4e1213a8a7ae02ff30778acfeb4fd1d (patch) | |
tree | d03be422618aec7922d585d356c1c8aecba2d5ce /crawl-ref/source/dat/lua/stash.lua | |
parent | 0b13d82fe7cd0110aa6383914f2da5a3dc3921a7 (diff) | |
download | crawl-ref-396c208cb4e1213a8a7ae02ff30778acfeb4fd1d.tar.gz crawl-ref-396c208cb4e1213a8a7ae02ff30778acfeb4fd1d.zip |
For stash searching, annotate dropped items with {dropped} if
annotate_item_dropped is set to true.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5466 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/dat/lua/stash.lua')
-rw-r--r-- | crawl-ref/source/dat/lua/stash.lua | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/crawl-ref/source/dat/lua/stash.lua b/crawl-ref/source/dat/lua/stash.lua index 3274b41c5b..736b5cbcbc 100644 --- a/crawl-ref/source/dat/lua/stash.lua +++ b/crawl-ref/source/dat/lua/stash.lua @@ -22,10 +22,20 @@ -- {artefact} the Staff of Wucad Mu --------------------------------------------------------------------------- -local ch_annotate_item_class = nil +local ch_annotate_item_class = nil +local ch_annotate_item_dropped = nil + -- Annotate items for searches function ch_stash_search_annotate_item(it) local annot = "" + + if ch_annotate_item_dropped == nil then + ch_annotate_item_dropped = opt_boolean("annotate_item_dropped", false) + end + + if ch_annotate_item_dropped and item.dropped(it) then + annot = annot .. "{dropped} " + end if item.artefact(it) then annot = annot .. "{artefact} " |