From 866748a5c3caffd67b2b7bab8406cbeb139627dd Mon Sep 17 00:00:00 2001 From: VorTechnix <45538536+VorTechnix@users.noreply.github.com> Date: Fri, 19 Mar 2021 16:25:26 -0700 Subject: [PATCH] dir function rename --- worldeditadditions/utils/selector_helps.lua | 2 +- worldeditadditions_commands/commands/selectors/srel.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/worldeditadditions/utils/selector_helps.lua b/worldeditadditions/utils/selector_helps.lua index 4a77603..ee70d44 100644 --- a/worldeditadditions/utils/selector_helps.lua +++ b/worldeditadditions/utils/selector_helps.lua @@ -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.xlate_dir(name, dir) +function worldeditadditions.dir_to_xyz(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 diff --git a/worldeditadditions_commands/commands/selectors/srel.lua b/worldeditadditions_commands/commands/selectors/srel.lua index f210599..cc4b3ce 100644 --- a/worldeditadditions_commands/commands/selectors/srel.lua +++ b/worldeditadditions_commands/commands/selectors/srel.lua @@ -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.xlate_dir(name, tmp.proc:match("%l+")) + tmp.ax, _ = wea.dir_to_xyz(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