diff options
author | sfan5 <sfan5@live.de> | 2013-01-12 08:10:19 +0100 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2013-01-12 08:10:19 +0100 |
commit | 5f1fb56b8b02ec17f76f86b6e770ea8ad87fc68e (patch) | |
tree | efcedb3ceec9fd939f29758d7d17e5a6913bd352 /worldedit/manipulations.lua | |
parent | 89e18d61080d1ccc4990c82570b1f0672daa8509 (diff) |
Rename //dig to //fixlight
Diffstat (limited to 'worldedit/manipulations.lua')
-rw-r--r-- | worldedit/manipulations.lua | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/worldedit/manipulations.lua b/worldedit/manipulations.lua index 903a3b7..8f3c584 100644 --- a/worldedit/manipulations.lua +++ b/worldedit/manipulations.lua @@ -304,10 +304,11 @@ worldedit.rotate = function(pos1, pos2, axis, angle) return count, pos1, pos2
end
---digs a region defined by positions `pos1` and `pos2`, returning the number of nodes dug
-worldedit.dig = function(pos1, pos2)
+--Fixes the Lightning in a region defined by positions `pos1` and `pos2`, returning the number of nodes dug
+worldedit.fixlight = function(pos1, pos2)
local pos1, pos2 = worldedit.sort_pos(pos1, pos2)
local env = minetest.env
+ local d = 0
local pos = {x=pos1.x, y=0, z=0}
while pos.x <= pos2.x do
@@ -318,11 +319,12 @@ worldedit.dig = function(pos1, pos2) local node = env:get_node(pos)
if node.name == "air":
env:dig_node(pos)
+ d = d + 1
pos.z = pos.z + 1
end
pos.y = pos.y + 1
end
pos.x = pos.x + 1
end
- return worldedit.volume(pos1, pos2)
+ return d
end |