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
|
end
|
||||||
|
|
||||||
--- Unified Axis Keywords banks
|
--- Unified Axis Keywords banks
|
||||||
local keywords = {}
|
local keywords = {
|
||||||
-- Direction keywords
|
-- Direction keywords
|
||||||
keywords.dir = {
|
keywords.dir = {
|
||||||
["?"] = "front", f = "front",
|
["?"] = "front", f = "front",
|
||||||
|
@ -42,13 +42,15 @@ keywords.dir = {
|
||||||
r = "right", right = "right",
|
r = "right", right = "right",
|
||||||
u = "up", up = "up",
|
u = "up", up = "up",
|
||||||
d = "down", down = "down",
|
d = "down", down = "down",
|
||||||
}
|
},
|
||||||
|
|
||||||
-- Mirroring keywords
|
-- Mirroring keywords
|
||||||
keywords.mirroring = {
|
keywords.mirroring = {
|
||||||
sym = true, symmetrical = true,
|
sym = true, symmetrical = true,
|
||||||
mirror = true, mir = true,
|
mirror = true, mir = true,
|
||||||
rev = true, reverse = true,
|
rev = true, reverse = true,
|
||||||
["true"] = true
|
["true"] = true
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
--- Initialize parser function container
|
--- Initialize parser function container
|
||||||
|
@ -201,4 +203,8 @@ function parse.keytable(tbl, facing, sum)
|
||||||
|
|
||||||
end
|
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 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).
|
-- Old parse functions (marked for deprecation).
|
||||||
-- Use parse.keytable or parse.keyword instead
|
-- Use parse.keytable or parse.keyword instead
|
||||||
worldeditadditions.parse.axes = axes.parse_axes
|
axes = axes.parse_axes,
|
||||||
worldeditadditions.parse.axis_name = axes.parse_axis_name
|
axis_name = axes.parse_axis_name,
|
||||||
|
}
|
||||||
|
|
||||||
dofile(worldeditadditions.modpath.."/utils/parse/chance.lua")
|
dofile(worldeditadditions.modpath.."/utils/parse/chance.lua")
|
||||||
dofile(worldeditadditions.modpath.."/utils/parse/map.lua")
|
dofile(worldeditadditions.modpath.."/utils/parse/map.lua")
|
||||||
|
|
Loading…
Reference in a new issue