mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-11-22 23:42:59 +00:00
player.lua: tidy up comments
This commit is contained in:
parent
43ea6e34c1
commit
41604d19ac
1 changed files with 5 additions and 3 deletions
|
@ -9,8 +9,7 @@ end
|
||||||
|
|
||||||
--- Returns the player's facing info including relative DIRs.
|
--- Returns the player's facing info including relative DIRs.
|
||||||
-- @param name string The name of the player to return facing direction of.
|
-- @param name string The name of the player to return facing direction of.
|
||||||
-- @return table (vector3+) xyz raw values and {axis,sign} tables for facing direction and
|
-- @returns table(vector3+) xyz raw values and {axis,sign} tables for facing direction and relative direction keys (front, back, left, right, up, down).
|
||||||
-- relative direction keys (front, back, left, right, up, down).
|
|
||||||
function worldeditadditions.player_dir(name)
|
function worldeditadditions.player_dir(name)
|
||||||
local dir = v3.clone(minetest.get_player_by_name(name):get_look_dir())
|
local dir = v3.clone(minetest.get_player_by_name(name):get_look_dir())
|
||||||
local abs = dir:abs()
|
local abs = dir:abs()
|
||||||
|
@ -32,10 +31,11 @@ end
|
||||||
|
|
||||||
-- /lua print(worldeditadditions.vector.tostring(minetest.get_player_by_name(myname):get_look_dir()))
|
-- /lua print(worldeditadditions.vector.tostring(minetest.get_player_by_name(myname):get_look_dir()))
|
||||||
|
|
||||||
--- DEPRICATED =================================================================
|
--- DEPRECATED =================================================================
|
||||||
-- TODO: Refactor commands that use the following functions to use player_dir then delete these functions
|
-- TODO: Refactor commands that use the following functions to use player_dir then delete these functions
|
||||||
|
|
||||||
--- Returns the player's facing direction on the horizontal axes only.
|
--- Returns the player's facing direction on the horizontal axes only.
|
||||||
|
-- @deprecated Use worldeditadditions.player_dir instead.
|
||||||
-- @param name string The name of the player to return facing direction of.
|
-- @param name string The name of the player to return facing direction of.
|
||||||
-- @return string,int Returns axis name and sign multiplier.
|
-- @return string,int Returns axis name and sign multiplier.
|
||||||
function worldeditadditions.player_axis2d(name)
|
function worldeditadditions.player_axis2d(name)
|
||||||
|
@ -47,6 +47,7 @@ function worldeditadditions.player_axis2d(name)
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Returns the axis and sign of the axis to the left of the input axis.
|
--- Returns the axis and sign of the axis to the left of the input axis.
|
||||||
|
-- @deprecated Use worldeditadditions.player_dir instead.
|
||||||
-- @param axis string x or z.
|
-- @param axis string x or z.
|
||||||
-- @param sign int Sign multiplier.
|
-- @param sign int Sign multiplier.
|
||||||
-- @return string,int Returns axis name and sign multiplier.
|
-- @return string,int Returns axis name and sign multiplier.
|
||||||
|
@ -57,6 +58,7 @@ function worldeditadditions.axis_left(axis,sign)
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Dehumanize Direction: translates up, down, left, right, front, into xyz based on player orientation.
|
--- Dehumanize Direction: translates up, down, left, right, front, into xyz based on player orientation.
|
||||||
|
-- @deprecated Use worldeditadditions.player_dir instead.
|
||||||
-- @param name string The name of the player to return facing direction of.
|
-- @param name string The name of the player to return facing direction of.
|
||||||
-- @param dir string Relative direction to translate.
|
-- @param dir string Relative direction to translate.
|
||||||
-- @return string Returns axis name and sign multiplier.
|
-- @return string Returns axis name and sign multiplier.
|
||||||
|
|
Loading…
Reference in a new issue