From 2cddccdca4ebfee5748f2d677e8eee6c6c7bd70c Mon Sep 17 00:00:00 2001 From: VorTechnix <45538536+VorTechnix@users.noreply.github.com> Date: Mon, 23 May 2022 14:58:27 -0700 Subject: [PATCH] working (tested) parser implementation --- worldeditadditions/utils/parse/axes_parser.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/worldeditadditions/utils/parse/axes_parser.lua b/worldeditadditions/utils/parse/axes_parser.lua index 409e2cd..1e68c2a 100644 --- a/worldeditadditions/utils/parse/axes_parser.lua +++ b/worldeditadditions/utils/parse/axes_parser.lua @@ -58,7 +58,7 @@ local parse = {} -- For example, "zzy" would become "yz" -- @param: str: String: Axis declaration to parse -- @returns: Table|Bool: axis | axes | false -function parse.axes(str) +function parse.axis(str) local axes, ret = {"x","y","z"}, {} for i,v in ipairs(axes) do if str:match(v) then table.insert(ret,v) end @@ -96,7 +96,7 @@ function parse.keyword(str) str = str:sub(2) end - local axes = parse.axes(str) + local axes = parse.axis(str) if axes then return key_instance.new("axis", axes, sign) elseif keywords.dir[str] then @@ -191,7 +191,7 @@ function parse.keytable(tbl, facing, sum) end -- End of main for loop -- Handle Mirroring - if tmp.mirror then + if tmp.mirror and not sum then max = max:max(min:abs()) min = max:multiply(-1) end