migrated mtools to WEA pos system

This commit is contained in:
VorTechnix 2024-10-07 15:40:34 -07:00
parent 72ab9e0d64
commit 29bac504b0
No known key found for this signature in database
GPG key ID: 091E91A69545D5BA
3 changed files with 6 additions and 6 deletions

View file

@ -18,8 +18,8 @@ worldeditadditions_core.register_command("midpos", {
func = function(name, params_text) func = function(name, params_text)
local str = "The centre of the current selection is at " local str = "The centre of the current selection is at "
local pos1 = Vector3.clone(worldedit.pos1[name]) local pos1 = Vector3.clone(wea_c.pos.get(name, 1))
local pos2 = Vector3.clone(worldedit.pos2[name]) local pos2 = Vector3.clone(wea_c.pos.get(name, 2))
local vec = Vector3.mean(pos1, pos2) local vec = Vector3.mean(pos1, pos2)

View file

@ -19,8 +19,8 @@ worldeditadditions_core.register_command("msize", {
func = function(name, params_text) func = function(name, params_text)
local str = "The dimensions of the current selection are " local str = "The dimensions of the current selection are "
local pos1 = Vector3.clone(worldedit.pos1[name]) local pos1 = Vector3.clone(wea_c.pos.get(name, 1))
local pos2 = Vector3.clone(worldedit.pos2[name]) local pos2 = Vector3.clone(wea_c.pos.get(name, 2))
local vec = (pos2 - pos1):abs() local vec = (pos2 - pos1):abs()

View file

@ -19,8 +19,8 @@ worldeditadditions_core.register_command("mtrig", {
func = function(name, params_text) func = function(name, params_text)
local str = "The measurements of the line from pos1 to pos2 are Length (D): " local str = "The measurements of the line from pos1 to pos2 are Length (D): "
local pos1 = Vector3.clone(worldedit.pos2[name]) local pos1 = Vector3.clone(wea_c.pos.get(name, 2))
local pos2 = Vector3.clone(worldedit.pos1[name]) local pos2 = Vector3.clone(wea_c.pos.get(name, 1))
local vec = (pos2 - pos1):abs() local vec = (pos2 - pos1):abs()
local len = vec:length() local len = vec:length()