summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/dat/clua/lm_pdesc.lua
diff options
context:
space:
mode:
authorMatthew Cline <zelgadis@sourceforge.net>2009-10-25 00:23:09 -0700
committerMatthew Cline <zelgadis@sourceforge.net>2009-10-25 00:23:09 -0700
commita0ae32c8f8a04398b4b99880069eb31a26b43eff (patch)
treee619d8de305de18bb7c9fc1ead65ee33a1377f33 /crawl-ref/source/dat/clua/lm_pdesc.lua
parent83d7fbfa11973abf823ed07f4c7b39956fc6aa4a (diff)
downloadcrawl-ref-a0ae32c8f8a04398b4b99880069eb31a26b43eff.tar.gz
crawl-ref-a0ae32c8f8a04398b4b99880069eb31a26b43eff.zip
Let markers change the description of any feature
Allow markers to change the short and/or long description of any feature, not just portal vault entrances. The feature_description() and feature_description_long() functions have been removed from the mapmark classes and turned into ordinary properties. Also added the marker property "door_description_suffix", which can be used to alter the short description of (known) doors by appending a string to them.
Diffstat (limited to 'crawl-ref/source/dat/clua/lm_pdesc.lua')
-rw-r--r--crawl-ref/source/dat/clua/lm_pdesc.lua14
1 files changed, 6 insertions, 8 deletions
diff --git a/crawl-ref/source/dat/clua/lm_pdesc.lua b/crawl-ref/source/dat/clua/lm_pdesc.lua
index 49b6273680..e96c852336 100644
--- a/crawl-ref/source/dat/clua/lm_pdesc.lua
+++ b/crawl-ref/source/dat/clua/lm_pdesc.lua
@@ -32,15 +32,13 @@ function PortalDescriptor:unmangle(x)
end
end
-function PortalDescriptor:feature_description(marker)
- return self:unmangle(self.props.desc)
-end
-
-function PortalDescriptor:feature_description_long(marker)
- return self:unmangle(self.props.desc_long)
-end
-
function PortalDescriptor:property(marker, pname)
+ if pname == 'feature_description' then
+ return self:unmangle(self.props.desc)
+ elseif pname == 'feature_description_long' then
+ return self:unmangle(self.props.desc_long)
+ end
+
return self:unmangle(self.props and self.props[pname] or '')
end