aboutsummaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua26
1 files changed, 16 insertions, 10 deletions
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