mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-11-27 17:43:53 +01:00
Fix safe_region
This commit is contained in:
parent
8e515c3778
commit
58faa8349e
@ -55,12 +55,12 @@ worldedit.register_command("maze", {
|
|||||||
return success, replace_node, seed, path_length, path_width
|
return success, replace_node, seed, path_length, path_width
|
||||||
end,
|
end,
|
||||||
nodes_needed = function(name)
|
nodes_needed = function(name)
|
||||||
worldedit.player_notify(name, "Called nodes_needed")
|
|
||||||
local pos1 = worldedit.pos1[name]
|
local pos1 = worldedit.pos1[name]
|
||||||
local pos2 = worldedit.pos2[name]
|
local pos2 = worldedit.pos2[name]
|
||||||
pos1, pos2 = worldedit.sort_pos(pos1, pos2)
|
pos1, pos2 = worldedit.sort_pos(pos1, pos2)
|
||||||
|
|
||||||
return (pos2.x - pos1.x) * (pos2.y - pos1.y) * (pos1.z - pos2.z)
|
worldedit.player_notify(name, "nodes: "..(pos2.x - pos1.x)..", "..(pos2.y - pos1.y)..", "..(pos2.z - pos1.z))
|
||||||
|
return (pos2.x - pos1.x) * (pos2.y - pos1.y) * (pos2.z - pos1.z)
|
||||||
end,
|
end,
|
||||||
func = function(name, replace_node, seed, path_length, path_width)
|
func = function(name, replace_node, seed, path_length, path_width)
|
||||||
if not replace_node then
|
if not replace_node then
|
||||||
|
Loading…
Reference in New Issue
Block a user