2021-07-03 03:10:03 +00:00
|
|
|
-- ███ ███ ███████ ██ ███████ ███████
|
|
|
|
-- ████ ████ ██ ██ ███ ██
|
|
|
|
-- ██ ████ ██ ███████ ██ ███ █████
|
|
|
|
-- ██ ██ ██ ██ ██ ███ ██
|
|
|
|
-- ██ ██ ███████ ██ ███████ ███████
|
|
|
|
local wea = worldeditadditions
|
2022-05-19 21:10:09 +00:00
|
|
|
worldeditadditions_core.register_command("msize", {
|
2021-07-03 03:10:03 +00:00
|
|
|
params = "",
|
|
|
|
description = "Return the length of each axis of current selection.",
|
|
|
|
privs = { worldedit = true },
|
|
|
|
require_pos = 2,
|
|
|
|
parse = function(params_text)
|
|
|
|
return true
|
|
|
|
end,
|
|
|
|
func = function(name, params_text)
|
|
|
|
local str = "The dimensions of the current selection are "
|
|
|
|
local vec = vector.subtract(worldedit.pos2[name],worldedit.pos1[name])
|
|
|
|
wea.vector.abs(vec)
|
|
|
|
|
2021-07-13 16:08:56 +00:00
|
|
|
return true, str .. "x: " .. vec.x .. ", y: " .. vec.y .. ", z: " .. vec.z
|
2021-07-03 03:10:03 +00:00
|
|
|
end,
|
|
|
|
})
|