From f5c321c04d66ce7261d1ca7095985234054d404f Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Tue, 5 Sep 2023 07:51:11 +0100 Subject: [PATCH] add missing groups --- crops/beans.lua | 2 +- crops/blueberry.lua | 6 ++++-- crops/chili.lua | 6 ++++-- crops/corn.lua | 2 +- crops/hemp.lua | 3 ++- crops/onion.lua | 4 ++-- crops/peas.lua | 2 +- crops/pineapple.lua | 4 ++-- crops/rhubarb.lua | 3 ++- init.lua | 7 +++++-- 10 files changed, 24 insertions(+), 15 deletions(-) diff --git a/crops/beans.lua b/crops/beans.lua index 6099bf5..2462ae7 100644 --- a/crops/beans.lua +++ b/crops/beans.lua @@ -251,7 +251,7 @@ minetest.register_node("farming:beanbush", { selection_box = farming.select, groups = { handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1, - not_in_creative_inventory = 1 + compostability = 35, not_in_creative_inventory = 1 }, sounds = farming.sounds.node_sound_leaves_defaults() }) diff --git a/crops/blueberry.lua b/crops/blueberry.lua index e1da44f..1370362 100644 --- a/crops/blueberry.lua +++ b/crops/blueberry.lua @@ -20,7 +20,8 @@ minetest.register_craftitem("farming:blueberries", { minetest.register_craftitem("farming:muffin_blueberry", { description = S("Blueberry Muffin"), inventory_image = "farming_blueberry_muffin.png", - on_use = minetest.item_eat(2) + on_use = minetest.item_eat(2), + groups = {compostability = 65} }) minetest.register_craft({ @@ -34,7 +35,8 @@ minetest.register_craft({ minetest.register_craftitem("farming:blueberry_pie", { description = S("Blueberry Pie"), inventory_image = "farming_blueberry_pie.png", - on_use = minetest.item_eat(6) + on_use = minetest.item_eat(6), + groups = {compostability = 75} }) minetest.register_craft({ diff --git a/crops/chili.lua b/crops/chili.lua index e877b86..48afc47 100644 --- a/crops/chili.lua +++ b/crops/chili.lua @@ -17,7 +17,8 @@ minetest.register_craftitem("farming:chili_pepper", { minetest.register_craftitem("farming:chili_bowl", { description = S("Bowl of Chili"), inventory_image = "farming_chili_bowl.png", - on_use = minetest.item_eat(8, "farming:bowl") + on_use = minetest.item_eat(8, a.bowl), + groups = {compostability = 65} }) minetest.register_craft({ @@ -38,7 +39,8 @@ minetest.register_craft({ minetest.register_craftitem("farming:chili_powder", { description = S("Chili Powder"), on_use = minetest.item_eat(-1), - inventory_image = "farming_chili_powder.png" + inventory_image = "farming_chili_powder.png", + groups = {compostability = 45} }) minetest.register_craft({ diff --git a/crops/corn.lua b/crops/corn.lua index 1e82768..689ccc9 100644 --- a/crops/corn.lua +++ b/crops/corn.lua @@ -56,7 +56,7 @@ minetest.register_craft({ minetest.register_craftitem("farming:cornstarch", { description = S("Cornstarch"), inventory_image = "farming_cornstarch.png", - groups = {food_cornstarch = 1, food_gelatin = 1, flammable = 2} + groups = {food_cornstarch = 1, food_gelatin = 1, flammable = 2, compostability = 65} }) minetest.register_craft({ diff --git a/crops/hemp.lua b/crops/hemp.lua index fc6ce04..cd575bf 100644 --- a/crops/hemp.lua +++ b/crops/hemp.lua @@ -24,7 +24,8 @@ minetest.register_node("farming:seed_hemp", { -- harvested hemp minetest.register_craftitem("farming:hemp_leaf", { description = S("Hemp Leaf"), - inventory_image = "farming_hemp_leaf.png" + inventory_image = "farming_hemp_leaf.png", + groups = {compostability = 35} }) -- hemp oil diff --git a/crops/onion.lua b/crops/onion.lua index d0a9cbd..08310c8 100644 --- a/crops/onion.lua +++ b/crops/onion.lua @@ -23,8 +23,8 @@ minetest.register_craftitem("farming:onion", { minetest.register_craftitem("farming:onion_soup", { description = S("Onion Soup"), inventory_image = "farming_onion_soup.png", - groups = {flammable = 2}, - on_use = minetest.item_eat(6, "farming:bowl") + groups = {flammable = 2, compostability = 65}, + on_use = minetest.item_eat(6, a.bowl) }) minetest.register_craft({ diff --git a/crops/peas.lua b/crops/peas.lua index adfe6bb..a3e7800 100644 --- a/crops/peas.lua +++ b/crops/peas.lua @@ -24,7 +24,7 @@ minetest.register_alias("farming:peas", "farming:pea_pod") minetest.register_craftitem("farming:pea_soup", { description = S("Pea Soup"), inventory_image = "farming_pea_soup.png", - groups = {flammable = 2}, + groups = {flammable = 2, compostability = 65}, on_use = minetest.item_eat(4, a.bowl) }) diff --git a/crops/pineapple.lua b/crops/pineapple.lua index 2ef4550..32790c3 100644 --- a/crops/pineapple.lua +++ b/crops/pineapple.lua @@ -36,7 +36,7 @@ minetest.register_node("farming:pineapple", { minetest.register_craftitem("farming:pineapple_ring", { description = S("Pineapple Ring"), inventory_image = "farming_pineapple_ring.png", - groups = {food_pineapple_ring = 1, flammable = 2}, + groups = {food_pineapple_ring = 1, flammable = 2, compostability = 45}, on_use = minetest.item_eat(1) }) @@ -51,7 +51,7 @@ minetest.register_craftitem("farming:pineapple_juice", { description = S("Pineapple Juice"), inventory_image = "farming_pineapple_juice.png", on_use = minetest.item_eat(4, "vessels:drinking_glass"), - groups = {vessel = 1, drink = 1, compostability = 45} + groups = {vessel = 1, drink = 1, compostability = 35} }) minetest.register_craft({ diff --git a/crops/rhubarb.lua b/crops/rhubarb.lua index 8d2604e..ab22851 100644 --- a/crops/rhubarb.lua +++ b/crops/rhubarb.lua @@ -17,7 +17,8 @@ minetest.register_craftitem("farming:rhubarb", { minetest.register_craftitem("farming:rhubarb_pie", { description = S("Rhubarb Pie"), inventory_image = "farming_rhubarb_pie.png", - on_use = minetest.item_eat(6) + on_use = minetest.item_eat(6), + groups = {compostability = 65} }) minetest.register_craft({ diff --git a/init.lua b/init.lua index 6e67f89..f41394a 100644 --- a/init.lua +++ b/init.lua @@ -7,7 +7,7 @@ farming = { mod = "redo", - version = "20230831", + version = "20230905", path = minetest.get_modpath("farming"), select = { type = "fixed", @@ -556,7 +556,10 @@ farming.register_plant = function(name, def) inventory_image = def.inventory_image, wield_image = def.inventory_image, drawtype = "signlike", - groups = {seed = 1, snappy = 3, attached_node = 1, flammable = 2, growing = 1}, + groups = { + seed = 1, snappy = 3, attached_node = 1, flammable = 2, growing = 1, + compostability = 65 + }, paramtype = "light", paramtype2 = "wallmounted", walkable = false,