From 7b8ad5786cc06e4dd7fe301fce5ab842e9f44d78 Mon Sep 17 00:00:00 2001 From: ShadowNinja Date: Sun, 15 Sep 2013 23:49:56 -0400 Subject: [PATCH] Add and use the stick group --- mods/default/crafting.lua | 100 ++++++++++++++++++------------------ mods/default/craftitems.lua | 1 + mods/farming/init.lua | 16 +++--- mods/screwdriver/init.lua | 2 +- 4 files changed, 60 insertions(+), 59 deletions(-) diff --git a/mods/default/crafting.lua b/mods/default/crafting.lua index 868623f7..c4f353a1 100644 --- a/mods/default/crafting.lua +++ b/mods/default/crafting.lua @@ -24,8 +24,8 @@ minetest.register_craft({ minetest.register_craft({ output = 'default:fence_wood 2', recipe = { - {'default:stick', 'default:stick', 'default:stick'}, - {'default:stick', 'default:stick', 'default:stick'}, + {'group:stick', 'group:stick', 'group:stick'}, + {'group:stick', 'group:stick', 'group:stick'}, } }) @@ -34,7 +34,7 @@ minetest.register_craft({ recipe = { {'group:wood', 'group:wood', 'group:wood'}, {'group:wood', 'group:wood', 'group:wood'}, - {'', 'default:stick', ''}, + {'', 'group:stick', ''}, } }) @@ -42,7 +42,7 @@ minetest.register_craft({ output = 'default:torch 4', recipe = { {'default:coal_lump'}, - {'default:stick'}, + {'group:stick'}, } }) @@ -50,8 +50,8 @@ minetest.register_craft({ output = 'default:pick_wood', recipe = { {'group:wood', 'group:wood', 'group:wood'}, - {'', 'default:stick', ''}, - {'', 'default:stick', ''}, + {'', 'group:stick', ''}, + {'', 'group:stick', ''}, } }) @@ -59,8 +59,8 @@ minetest.register_craft({ output = 'default:pick_stone', recipe = { {'group:stone', 'group:stone', 'group:stone'}, - {'', 'default:stick', ''}, - {'', 'default:stick', ''}, + {'', 'group:stick', ''}, + {'', 'group:stick', ''}, } }) @@ -68,8 +68,8 @@ minetest.register_craft({ output = 'default:pick_steel', recipe = { {'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'}, - {'', 'default:stick', ''}, - {'', 'default:stick', ''}, + {'', 'group:stick', ''}, + {'', 'group:stick', ''}, } }) @@ -77,8 +77,8 @@ minetest.register_craft({ output = 'default:pick_bronze', recipe = { {'default:bronze_ingot', 'default:bronze_ingot', 'default:bronze_ingot'}, - {'', 'default:stick', ''}, - {'', 'default:stick', ''}, + {'', 'group:stick', ''}, + {'', 'group:stick', ''}, } }) @@ -86,8 +86,8 @@ minetest.register_craft({ output = 'default:pick_mese', recipe = { {'default:mese_crystal', 'default:mese_crystal', 'default:mese_crystal'}, - {'', 'default:stick', ''}, - {'', 'default:stick', ''}, + {'', 'group:stick', ''}, + {'', 'group:stick', ''}, } }) @@ -95,8 +95,8 @@ minetest.register_craft({ output = 'default:pick_diamond', recipe = { {'default:diamond', 'default:diamond', 'default:diamond'}, - {'', 'default:stick', ''}, - {'', 'default:stick', ''}, + {'', 'group:stick', ''}, + {'', 'group:stick', ''}, } }) @@ -104,8 +104,8 @@ minetest.register_craft({ output = 'default:shovel_wood', recipe = { {'group:wood'}, - {'default:stick'}, - {'default:stick'}, + {'group:stick'}, + {'group:stick'}, } }) @@ -113,8 +113,8 @@ minetest.register_craft({ output = 'default:shovel_stone', recipe = { {'group:stone'}, - {'default:stick'}, - {'default:stick'}, + {'group:stick'}, + {'group:stick'}, } }) @@ -122,8 +122,8 @@ minetest.register_craft({ output = 'default:shovel_steel', recipe = { {'default:steel_ingot'}, - {'default:stick'}, - {'default:stick'}, + {'group:stick'}, + {'group:stick'}, } }) @@ -131,8 +131,8 @@ minetest.register_craft({ output = 'default:shovel_bronze', recipe = { {'default:bronze_ingot'}, - {'default:stick'}, - {'default:stick'}, + {'group:stick'}, + {'group:stick'}, } }) @@ -140,8 +140,8 @@ minetest.register_craft({ output = 'default:shovel_mese', recipe = { {'default:mese_crystal'}, - {'default:stick'}, - {'default:stick'}, + {'group:stick'}, + {'group:stick'}, } }) @@ -149,8 +149,8 @@ minetest.register_craft({ output = 'default:shovel_diamond', recipe = { {'default:diamond'}, - {'default:stick'}, - {'default:stick'}, + {'group:stick'}, + {'group:stick'}, } }) @@ -158,8 +158,8 @@ minetest.register_craft({ output = 'default:axe_wood', recipe = { {'group:wood', 'group:wood'}, - {'group:wood', 'default:stick'}, - {'', 'default:stick'}, + {'group:wood', 'group:stick'}, + {'', 'group:stick'}, } }) @@ -167,8 +167,8 @@ minetest.register_craft({ output = 'default:axe_stone', recipe = { {'group:stone', 'group:stone'}, - {'group:stone', 'default:stick'}, - {'', 'default:stick'}, + {'group:stone', 'group:stick'}, + {'', 'group:stick'}, } }) @@ -176,8 +176,8 @@ minetest.register_craft({ output = 'default:axe_steel', recipe = { {'default:steel_ingot', 'default:steel_ingot'}, - {'default:steel_ingot', 'default:stick'}, - {'', 'default:stick'}, + {'default:steel_ingot', 'group:stick'}, + {'', 'group:stick'}, } }) @@ -185,8 +185,8 @@ minetest.register_craft({ output = 'default:axe_bronze', recipe = { {'default:bronze_ingot', 'default:bronze_ingot'}, - {'default:bronze_ingot', 'default:stick'}, - {'', 'default:stick'}, + {'default:bronze_ingot', 'group:stick'}, + {'', 'group:stick'}, } }) @@ -194,8 +194,8 @@ minetest.register_craft({ output = 'default:axe_mese', recipe = { {'default:mese_crystal', 'default:mese_crystal'}, - {'default:mese_crystal', 'default:stick'}, - {'', 'default:stick'}, + {'default:mese_crystal', 'group:stick'}, + {'', 'group:stick'}, } }) @@ -203,8 +203,8 @@ minetest.register_craft({ output = 'default:axe_diamond', recipe = { {'default:diamond', 'default:diamond'}, - {'default:diamond', 'default:stick'}, - {'', 'default:stick'}, + {'default:diamond', 'group:stick'}, + {'', 'group:stick'}, } }) @@ -213,7 +213,7 @@ minetest.register_craft({ recipe = { {'group:wood'}, {'group:wood'}, - {'default:stick'}, + {'group:stick'}, } }) @@ -222,7 +222,7 @@ minetest.register_craft({ recipe = { {'group:stone'}, {'group:stone'}, - {'default:stick'}, + {'group:stick'}, } }) @@ -231,7 +231,7 @@ minetest.register_craft({ recipe = { {'default:steel_ingot'}, {'default:steel_ingot'}, - {'default:stick'}, + {'group:stick'}, } }) @@ -240,7 +240,7 @@ minetest.register_craft({ recipe = { {'default:bronze_ingot'}, {'default:bronze_ingot'}, - {'default:stick'}, + {'group:stick'}, } }) @@ -249,7 +249,7 @@ minetest.register_craft({ recipe = { {'default:mese_crystal'}, {'default:mese_crystal'}, - {'default:stick'}, + {'group:stick'}, } }) @@ -258,7 +258,7 @@ minetest.register_craft({ recipe = { {'default:diamond'}, {'default:diamond'}, - {'default:stick'}, + {'group:stick'}, } }) @@ -266,7 +266,7 @@ minetest.register_craft({ output = 'default:rail 15', recipe = { {'default:steel_ingot', '', 'default:steel_ingot'}, - {'default:steel_ingot', 'default:stick', 'default:steel_ingot'}, + {'default:steel_ingot', 'group:stick', 'default:steel_ingot'}, {'default:steel_ingot', '', 'default:steel_ingot'}, } }) @@ -474,9 +474,9 @@ minetest.register_craft({ minetest.register_craft({ output = 'default:ladder', recipe = { - {'default:stick', '', 'default:stick'}, - {'default:stick', 'default:stick', 'default:stick'}, - {'default:stick', '', 'default:stick'}, + {'group:stick', '', 'group:stick'}, + {'group:stick', 'group:stick', 'group:stick'}, + {'group:stick', '', 'group:stick'}, } }) diff --git a/mods/default/craftitems.lua b/mods/default/craftitems.lua index 5826d669..2d3652e2 100644 --- a/mods/default/craftitems.lua +++ b/mods/default/craftitems.lua @@ -3,6 +3,7 @@ minetest.register_craftitem("default:stick", { description = "Stick", inventory_image = "default_stick.png", + groups = {stick=1}, }) minetest.register_craftitem("default:paper", { diff --git a/mods/farming/init.lua b/mods/farming/init.lua index edef3aa3..275eb646 100644 --- a/mods/farming/init.lua +++ b/mods/farming/init.lua @@ -146,8 +146,8 @@ minetest.register_craft({ output = "farming:hoe_wood", recipe = { {"group:wood", "group:wood"}, - {"", "default:stick"}, - {"", "default:stick"}, + {"", "group:stick"}, + {"", "group:stick"}, } }) @@ -155,8 +155,8 @@ minetest.register_craft({ output = "farming:hoe_stone", recipe = { {"group:stone", "group:stone"}, - {"", "default:stick"}, - {"", "default:stick"}, + {"", "group:stick"}, + {"", "group:stick"}, } }) @@ -164,8 +164,8 @@ minetest.register_craft({ output = "farming:hoe_steel", recipe = { {"default:steel_ingot", "default:steel_ingot"}, - {"", "default:stick"}, - {"", "default:stick"}, + {"", "group:stick"}, + {"", "group:stick"}, } }) @@ -173,8 +173,8 @@ minetest.register_craft({ output = "farming:hoe_bronze", recipe = { {"default:bronze_ingot", "default:bronze_ingot"}, - {"", "default:stick"}, - {"", "default:stick"}, + {"", "group:stick"}, + {"", "group:stick"}, } }) diff --git a/mods/screwdriver/init.lua b/mods/screwdriver/init.lua index 1a11b922..af40d093 100644 --- a/mods/screwdriver/init.lua +++ b/mods/screwdriver/init.lua @@ -158,7 +158,7 @@ minetest.register_craft({ output = "screwdriver:screwdriver", recipe = { {"default:steel_ingot"}, -{"default:stick"} +{"group:stick"} } }) -- 2.25.1