diff options
Diffstat (limited to 'worldedit/serialization.lua')
-rw-r--r-- | worldedit/serialization.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/worldedit/serialization.lua b/worldedit/serialization.lua index 985e3d7..d5b660b 100644 --- a/worldedit/serialization.lua +++ b/worldedit/serialization.lua @@ -160,10 +160,10 @@ end --loads the nodes represented by string `value` at position `originpos`, returning the number of nodes deserialized
--contains code based on [table.save/table.load](http://lua-users.org/wiki/SaveTableToFile) by ChillCode, available under the MIT license (GPL compatible)
-worldedit.deserialize = function(originpos, value)
+worldedit.deserialize = function(originpos, value, env)
local originx, originy, originz = originpos.x, originpos.y, originpos.z
local count = 0
- local env = minetest.env
+ if env == nil then env = minetest.env end
local version = worldedit.valueversion(value)
if version == 1 or version == 2 then --original flat table format
--obtain the node table
@@ -239,4 +239,4 @@ worldedit.deserialize = function(originpos, value) end
end
return count
-end
\ No newline at end of file +end
|