summaryrefslogtreecommitdiff
path: root/worldedit/visualization.lua
diff options
context:
space:
mode:
authorAnthony Zhang <azhang9@gmail.com>2013-07-12 14:22:30 -0400
committerAnthony Zhang <azhang9@gmail.com>2013-07-12 14:22:30 -0400
commitac5e801834245bcf93f720d290a36b09a2527576 (patch)
treea26c7c1d72d95c204ae88aaaa0dfb516da37a020 /worldedit/visualization.lua
parentb6bc841c395dc54603b526a6791b4109fb6b577f (diff)
Even bigger speed gains by using LuaVoxelManipulator in a few choice places! Faster //set, //cylinder, etc., but plenty of room for improvements still.
Diffstat (limited to 'worldedit/visualization.lua')
-rw-r--r--worldedit/visualization.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/worldedit/visualization.lua b/worldedit/visualization.lua
index 3d697a2..c07a139 100644
--- a/worldedit/visualization.lua
+++ b/worldedit/visualization.lua
@@ -1,4 +1,5 @@
worldedit = worldedit or {}
+local minetest = minetest --local copy of global
--modifies positions `pos1` and `pos2` so that each component of `pos1` is less than or equal to its corresponding conent of `pos2`, returning two new positions
worldedit.sort_pos = function(pos1, pos2)
@@ -76,7 +77,7 @@ 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) --wip: speed this up with voxmanip get_data
local pos1, pos2 = worldedit.sort_pos(pos1, pos2)
local pos = {x=pos1.x, y=0, z=0}
local placeholder = {name="worldedit:placeholder", param1=0, param2=0}