From: tenplus1 Date: Wed, 4 Apr 2018 08:59:15 +0000 (+0100) Subject: Add food_* groups to default edibles (#2089) X-Git-Tag: 5.0.0~90 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=11b34076719ded242e73465ba0c63d1d790b5761;p=oweals%2Fminetest_game.git Add food_* groups to default edibles (#2089) --- diff --git a/mods/default/nodes.lua b/mods/default/nodes.lua index 0d19256d..77bccb28 100644 --- a/mods/default/nodes.lua +++ b/mods/default/nodes.lua @@ -699,7 +699,7 @@ minetest.register_node("default:apple", { fixed = {-3 / 16, -7 / 16, -3 / 16, 3 / 16, 4 / 16, 3 / 16} }, groups = {fleshy = 3, dig_immediate = 3, flammable = 2, - leafdecay = 3, leafdecay_drop = 1}, + leafdecay = 3, leafdecay_drop = 1, food_apple = 1}, on_use = minetest.item_eat(2), sounds = default.node_sound_leaves_defaults(), diff --git a/mods/farming/api.lua b/mods/farming/api.lua index 1c63ee34..0f8e6816 100644 --- a/mods/farming/api.lua +++ b/mods/farming/api.lua @@ -330,7 +330,7 @@ farming.register_plant = function(name, def) minetest.register_craftitem(":" .. mname .. ":" .. pname, { description = pname:gsub("^%l", string.upper), inventory_image = mname .. "_" .. pname .. ".png", - groups = {flammable = 2}, + groups = def.groups or {flammable = 2}, }) -- Register growing steps diff --git a/mods/farming/init.lua b/mods/farming/init.lua index fff48fa5..723201de 100644 --- a/mods/farming/init.lua +++ b/mods/farming/init.lua @@ -21,21 +21,21 @@ farming.register_plant("farming:wheat", { minlight = 13, maxlight = default.LIGHT_MAX, fertility = {"grassland"}, - groups = {flammable = 4}, + groups = {food_wheat = 1, flammable = 4}, place_param2 = 3, }) minetest.register_craftitem("farming:flour", { description = "Flour", inventory_image = "farming_flour.png", - groups = {flammable = 1}, + groups = {food_flour = 1, flammable = 1}, }) minetest.register_craftitem("farming:bread", { description = "Bread", inventory_image = "farming_bread.png", on_use = minetest.item_eat(5), - groups = {flammable = 2}, + groups = {food_bread = 1, flammable = 2}, }) minetest.register_craft({ diff --git a/mods/flowers/init.lua b/mods/flowers/init.lua index f2affb99..2afb5a01 100644 --- a/mods/flowers/init.lua +++ b/mods/flowers/init.lua @@ -212,7 +212,7 @@ minetest.register_node("flowers:mushroom_brown", { sunlight_propagates = true, walkable = false, buildable_to = true, - groups = {snappy = 3, attached_node = 1, flammable = 1}, + groups = {food_mushroom = 1, snappy = 3, attached_node = 1, flammable = 1}, sounds = default.node_sound_leaves_defaults(), on_use = minetest.item_eat(1), selection_box = {