From 4a8d9ac3d7d174524f0d17892d0b4fb66183c6b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20P=C3=A9rez-Cerezo?= Date: Fri, 12 Jul 2019 00:32:27 +0200 Subject: add arse train lines and ph metrorail --- init.lua | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) (limited to 'init.lua') diff --git a/init.lua b/init.lua index 28a111f..c7253fa 100644 --- a/init.lua +++ b/init.lua @@ -30,8 +30,12 @@ for i,n in ipairs(boardlist) do n.imgtyp = "png" end + if not n.name then + n.name=n.item1 .. "_" .. n.item2 .. "_" .. n.item3 + end + -- Register the Node - minetest.register_node("billboard:bb_".. n.item1 .."_"..n.item2 .."_"..n.item3, { + minetest.register_node("billboard:bb_"..n.name, { description = n.title, drawtype = "signlike", visual_scale = n.scale, @@ -53,14 +57,16 @@ for i,n in ipairs(boardlist) do }) - -- Register the Recipe for the Node - minetest.register_craft({ - output = "billboard:bb_"..n.item1.."_"..n.item2.."_"..n.item3, - recipe = { - {"group:stick", "group:stick", "group:stick"}, - {"default:"..n.item1, "wool:"..n.item2, "wool:"..n.item3}, - {"group:stick", "group:stick", "group:stick"} - } - }) + if not n.norecipe then + -- Register the Recipe for the Node + minetest.register_craft({ + output = "billboard:bb_"..n.name, + recipe = { + {"group:stick", "group:stick", "group:stick"}, + {"default:"..n.item1, "wool:"..n.item2, "wool:"..n.item3}, + {"group:stick", "group:stick", "group:stick"} + } + }) + end end -- cgit v1.2.3