From faa4a7b065bc3454bbdb5ea8af99b7c4c638b68e Mon Sep 17 00:00:00 2001 From: Anthony Zhang Date: Sat, 27 Jul 2013 21:34:42 -0400 Subject: More speedups for //hollowsphere, //sphere, //hollowdome, //dome, //cylinder, better module loader, fix message in //volume. --- worldedit_commands/init.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'worldedit_commands/init.lua') diff --git a/worldedit_commands/init.lua b/worldedit_commands/init.lua index 3ef247d..4e23122 100644 --- a/worldedit_commands/init.lua +++ b/worldedit_commands/init.lua @@ -210,7 +210,11 @@ minetest.register_chatcommand("/volume", { end local volume = worldedit.volume(pos1, pos2) - worldedit.player_notify(name, "current region has a volume of " .. volume .. " nodes (" .. pos2.x - pos1.x .. "*" .. pos2.y - pos1.y .. "*" .. pos2.z - pos1.z .. ")") + local abs = math.abs + worldedit.player_notify(name, "current region has a volume of " .. volume .. " nodes (" + .. abs(pos2.x - pos1.x) .. "*" + .. abs(pos2.y - pos1.y) .. "*" + .. abs(pos2.z - pos1.z) .. ")") end, }) -- cgit v1.2.3