From 0d52c5344d1e4f1d66477978488a85515ecd8e5c Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Sat, 2 Sep 2023 08:13:32 +0100 Subject: [PATCH] more mineclone compatible recipes --- compatibility.lua | 7 ------- crops/ryeoatrice.lua | 4 ++-- food.lua | 6 +++--- items.lua | 22 ++++++++++++++++++++-- utensils.lua | 31 ++++++++++++++++--------------- 5 files changed, 41 insertions(+), 29 deletions(-) diff --git a/compatibility.lua b/compatibility.lua index e531796..3b1fe2b 100644 --- a/compatibility.lua +++ b/compatibility.lua @@ -8,13 +8,6 @@ local alias = function(orig, new) minetest.register_alias(orig, new) end ---= Overrides (add food_* group to apple and brown mushroom) - -minetest.override_item("default:apple", { - groups = {food_apple = 1, fleshy = 3, dig_immediate = 3, flammable = 2, - leafdecay = 3, leafdecay_drop = 1} -}) - --= Aliases -- Banana diff --git a/crops/ryeoatrice.lua b/crops/ryeoatrice.lua index ff56a22..90dfda9 100644 --- a/crops/ryeoatrice.lua +++ b/crops/ryeoatrice.lua @@ -72,8 +72,8 @@ minetest.register_craft({ type = "shapeless", output = "farming:flour_multigrain", recipe = { - "farming:wheat", "farming:barley", "farming:oat", - "farming:rye", a.mortar_pestle + "group:food_wheat", "group:food_barley", "group:food_oats", + "group:food_rye", a.mortar_pestle }, replacements = {{"group:food_mortar_pestle", "farming:mortar_pestle"}} }) diff --git a/food.lua b/food.lua index 9a2bf02..2dacb13 100644 --- a/food.lua +++ b/food.lua @@ -8,7 +8,7 @@ minetest.register_craftitem("farming:bread_slice", { description = S("Sliced Bread"), inventory_image = "farming_bread_slice.png", on_use = minetest.item_eat(1), - groups = {food_bread_slice = 1, flammable = 2} + groups = {food_bread_slice = 1, flammable = 2, compostability = 65} }) minetest.register_craft({ @@ -23,7 +23,7 @@ minetest.register_craftitem("farming:toast", { description = S("Toast"), inventory_image = "farming_toast.png", on_use = minetest.item_eat(1), - groups = {food_toast = 1, flammable = 2} + groups = {food_toast = 1, flammable = 2, compostability = 65} }) minetest.register_craft({ @@ -39,7 +39,7 @@ minetest.register_craftitem("farming:toast_sandwich", { description = S("Toast Sandwich"), inventory_image = "farming_toast_sandwich.png", on_use = minetest.item_eat(4), - groups = {flammable = 2} + groups = {flammable = 2, compostability = 85} }) minetest.register_craft({ diff --git a/items.lua b/items.lua index eeb72e7..50243cc 100644 --- a/items.lua +++ b/items.lua @@ -52,9 +52,16 @@ farming.recipe_items = { paper = "default:paper", snow = "default:snow", string = "farming:string", - wool = "wool:white" + wool = "wool:white", + steel_ingot = "default:steel_ingot", + clay_brick = "default:clay_brick", + stone = "default:stone", + glass = "default:glass", } +add_groups("default:apple", {food_apple = 1}) + + -- change recipe items to mineclone variations if farming.mcl then @@ -78,13 +85,17 @@ if farming.mcl then a.dye_violet = "mcl_dye:violet" a.dye_yellow = "mcl_dye:yellow" a.bowl = "mcl_core:bowl" - a.flour = "mcl_farming:bread" +-- a.flour = "mcl_farming:bread" a.bread = "mcl_farming:bread" a.cactus = "mcl_core:cactus" a.paper = "mcl_core:paper" a.snow = "mcl_throwing:snowball" a.string = "mcl_mobitems:string" a.wool = "mcl_wool:white" + a.steel_ingot = "mcl_core:iron_ingot" + a.clay_brick = "mcl_core:clay_lump" + a.stone = "mcl_core:stone" + a.glass = "mcl_core:glass" add_groups("mcl_core:sugar", {food_sugar = 1}) add_groups("mcl_throwing:egg", {food_egg = 1}) @@ -100,4 +111,11 @@ if farming.mcl then add_groups("mcl_mobitems:beef", {food_meat_raw = 1}) add_groups("mcl_farming:potato_item", {food_potato = 1}) add_groups("mcl_farming:bread", {food_bread = 1}) + add_groups("mcl_mobitems:milk_bucket", {food_milk = 1}) + add_groups("mcl_ocean:dried_kelp", {food_seaweed = 1}) + + -- add missing food groups to current items so recipes work + add_groups("mcl_dye:yellow", {food_lemon = 1, food_banana = 1}) + add_groups("mcl_dye:orange", {food_orange = 1}) + add_groups("mcl_flowers:sunflower", {food_olive_oil = 1, food_butter = 1}) end diff --git a/utensils.lua b/utensils.lua index 251d415..a9c1429 100644 --- a/utensils.lua +++ b/utensils.lua @@ -1,5 +1,6 @@ local S = farming.translate +local a = farming.recipe_items -- wooden bowl @@ -34,7 +35,7 @@ minetest.register_craftitem("farming:saucepan", { minetest.register_craft({ output = "farming:saucepan", recipe = { - {"default:steel_ingot", "", ""}, + {a.steel_ingot, "", ""}, {"", "group:stick", ""} } }) @@ -50,8 +51,8 @@ minetest.register_craftitem("farming:pot", { minetest.register_craft({ output = "farming:pot", recipe = { - {"group:stick", "default:steel_ingot", "default:steel_ingot"}, - {"", "default:steel_ingot", "default:steel_ingot"} + {"group:stick", a.steel_ingot, a.steel_ingot}, + {"", a.steel_ingot, a.steel_ingot} } }) @@ -66,9 +67,9 @@ minetest.register_craftitem("farming:baking_tray", { minetest.register_craft({ output = "farming:baking_tray", recipe = { - {"default:clay_brick", "default:clay_brick", "default:clay_brick"}, - {"default:clay_brick", "", "default:clay_brick"}, - {"default:clay_brick", "default:clay_brick", "default:clay_brick"} + {a.clay_brick, a.clay_brick, a.clay_brick}, + {a.clay_brick, "", a.clay_brick}, + {a.clay_brick, a.clay_brick, a.clay_brick} } }) @@ -83,8 +84,8 @@ minetest.register_craftitem("farming:skillet", { minetest.register_craft({ output = "farming:skillet", recipe = { - {"default:steel_ingot", "", ""}, - {"", "default:steel_ingot", ""}, + {a.steel_ingot, "", ""}, + {"", a.steel_ingot, ""}, {"", "", "group:stick"} } }) @@ -100,8 +101,8 @@ minetest.register_craftitem("farming:mortar_pestle", { minetest.register_craft({ output = "farming:mortar_pestle", recipe = { - {"default:stone", "group:stick", "default:stone"}, - {"", "default:stone", ""} + {a.stone, "group:stick", a.stone}, + {"", a.stone, ""} } }) @@ -116,7 +117,7 @@ minetest.register_craftitem("farming:cutting_board", { minetest.register_craft({ output = "farming:cutting_board", recipe = { - {"default:steel_ingot", "", ""}, + {a.steel_ingot, "", ""}, {"", "group:stick", ""}, {"", "", "group:wood"} } @@ -133,8 +134,8 @@ minetest.register_craftitem("farming:juicer", { minetest.register_craft({ output = "farming:juicer", recipe = { - {"", "default:stone", ""}, - {"default:stone", "", "default:stone"} + {"", a.stone, ""}, + {a.stone, "", a.stone} } }) @@ -149,8 +150,8 @@ minetest.register_craftitem("farming:mixing_bowl", { minetest.register_craft({ output = "farming:mixing_bowl", recipe = { - {"default:glass", "group:stick", "default:glass"}, - {"", "default:glass", ""} + {a.glass, "group:stick", a.glass}, + {"", a.glass, ""} } })