mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-11-22 07:23:00 +00:00
renamed translation function
This commit is contained in:
parent
60fb4f1b57
commit
d4edeaeff7
2 changed files with 2 additions and 2 deletions
|
@ -22,7 +22,7 @@ end
|
|||
-- @param name string The name of the player to return facing direction of.
|
||||
-- @param dir string Relative direction to translate.
|
||||
-- @return Returns axis name and sign multiplier.
|
||||
function worldeditadditions.dh_dir(name, dir)
|
||||
function worldeditadditions.xlate_dir(name, dir)
|
||||
local axfac, drfac = worldeditadditions.player_axis2d(name)
|
||||
local _, axlft, drlft = worldeditadditions.axis_left(axfac,drfac)
|
||||
if dir:match("front") or dir:match("back") then
|
||||
|
|
|
@ -13,7 +13,7 @@ local function parse_with_name(name,args)
|
|||
tmp.ax = tmp.proc:match("[xyz]")
|
||||
tmp.dir = tonumber(tmp.proc:match("[+-]?%d+")) * (tmp.proc:match("-%l+") and -1 or 1)
|
||||
else
|
||||
tmp.ax, _ = wea.dh_dir(name, tmp.proc:match("%l+"))
|
||||
tmp.ax, _ = wea.xlate_dir(name, tmp.proc:match("%l+"))
|
||||
if not tmp.ax then return false, _ end
|
||||
tmp.dir = tonumber(tmp.proc:match("[+-]?%d+")) * (tmp.proc:match("-%l+") and -1 or 1) * _
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue