mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-11-25 16:43:05 +00:00
changed: functions returned
(and unexposed key_instance class)
This commit is contained in:
parent
1cef968731
commit
3196a590f5
2 changed files with 37 additions and 28 deletions
|
@ -31,7 +31,7 @@ else
|
|||
end
|
||||
|
||||
--- Unified Axis Keywords banks
|
||||
local keywords = {}
|
||||
local keywords = {
|
||||
-- Direction keywords
|
||||
keywords.dir = {
|
||||
["?"] = "front", f = "front",
|
||||
|
@ -42,13 +42,15 @@ keywords.dir = {
|
|||
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,
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
||||
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
|
||||
worldeditadditions.parse.axes = axes.parse_axes
|
||||
worldeditadditions.parse.axis_name = axes.parse_axis_name
|
||||
axes = axes.parse_axes,
|
||||
axis_name = axes.parse_axis_name,
|
||||
}
|
||||
|
||||
dofile(worldeditadditions.modpath.."/utils/parse/chance.lua")
|
||||
dofile(worldeditadditions.modpath.."/utils/parse/map.lua")
|
||||
|
|
Loading…
Reference in a new issue