summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/dat/clua/userbase.lua11
-rw-r--r--crawl-ref/source/lua/stash.lua14
2 files changed, 14 insertions, 11 deletions
diff --git a/crawl-ref/source/dat/clua/userbase.lua b/crawl-ref/source/dat/clua/userbase.lua
index 15f56bfeb5..4131292bab 100644
--- a/crawl-ref/source/dat/clua/userbase.lua
+++ b/crawl-ref/source/dat/clua/userbase.lua
@@ -67,7 +67,12 @@ function c_interrupt_activity(aname, iname, cause, extra)
return chk_interrupt_activity[aname](iname, cause, extra)
end
-function opt_boolean(optname)
- local optval = options[optname]
- return optval == "true" or optval == "yes"
+function opt_boolean(optname, default)
+ default = default or false
+ local optval = options[optname]
+ if optval == nil then
+ return default
+ else
+ return optval == "true" or optval == "yes"
+ end
end \ No newline at end of file
diff --git a/crawl-ref/source/lua/stash.lua b/crawl-ref/source/lua/stash.lua
index 5b26e16d97..3274b41c5b 100644
--- a/crawl-ref/source/lua/stash.lua
+++ b/crawl-ref/source/lua/stash.lua
@@ -10,16 +10,14 @@
-- {artefact} for identified artefacs.
-- {ego} for identified branded items.
-- { <skill> } - the relevant weapon skill for weapons.
+-- { <class> } - item class: gold, weapon, missile, armour, wand, carrion,
+-- food, scroll, jewellery, potion, book, staff, orb, misc
--
--- You can optionally annotate items with the item class name (such as
--- "weapon" for weapons) by setting
--- annotate_item_class = true
+-- You can optionally disable annotate items with the item class name
+-- (such as "weapon" for weapons) by setting
+-- annotate_item_class = false
-- in your init.txt.
--
--- The full list of item class names is:
--- gold, weapon, missile, armour, wand, food, scroll, jewellery, potion,
--- book, staff, orb, misc, carrion
---
-- Item annotations are always prefixed to the item name. For instance:
-- {artefact} the Staff of Wucad Mu
---------------------------------------------------------------------------
@@ -41,7 +39,7 @@ function ch_stash_search_annotate_item(it)
end
if ch_annotate_item_class == nil then
- ch_annotate_item_class = opt_boolean("annotate_item_class")
+ ch_annotate_item_class = opt_boolean("annotate_item_class", true)
end
if ch_annotate_item_class then