From 931a29427cb5610d1e64e40a48cbd645890f1ed9 Mon Sep 17 00:00:00 2001 From: ezhh Date: Wed, 28 Jun 2017 23:17:15 +0100 Subject: [PATCH] Add recipes --- crafting.lua | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/crafting.lua b/crafting.lua index 92e8c9d..0d91b46 100644 --- a/crafting.lua +++ b/crafting.lua @@ -25,4 +25,31 @@ if minetest.get_modpath("caverealms") then }) end +else + -- recipes when caverealms not present + + local recipe_list = { + {"black", "black",}, {"blue", "blue",}, + {"cyan", "cyan",}, {"green", "green",}, + {"magenta", "magenta",}, {"orange", "orange",}, + {"purple", "violet",}, {"red", "red",}, + {"yellow", "yellow",}, {"white", "white",}, + } + + for _, item in pairs(recipe_list) do + + local colour = item[1] + local ingredient = item[2] + + minetest.register_craft({ + output = "abritorch:torch_"..colour.." 4", + recipe = { + {"default:torch", "", "default:torch" }, + {"", "dye:"..ingredient, "" }, + {"default:torch", "", "default:torch" }, + } + }) + end + + end