summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authordploog <dploog@c06c8d41-db1a-0410-9941-cceddc491573>2008-02-22 00:01:55 +0000
committerdploog <dploog@c06c8d41-db1a-0410-9941-cceddc491573>2008-02-22 00:01:55 +0000
commitff747f947f3a34e9e53d76f1c915cd9b3ffd3974 (patch)
tree9e1963a1a56f05c04af3742d6a9febb3dbe5166d /crawl-ref/source
parent030b8795d35eeed78f79c6bcafb873ee25f3ea48 (diff)
downloadcrawl-ref-ff747f947f3a34e9e53d76f1c915cd9b3ffd3974.tar.gz
crawl-ref-ff747f947f3a34e9e53d76f1c915cd9b3ffd3974.zip
Make stash annotations default (doy).
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3455 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-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