1
0
mirror of https://github.com/Uberi/Minetest-WorldEdit.git synced 2025-06-28 14:16:18 +02:00

More speedups for //hollowsphere, //sphere, //hollowdome, //dome, //cylinder, better module loader, fix message in //volume.

This commit is contained in:
Anthony Zhang
2013-07-27 21:34:42 -04:00
parent 8b9054a1cc
commit faa4a7b065
3 changed files with 130 additions and 108 deletions

View File

@ -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,
})