summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/dat/clua/lm_pdesc.lua
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/dat/clua/lm_pdesc.lua')
-rw-r--r--crawl-ref/source/dat/clua/lm_pdesc.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/crawl-ref/source/dat/clua/lm_pdesc.lua b/crawl-ref/source/dat/clua/lm_pdesc.lua
index a704004872..5b02247fa2 100644
--- a/crawl-ref/source/dat/clua/lm_pdesc.lua
+++ b/crawl-ref/source/dat/clua/lm_pdesc.lua
@@ -14,10 +14,12 @@ function PortalDescriptor:new(properties)
end
function PortalDescriptor:write(marker, th)
+ file.marshall(th, self.desc or '')
lmark.marshall_table(th, self.props)
end
function PortalDescriptor:read(marker, th)
+ self.desc = file.unmarshall_string(th)
self.props = lmark.unmarshall_table(th)
setmetatable(self, PortalDescriptor)
return self
@@ -31,6 +33,6 @@ function PortalDescriptor:property(marker, pname)
return self.props and self.props[pname] or ''
end
-function portal_desc(props)
- return PortalDescriptor:new(props)
+function portal_desc(desc, props)
+ return PortalDescriptor:new(desc, props)
end