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,9 +31,9 @@ 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",
|
||||||
facing = "front", front = "front",
|
facing = "front", front = "front",
|
||||||
b = "back", back = "back",
|
b = "back", back = "back",
|
||||||
|
@ -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
|
|
||||||
keywords.mirroring = {
|
-- Mirroring keywords
|
||||||
|
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 = {
|
||||||
worldeditadditions.parse = parse
|
keyword = uak_parse.keyword,
|
||||||
|
keytable = uak_parse.keytable,
|
||||||
-- Old parse functions (marked for deprecation).
|
number = uak_parse.num,
|
||||||
-- Use parse.keytable or parse.keyword instead
|
-- Old parse functions (marked for deprecation).
|
||||||
worldeditadditions.parse.axes = axes.parse_axes
|
-- Use parse.keytable or parse.keyword instead
|
||||||
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/chance.lua")
|
||||||
dofile(worldeditadditions.modpath.."/utils/parse/map.lua")
|
dofile(worldeditadditions.modpath.."/utils/parse/map.lua")
|
||||||
|
|
Loading…
Reference in a new issue