summaryrefslogtreecommitdiff
path: root/worldedit/serialization.lua
diff options
context:
space:
mode:
authorSfan5 <sfan5@live.de>2013-04-28 19:08:09 +0200
committerSfan5 <sfan5@live.de>2013-04-28 19:08:09 +0200
commit5e5c1dc6c3a4aa26f094bbb998829d663dcda777 (patch)
tree1cccee98fd369b2af5d1cdee92435e427f498ca5 /worldedit/serialization.lua
parent71b6004b928766abc3638aaca3526b80af642140 (diff)
Add Block Queue
Diffstat (limited to 'worldedit/serialization.lua')
-rw-r--r--worldedit/serialization.lua6
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