2022-09-18 21:20:04 +00:00
|
|
|
local wea = worldeditadditions
|
|
|
|
local wea_c = worldeditadditions_core
|
|
|
|
local Vector3 = wea_c.Vector3
|
|
|
|
|
2021-02-24 16:40:53 +00:00
|
|
|
-- ███████ ██████ ███████ ██████ ████████
|
|
|
|
-- ██ ██ ██ ██ ██ ██
|
|
|
|
-- ███████ ██████ █████ ██ ██
|
|
|
|
-- ██ ██ ██ ██ ██ ██
|
|
|
|
-- ███████ ██ ██ ███████ ██████ ██
|
2022-05-19 21:10:09 +00:00
|
|
|
worldeditadditions_core.register_command("srect", {
|
2021-02-24 16:40:53 +00:00
|
|
|
params = "[<axis1> [<axis2>]] <length>",
|
|
|
|
description = "Set WorldEdit region position 2 at a set distance along 2 axes.",
|
2021-03-01 21:16:23 +00:00
|
|
|
privs = { worldedit = true },
|
2021-02-25 03:35:20 +00:00
|
|
|
require_pos = 1,
|
|
|
|
parse = function(params_text)
|
2024-09-12 13:54:46 +00:00
|
|
|
-------------------------
|
2021-02-24 16:40:53 +00:00
|
|
|
end,
|
2024-09-12 13:54:46 +00:00
|
|
|
func = function(name)
|
|
|
|
return true, "DEPRECATED: please use //srel instead..."
|
2021-02-24 16:40:53 +00:00
|
|
|
end,
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Tests
|
2021-02-26 04:22:39 +00:00
|
|
|
-- /multi //fp set1 -63 19 -20 //srect 5
|
2021-02-28 19:59:46 +00:00
|
|
|
-- /multi //fp set1 -63 19 -20 //srect z 5
|
|
|
|
-- /multi //fp set1 -63 19 -20 //srect a z 5
|
|
|
|
-- /multi //fp set1 -63 19 -20 //srect z a 5
|
|
|
|
-- /multi //fp set1 -63 19 -20 //srect -z 5
|
|
|
|
-- /multi //fp set1 -63 19 -20 //srect a -x 5
|
|
|
|
-- /multi //fp set1 -63 19 -20 //srect -x -a 5
|
2022-09-19 17:54:53 +00:00
|
|
|
-- lua vec = Vector3.new(15,-12,17); vec["len"] = 5; vec.get = true; vec2 = Vector3.new(1,1,1) + vec; print(vec2.x,vec2.y,vec2.z,vec2.len)
|