train compatibilits for flat panels and microblocks ("_1")

master
Och Noe 2021-07-25 09:12:18 +02:00
parent 20aa466c83
commit 07add6dd15
2 changed files with 6 additions and 0 deletions

View File

@ -95,6 +95,9 @@ function stairsplus:register_micro(modname, subname, recipeitem, fields)
def.paramtype2 = def.paramtype2 or "facedir"
def.on_place = minetest.rotate_node
def.groups = stairsplus:prepare_groups(fields.groups)
if alternate == "_1" then
def.groups.not_blocking_trains = 1
end
def.description = desc
if fields.drop and not (type(fields.drop) == "table") then
def.drop = modname.. ":micro_" ..fields.drop..alternate

View File

@ -96,6 +96,9 @@ function stairsplus:register_panel(modname, subname, recipeitem, fields)
def.on_place = minetest.rotate_node
def.description = desc
def.groups = stairsplus:prepare_groups(fields.groups)
if alternate == "_1" then
def.groups.not_blocking_trains = 1
end
if fields.drop and not (type(fields.drop) == "table") then
def.drop = modname.. ":panel_" ..fields.drop..alternate
end