Fix safe_region

This commit is contained in:
Starbeamrainbowlabs 2020-05-10 21:08:22 +01:00
parent 8e515c3778
commit 58faa8349e
Signed by: sbrl
GPG key ID: 1BE5172E637709C2

View file

@ -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