summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/dat/clua/lm_pdesc.lua
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2008-12-01 14:03:23 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2008-12-01 14:03:23 +0000
commite5fc908cc50565402f1ea1acc037e5b8791870c1 (patch)
tree37f4d7e47addb7e81d0e375bb030456e189fb5c8 /crawl-ref/source/dat/clua/lm_pdesc.lua
parent6384f9c708cf79f471df00d1e0cfa3f2c1bf4172 (diff)
downloadcrawl-ref-e5fc908cc50565402f1ea1acc037e5b8791870c1.tar.gz
crawl-ref-e5fc908cc50565402f1ea1acc037e5b8791870c1.zip
Fix .des timer messaging to be easier to customise, applied timer to sewer portals.
Fix typo in monspeak.txt (slinkies). Fixed hippogriff plural. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7709 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/dat/clua/lm_pdesc.lua')
-rw-r--r--crawl-ref/source/dat/clua/lm_pdesc.lua12
1 files changed, 10 insertions, 2 deletions
diff --git a/crawl-ref/source/dat/clua/lm_pdesc.lua b/crawl-ref/source/dat/clua/lm_pdesc.lua
index f2e5cff9b2..32ae8e49a8 100644
--- a/crawl-ref/source/dat/clua/lm_pdesc.lua
+++ b/crawl-ref/source/dat/clua/lm_pdesc.lua
@@ -24,12 +24,20 @@ function PortalDescriptor:read(marker, th)
return self
end
+function PortalDescriptor:unmangle(x)
+ if x and type(x) == 'function' then
+ return x(self)
+ else
+ return x
+ end
+end
+
function PortalDescriptor:feature_description(marker)
- return self.props.desc
+ return self:unmangle(self.props.desc)
end
function PortalDescriptor:property(marker, pname)
- return self.props and self.props[pname] or ''
+ return self:unmangle(self.props and self.props[pname] or '')
end
function portal_desc(props)