add support for marking node alias
This commit is contained in:
parent
0b93e52628
commit
f2868c42ed
@ -12,10 +12,10 @@ minetest.after(0, function()
|
||||
for surface_name, surface_definition in pairs(surface_list) do
|
||||
-- Register the surface itself (e.g. plain asphalt)
|
||||
minetest.register_node(surface_name, surface_definition)
|
||||
-- Register alias if given
|
||||
-- Register for surface alias if given
|
||||
if type(surface_definition.aka) == "table" then
|
||||
for _, alias in ipairs(surface_definition.aka) do
|
||||
minetest.register_alias(alias, surface_name)
|
||||
for _, old_name in ipairs(surface_definition.aka) do
|
||||
minetest.register_alias(old_name, surface_name)
|
||||
end
|
||||
end
|
||||
-- Register the craft for this surface
|
||||
@ -55,6 +55,12 @@ minetest.after(0, function()
|
||||
output = craft_output,
|
||||
recipe = craft
|
||||
})
|
||||
-- Register alias for the marking if given
|
||||
if type(marking_data.aka) == "table" then
|
||||
for _, old_name in ipairs(marking_data.aka) do
|
||||
minetest.register_alias(old_name, craft_output)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
@ -9,6 +9,7 @@ streets.register_road_marking({
|
||||
suffix = "line_dashed",
|
||||
friendly_suffix = "dashed line",
|
||||
overlay = "streets_line_dashed.png",
|
||||
aka = {},
|
||||
craft = {
|
||||
{"?", "dye:white", "?"},
|
||||
{"?", "?", "?"},
|
||||
@ -20,6 +21,7 @@ streets.register_road_marking({
|
||||
suffix = "line_solid",
|
||||
friendly_suffix = "solid line",
|
||||
overlay = "streets_line_solid.png",
|
||||
aka = {},
|
||||
craft = {
|
||||
{"?", "dye:white", "?"},
|
||||
{"?", "dye:white", "?"},
|
||||
@ -31,6 +33,7 @@ streets.register_road_marking({
|
||||
suffix = "side_slim",
|
||||
friendly_suffix = "slim line",
|
||||
overlay = "streets_line_side_slim.png",
|
||||
aka = {},
|
||||
craft = {
|
||||
{"?", "?", "dye:white"},
|
||||
{"?", "?", "dye:white"},
|
||||
@ -42,6 +45,7 @@ streets.register_road_marking({
|
||||
suffix = "side_thick",
|
||||
friendly_suffix = "thick line",
|
||||
overlay = "streets_line_side_thick.png",
|
||||
aka = {},
|
||||
craft = {
|
||||
{"?", "dye:white", "dye:white"},
|
||||
{"?", "dye:white", "dye:white"},
|
||||
@ -53,6 +57,7 @@ streets.register_road_marking({
|
||||
suffix = "side_dashed_slim",
|
||||
friendly_suffix = "slim dashed line",
|
||||
overlay = "streets_line_side_dashed_slim.png",
|
||||
aka = {},
|
||||
craft = {
|
||||
{"?", "?", "dye:white"},
|
||||
{"?", "?", "?"},
|
||||
@ -64,6 +69,7 @@ streets.register_road_marking({
|
||||
suffix = "side_dashed_thick",
|
||||
friendly_suffix = "thick dashed line",
|
||||
overlay = "streets_line_side_dashed_thick.png",
|
||||
aka = {},
|
||||
craft = {
|
||||
{"?", "dye:white", "dye:white"},
|
||||
{"?", "?", "?"},
|
||||
@ -75,6 +81,7 @@ streets.register_road_marking({
|
||||
suffix = "edge_slim",
|
||||
friendly_suffix = "slim edge line",
|
||||
overlay = "streets_line_edge_slim.png",
|
||||
aka = {},
|
||||
craft = {
|
||||
{"dye:white", "dye:white", "dye:white"},
|
||||
{"?", "?", "dye:white"},
|
||||
@ -86,6 +93,7 @@ streets.register_road_marking({
|
||||
suffix = "edge_thick",
|
||||
friendly_suffix = "thick edge line",
|
||||
overlay = "streets_line_edge_thick.png",
|
||||
aka = {},
|
||||
craft = {
|
||||
{"dye:white", "dye:white", "dye:white"},
|
||||
{"dye:white", "dye:white", "dye:white"},
|
||||
|
Loading…
x
Reference in New Issue
Block a user