summaryrefslogtreecommitdiff
path: root/worldedit_commands
diff options
context:
space:
mode:
authorAnthony Zhang <azhang9@gmail.com>2013-07-27 21:34:42 -0400
committerAnthony Zhang <azhang9@gmail.com>2013-07-27 21:34:42 -0400
commitfaa4a7b065bc3454bbdb5ea8af99b7c4c638b68e (patch)
tree328db122ff647d59a64741c41fff9b51bd86681a /worldedit_commands
parent8b9054a1cc0912385d95848dd0318e23f123c5f7 (diff)
More speedups for //hollowsphere, //sphere, //hollowdome, //dome, //cylinder, better module loader, fix message in //volume.
Diffstat (limited to 'worldedit_commands')
-rw-r--r--worldedit_commands/init.lua6
1 files changed, 5 insertions, 1 deletions
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,
})