diff --git a/worldeditadditions/utils/parse/axes_parser.lua b/worldeditadditions/utils/parse/axes_parser.lua index 1e68c2a..1a3295e 100644 --- a/worldeditadditions/utils/parse/axes_parser.lua +++ b/worldeditadditions/utils/parse/axes_parser.lua @@ -31,24 +31,26 @@ else end --- Unified Axis Keywords banks -local keywords = {} --- Direction keywords -keywords.dir = { - ["?"] = "front", f = "front", - facing = "front", front = "front", - b = "back", back = "back", - behind = "back", rear = "back", - l = "left", left = "left", - r = "right", right = "right", - u = "up", up = "up", - d = "down", down = "down", -} --- Mirroring keywords -keywords.mirroring = { - sym = true, symmetrical = true, - mirror = true, mir = true, - rev = true, reverse = true, - ["true"] = true +local keywords = { + -- Direction keywords + keywords.dir = { + ["?"] = "front", f = "front", + facing = "front", front = "front", + b = "back", back = "back", + behind = "back", rear = "back", + l = "left", left = "left", + r = "right", right = "right", + u = "up", up = "up", + d = "down", down = "down", + }, + + -- Mirroring keywords + keywords.mirroring = { + sym = true, symmetrical = true, + mirror = true, mir = true, + rev = true, reverse = true, + ["true"] = true + }, } --- Initialize parser function container @@ -201,4 +203,8 @@ function parse.keytable(tbl, facing, sum) end -return parse +return { + keyword = parse.keyword, + keytable = parse.keytable, + number = parse.num, +} diff --git a/worldeditadditions/utils/parse/init.lua b/worldeditadditions/utils/parse/init.lua index 356ccc4..ff0a0c7 100644 --- a/worldeditadditions/utils/parse/init.lua +++ b/worldeditadditions/utils/parse/init.lua @@ -4,17 +4,20 @@ -- ██ ██ ██ ██ ██ ██ ██ -- ██ ██ ██ ██ ██ ███████ ███████ +-- Unified Axes Keyword Parser +local uak_parse = dofile(worldeditadditions.modpath.."/utils/parse/axes_parser.lua") +-- Old axis parsing functions local axes = dofile(worldeditadditions.modpath.."/utils/parse/axes.lua") -local parse = dofile(worldeditadditions.modpath.."/utils/parse/axes.lua") -local key_instance = dofile(worldeditadditions.modpath.."/utils/parse/key_instance.lua") -worldeditadditions.key_instance = key_instance -worldeditadditions.parse = parse - --- Old parse functions (marked for deprecation). --- Use parse.keytable or parse.keyword instead -worldeditadditions.parse.axes = axes.parse_axes -worldeditadditions.parse.axis_name = axes.parse_axis_name +worldeditadditions.parse = { + keyword = uak_parse.keyword, + keytable = uak_parse.keytable, + number = uak_parse.num, + -- Old parse functions (marked for deprecation). + -- Use parse.keytable or parse.keyword instead + axes = axes.parse_axes, + axis_name = axes.parse_axis_name, +} dofile(worldeditadditions.modpath.."/utils/parse/chance.lua") dofile(worldeditadditions.modpath.."/utils/parse/map.lua")