From 3c51ec8c4a347a6714472c423215243fc538f5f5 Mon Sep 17 00:00:00 2001 From: Anthony Zhang Date: Wed, 31 Jul 2013 00:02:37 -0400 Subject: //pyramid works along any axis and backwards. Working //clearobjects and //cylinder command, begin implementing super marker. Remove EnvRef usages and the block queue (the block queue does not work with VoxelManips). More block emergers. --- worldedit/serialization.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'worldedit/serialization.lua') diff --git a/worldedit/serialization.lua b/worldedit/serialization.lua index 5fbc16c..7b65b25 100644 --- a/worldedit/serialization.lua +++ b/worldedit/serialization.lua @@ -182,7 +182,12 @@ 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) --wip: use voxelmanip to make sure the blocks are loaded +worldedit.deserialize = function(originpos, value) + --make sure the area stays loaded --wip: not very performant + local pos1, pos2 = worldedit.allocate(originpos, value) + local manip = minetest.get_voxel_manip() + manip:read_from_map(pos1, pos2) + local originx, originy, originz = originpos.x, originpos.y, originpos.z local count = 0 local add_node, get_meta = minetest.add_node, minetest.get_meta -- cgit v1.2.3