Add food_* groups to default edibles (#2089)
authortenplus1 <tenplus1@users.noreply.github.com>
Wed, 4 Apr 2018 08:59:15 +0000 (09:59 +0100)
committerSmallJoker <SmallJoker@users.noreply.github.com>
Wed, 4 Apr 2018 08:59:15 +0000 (10:59 +0200)
mods/default/nodes.lua
mods/farming/api.lua
mods/farming/init.lua
mods/flowers/init.lua

index 0d19256d727a98e393676c19dbfcd015fdd808c4..77bccb28c0965af8f1be0feaff8bcb116601b8da 100644 (file)
@@ -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(),
 
index 1c63ee348e57f1c8420fc39e84dfa35918d21a7a..0f8e6816635562c930a3f350c4e7e9406aa21c3f 100644 (file)
@@ -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
index fff48fa5f8d166d3e7158d9b8f6e8d42734bf059..723201de864a2e99e4faf9b0433b4468259d01c7 100644 (file)
@@ -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({
index f2affb99247d99aa4d4f803da2fbcd1275d9c4ce..2afb5a01311cf4e77a5cbe5918a4561573e0001c 100644 (file)
@@ -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 = {