mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-11-24 08:03:46 +01:00
Merge branch 'VorTechnix' of https://github.com/sbrl/Minetest-WorldEditAdditions into VorTechnix
This commit is contained in:
commit
c1bfb496b5
@ -784,11 +784,12 @@ Pops a selection off your per-user selection stack and applies it to the current
|
|||||||
Alias for [`//count`](#count).
|
Alias for [`//count`](#count).
|
||||||
|
|
||||||
```
|
```
|
||||||
//mface
|
//mcount
|
||||||
```
|
```
|
||||||
|
|
||||||
## `//mface`
|
## `//mface`
|
||||||
Returns the horizontal (X/Z) axis or axes the player is looking along.
|
Returns the horizontal (X/Z) axis or axes the player is looking along.
|
||||||
|
Aliases: `//mfacing`.
|
||||||
|
|
||||||
```
|
```
|
||||||
//mface
|
//mface
|
||||||
@ -809,7 +810,7 @@ Returns the lengths of the current selection on the X, Y and Z axes.
|
|||||||
```
|
```
|
||||||
|
|
||||||
## `//mtrig`
|
## `//mtrig`
|
||||||
Returns the length of the diagonal pos1,pos2 and it's angle on the XZ and h/Y axes.
|
Returns the length of the diagonal from pos1 to pos2 and its angle on the XZ (horizontal) and Y (vertical) axes.
|
||||||
|
|
||||||
```
|
```
|
||||||
//mtrig
|
//mtrig
|
||||||
|
@ -14,7 +14,7 @@ worldedit.register_command("mtrig", {
|
|||||||
return true
|
return true
|
||||||
end,
|
end,
|
||||||
func = function(name, params_text)
|
func = function(name, params_text)
|
||||||
local str = "The measurements of the line pos1,pos2 are Length (D): "
|
local str = "The measurements of the line from pos1 to pos2 are Length (D): "
|
||||||
local vec = v3.subtract(worldedit.pos2[name],worldedit.pos1[name]):abs()
|
local vec = v3.subtract(worldedit.pos2[name],worldedit.pos1[name]):abs()
|
||||||
local len = vec:length()
|
local len = vec:length()
|
||||||
str = str..wea.round(len, 4)..", ∠XZ: "..
|
str = str..wea.round(len, 4)..", ∠XZ: "..
|
||||||
|
@ -10,7 +10,7 @@ local we_c = worldeditadditions_core
|
|||||||
|
|
||||||
we_c.modpath = minetest.get_modpath("worldeditadditions_core")
|
we_c.modpath = minetest.get_modpath("worldeditadditions_core")
|
||||||
|
|
||||||
-- Initialze WorldEdit stuff if the WorldEdit mod is not present
|
-- Initialise WorldEdit stuff if the WorldEdit mod is not present
|
||||||
if not minetest.get_modpath("worldedit") then
|
if not minetest.get_modpath("worldedit") then
|
||||||
dofile(we_c.modpath.."/worldedit/init.lua")
|
dofile(we_c.modpath.."/worldedit/init.lua")
|
||||||
end
|
end
|
||||||
|
@ -5,7 +5,7 @@ function worldeditadditions_core.register_command(def)
|
|||||||
def.require_pos = def.require_pos or 0
|
def.require_pos = def.require_pos or 0
|
||||||
assert(def.require_pos >= 0 and def.require_pos < 3)
|
assert(def.require_pos >= 0 and def.require_pos < 3)
|
||||||
if def.params == "" and not def.parse then
|
if def.params == "" and not def.parse then
|
||||||
def.parse = function(param) return true end
|
def.parse = function(params_text) return true end
|
||||||
else
|
else
|
||||||
assert(def.parse)
|
assert(def.parse)
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user