From 9bfa2460c1fbc7c78efa0631dc93230cdd380d47 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Tue, 10 Jan 2017 01:59:21 +0100 Subject: [PATCH] Add mirrored recipes --- mods/default/crafting.lua | 76 +++++++++++++++++++++++++++++--- mods/default/nodes.lua | 2 +- mods/farming/hoes.lua | 42 ++++++++++++++++++ mods/gemalde/init.lua | 91 +-------------------------------------- mods/throwing/init.lua | 8 ++++ 5 files changed, 121 insertions(+), 98 deletions(-) diff --git a/mods/default/crafting.lua b/mods/default/crafting.lua index 3e39d5b470..d2f588ff7c 100644 --- a/mods/default/crafting.lua +++ b/mods/default/crafting.lua @@ -48,17 +48,15 @@ minetest.register_craft({ }) minetest.register_craft({ + type = 'shapeless', output = 'default:mossycobble', - recipe = { - {'default:cobble', 'default:vine'}, - } + recipe = { 'default:cobble', 'default:vine' }, }) minetest.register_craft({ + type = 'shapeless', output = 'default:stonebrickmossy', - recipe = { - {'default:stonebrick', 'default:vine'}, - } + recipe = { 'default:stonebrick', 'default:vine' }, }) minetest.register_craft({ @@ -68,6 +66,13 @@ minetest.register_craft({ {'default:gravel', 'default:dirt'}, } }) +minetest.register_craft({ + output = 'default:coarse_dirt 4', + recipe = { + {'default:gravel', 'default:dirt'}, + {'default:dirt', 'default:gravel'}, + } +}) minetest.register_craft({ output = 'default:sandstonesmooth 4', @@ -128,6 +133,13 @@ minetest.register_craft({ {'default:quartz_crystal', 'default:cobble'}, } }) +minetest.register_craft({ + output = 'default:diorite 2', + recipe = { + {'default:quartz_crystal', 'default:cobble'}, + {'default:cobble', 'default:quartz_crystal'}, + } +}) minetest.register_craft({ output = 'default:stick 4', @@ -244,6 +256,14 @@ minetest.register_craft({ {'', 'default:stick'}, } }) +minetest.register_craft({ + output = 'default:axe_wood', + recipe = { + {'group:wood', 'group:wood'}, + {'default:stick', 'group:wood'}, + {'default:stick', ''}, + } +}) minetest.register_craft({ output = 'default:axe_stone', @@ -253,6 +273,14 @@ minetest.register_craft({ {'', 'default:stick'}, } }) +minetest.register_craft({ + output = 'default:axe_stone', + recipe = { + {'default:cobble', 'default:cobble'}, + {'default:stick', 'default:cobble'}, + {'default:stick', ''}, + } +}) minetest.register_craft({ output = 'default:axe_steel', @@ -262,6 +290,14 @@ minetest.register_craft({ {'', 'default:stick'}, } }) +minetest.register_craft({ + output = 'default:axe_steel', + recipe = { + {'default:steel_ingot', 'default:steel_ingot'}, + {'default:stick', 'default:steel_ingot'}, + {'default:stick', ''}, + } +}) minetest.register_craft({ output = 'default:axe_gold', @@ -271,6 +307,14 @@ minetest.register_craft({ {'', 'default:stick'}, } }) +minetest.register_craft({ + output = 'default:axe_gold', + recipe = { + {'default:gold_ingot', 'default:gold_ingot'}, + {'default:stick', 'default:gold_ingot'}, + {'default:stick', ''}, + } +}) minetest.register_craft({ output = 'default:axe_diamond', @@ -280,6 +324,14 @@ minetest.register_craft({ {'', 'default:stick'}, } }) +minetest.register_craft({ + output = 'default:axe_diamond', + recipe = { + {'default:diamond', 'default:diamond'}, + {'default:stick', 'default:diamond'}, + {'default:stick', ''}, + } +}) minetest.register_craft({ output = 'default:sword_wood', @@ -333,13 +385,23 @@ minetest.register_craft({ }) minetest.register_craft({ - output = "default:pole", + output = "default:fishing_rod", recipe = { {'','','default:stick'}, {'','default:stick','default:string'}, {'default:stick','','default:string'}, } }) +minetest.register_craft({ + output = "default:fishing_rod", + recipe = { + {'default:stick', '', ''}, + {'default:string', 'default:stick', ''}, + {'default:string','','default:stick'}, + } +}) + + minetest.register_craft({ output = 'default:rail 16', diff --git a/mods/default/nodes.lua b/mods/default/nodes.lua index a63f65b830..7e04675d44 100644 --- a/mods/default/nodes.lua +++ b/mods/default/nodes.lua @@ -526,7 +526,7 @@ minetest.register_node("default:leaves", { }) -- Dark oak tree -- -minetest.register_node("default:dark_tree", { +minetest.register_node("default:darktree", { description = "Dark Oak Wood", tiles = {"default_log_big_oak_top.png", "default_log_big_oak_top.png", "default_log_big_oak.png"}, paramtype2 = "facedir", diff --git a/mods/farming/hoes.lua b/mods/farming/hoes.lua index 309fdab2cd..f448e29747 100644 --- a/mods/farming/hoes.lua +++ b/mods/farming/hoes.lua @@ -42,6 +42,14 @@ minetest.register_craft({ {"", "default:stick"} } }) +minetest.register_craft({ + output = "farming:hoe_wood", + recipe = { + {"group:wood", "group:wood"}, + {"default:stick", ""}, + {"default:stick", ""} + } +}) minetest.register_tool("farming:hoe_stone", { description = "Stone Hoe", @@ -64,6 +72,14 @@ minetest.register_craft({ {"", "default:stick"} } }) +minetest.register_craft({ + output = "farming:hoe_stone", + recipe = { + {"default:cobble", "default:cobble"}, + {"default:stick", ""}, + {"default:stick", ""} + } +}) minetest.register_tool("farming:hoe_steel", { description = "Iron Hoe", @@ -86,6 +102,14 @@ minetest.register_craft({ {"", "default:stick"} } }) +minetest.register_craft({ + output = "farming:hoe_steel", + recipe = { + {"default:steel_ingot", "default:steel_ingot"}, + {"default:stick", ""}, + {"default:stick", ""} + } +}) minetest.register_craft({ type = "cooking", @@ -115,6 +139,16 @@ minetest.register_craft({ {"", "default:stick"} } }) +minetest.register_craft({ + output = "farming:hoe_gold", + recipe = { + {"default:gold_ingot", "default:gold_ingot"}, + {"default:stick", ""}, + {"default:stick", ""} + } +}) + + minetest.register_craft({ type = "cooking", @@ -144,3 +178,11 @@ minetest.register_craft({ {"", "default:stick"} } }) +minetest.register_craft({ + output = "farming:hoe_diamond", + recipe = { + {"default:diamond", "default:diamond"}, + {"default:stick", ""}, + {"default:stick", ""} + } +}) diff --git a/mods/gemalde/init.lua b/mods/gemalde/init.lua index b1df46b602..2674bd78f8 100644 --- a/mods/gemalde/init.lua +++ b/mods/gemalde/init.lua @@ -23,7 +23,7 @@ end -- inivisible node minetest.register_node("gemalde:node_"..n.."", { - description = "Picture #"..n.."", + description = "Painting #"..n.."", drawtype = "signlike", tiles = {"gemalde_"..n..".png"}, visual_scale = 3.0, @@ -69,28 +69,8 @@ minetest.register_node("gemalde:node_"..n.."", { -- on_place = minetest.rotate_node }) --- crafts -if n < N then -minetest.register_craft({ - output = 'gemalde:node_'..n..'', - recipe = { - {'gemalde:node_'..(n+1)..''}, - } -}) end -n = n + 1 - -end - --- close the craft loop -minetest.register_craft({ - output = 'gemalde:node_'..N..'', - recipe = { - {'gemalde:node_1'}, - } -}) - -- initial craft minetest.register_craft({ output = 'gemalde:node_1', @@ -101,72 +81,3 @@ minetest.register_craft({ } }) --- reset several pictures to #1 -minetest.register_craft({ - type = 'shapeless', - output = 'gemalde:node_1 2', - recipe = {'group:picture', 'group:picture'}, -}) - -minetest.register_craft({ - type = 'shapeless', - output = 'gemalde:node_1 3', - recipe = {'group:picture', 'group:picture', 'group:picture'}, -}) - -minetest.register_craft({ - type = 'shapeless', - output = 'gemalde:node_1 4', - recipe = { - 'group:picture', 'group:picture', 'group:picture', - 'group:picture' - } -}) - -minetest.register_craft({ - type = 'shapeless', - output = 'gemalde:node_1 5', - recipe = { - 'group:picture', 'group:picture', 'group:picture', - 'group:picture', 'group:picture' - } -}) - -minetest.register_craft({ - type = 'shapeless', - output = 'gemalde:node_1 6', - recipe = { - 'group:picture', 'group:picture', 'group:picture', - 'group:picture', 'group:picture', 'group:picture' - } -}) - -minetest.register_craft({ - type = 'shapeless', - output = 'gemalde:node_1 7', - recipe = { - 'group:picture', 'group:picture', 'group:picture', - 'group:picture', 'group:picture', 'group:picture', - 'group:picture' - } -}) - -minetest.register_craft({ - type = 'shapeless', - output = 'gemalde:node_1 8', - recipe = { - 'group:picture', 'group:picture', 'group:picture', - 'group:picture', 'group:picture', 'group:picture', - 'group:picture', 'group:picture' - } -}) - -minetest.register_craft({ - type = 'shapeless', - output = 'gemalde:node_1 9', - recipe = { - 'group:picture', 'group:picture', 'group:picture', - 'group:picture', 'group:picture', 'group:picture', - 'group:picture', 'group:picture', 'group:picture' - } -}) diff --git a/mods/throwing/init.lua b/mods/throwing/init.lua index d09d5f95da..6d7fb56582 100644 --- a/mods/throwing/init.lua +++ b/mods/throwing/init.lua @@ -120,4 +120,12 @@ minetest.register_craft({ {'', 'default:stick', 'default:string'}, } }) +minetest.register_craft({ + output = 'throwing:bow', + recipe = { + {'default:string', 'default:stick', ''}, + {'default:string', '', 'default:stick'}, + {'default:string', 'default:stick', ''}, + } +})