From 74d9e9e7371c80394698fb9805cbf0cbde67a8f3 Mon Sep 17 00:00:00 2001 From: Determinant Date: Tue, 2 Jun 2015 20:28:16 +0800 Subject: add ParamRepo, LayerRepo, DAGLayer --- io/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'io') 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)) -- cgit v1.2.3-70-g09d2