aboutsummaryrefslogtreecommitdiff
path: root/io
diff options
context:
space:
mode:
authorDeterminant <[email protected]>2015-06-02 20:28:16 +0800
committerDeterminant <[email protected]>2015-06-02 20:28:16 +0800
commit74d9e9e7371c80394698fb9805cbf0cbde67a8f3 (patch)
tree36b070f1fcfa2be8fc80c50b7a221862a0dfd14a /io
parent60083f2e51935ce55cec7a4c39d1724a16d9c769 (diff)
add ParamRepo, LayerRepo, DAGLayer
Diffstat (limited to 'io')
-rw-r--r--io/init.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/io/init.lua b/io/init.lua
index 7c312f4..4a663a7 100644
--- a/io/init.lua
+++ b/io/init.lua
@@ -22,7 +22,7 @@ function nerv.ChunkFile:read_chunk(id, global_conf)
if metadata == nil then
nerv.error("chunk with id %s does not exist", id)
end
- local chunk_type = assert(loadstring("return " .. metadata.type))()
+ local chunk_type = nerv.get_type(metadata.type)
local chunk = chunk_type(id, global_conf)
chunk:set_info(metadata.info)
chunk:read(self:get_chunkdata(id))