diff options
author | Sfan5 <sfan5@live.de> | 2013-04-28 19:08:09 +0200 |
---|---|---|
committer | Sfan5 <sfan5@live.de> | 2013-04-28 19:08:09 +0200 |
commit | 5e5c1dc6c3a4aa26f094bbb998829d663dcda777 (patch) | |
tree | 1cccee98fd369b2af5d1cdee92435e427f498ca5 /worldedit/visualization.lua | |
parent | 71b6004b928766abc3638aaca3526b80af642140 (diff) |
Add Block Queue
Diffstat (limited to 'worldedit/visualization.lua')
-rw-r--r-- | worldedit/visualization.lua | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/worldedit/visualization.lua b/worldedit/visualization.lua index 3c1a2db..9e99659 100644 --- a/worldedit/visualization.lua +++ b/worldedit/visualization.lua @@ -31,9 +31,9 @@ minetest.register_node("worldedit:placeholder", { })
--hides all nodes in a region defined by positions `pos1` and `pos2` by non-destructively replacing them with invisible nodes, returning the number of nodes hidden
-worldedit.hide = function(pos1, pos2)
+worldedit.hide = function(pos1, pos2, tenv)
local pos1, pos2 = worldedit.sort_pos(pos1, pos2)
- local env = minetest.env
+ if env == nil then env = minetest.env end
local pos = {x=pos1.x, y=0, z=0}
local placeholder = {name="worldedit:placeholder", param1=0, param2=0}
@@ -59,9 +59,9 @@ worldedit.hide = function(pos1, pos2) end
--suppresses all instances of `nodename` in a region defined by positions `pos1` and `pos2` by non-destructively replacing them with invisible nodes, returning the number of nodes suppressed
-worldedit.suppress = function(pos1, pos2, nodename)
+worldedit.suppress = function(pos1, pos2, nodename, tenv)
local pos1, pos2 = worldedit.sort_pos(pos1, pos2)
- local env = minetest.env
+ if env == nil then env = minetest.env end
if minetest.registered_nodes[nodename] == nil then
nodename = "default:" .. nodename
@@ -95,9 +95,9 @@ worldedit.suppress = function(pos1, pos2, nodename) end
--highlights all instances of `nodename` in a region defined by positions `pos1` and `pos2` by non-destructively hiding all other nodes, returning the number of nodes found
-worldedit.highlight = function(pos1, pos2, nodename)
+worldedit.highlight = function(pos1, pos2, nodename, tenv)
local pos1, pos2 = worldedit.sort_pos(pos1, pos2)
- local env = minetest.env
+ if env == nil then env = minetest.env end
if minetest.registered_nodes[nodename] == nil then
nodename = "default:" .. nodename
@@ -132,9 +132,9 @@ worldedit.highlight = function(pos1, pos2, nodename) end
--restores all nodes hidden with WorldEdit functions in a region defined by positions `pos1` and `pos2`, returning the number of nodes restored
-worldedit.restore = function(pos1, pos2)
+worldedit.restore = function(pos1, pos2, tenv)
local pos1, pos2 = worldedit.sort_pos(pos1, pos2)
- local env = minetest.env
+ if env == nil then env = minetest.env end
local pos = {x=pos1.x, y=0, z=0}
local node = {name="", param1=0, param2=0}
@@ -161,4 +161,4 @@ worldedit.restore = function(pos1, pos2) pos.x = pos.x + 1
end
return count
-end
\ No newline at end of file +end
|