Skip to content

Commit 11b3407

Browse files
tenplus1SmallJoker
authored andcommittedApr 4, 2018
Add food_* groups to default edibles (#2089)
1 parent b0e55c5 commit 11b3407

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed
 

Diff for: ‎mods/default/nodes.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,7 @@ minetest.register_node("default:apple", {
699699
fixed = {-3 / 16, -7 / 16, -3 / 16, 3 / 16, 4 / 16, 3 / 16}
700700
},
701701
groups = {fleshy = 3, dig_immediate = 3, flammable = 2,
702-
leafdecay = 3, leafdecay_drop = 1},
702+
leafdecay = 3, leafdecay_drop = 1, food_apple = 1},
703703
on_use = minetest.item_eat(2),
704704
sounds = default.node_sound_leaves_defaults(),
705705

Diff for: ‎mods/farming/api.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ farming.register_plant = function(name, def)
330330
minetest.register_craftitem(":" .. mname .. ":" .. pname, {
331331
description = pname:gsub("^%l", string.upper),
332332
inventory_image = mname .. "_" .. pname .. ".png",
333-
groups = {flammable = 2},
333+
groups = def.groups or {flammable = 2},
334334
})
335335

336336
-- Register growing steps

Diff for: ‎mods/farming/init.lua

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,21 @@ farming.register_plant("farming:wheat", {
2121
minlight = 13,
2222
maxlight = default.LIGHT_MAX,
2323
fertility = {"grassland"},
24-
groups = {flammable = 4},
24+
groups = {food_wheat = 1, flammable = 4},
2525
place_param2 = 3,
2626
})
2727

2828
minetest.register_craftitem("farming:flour", {
2929
description = "Flour",
3030
inventory_image = "farming_flour.png",
31-
groups = {flammable = 1},
31+
groups = {food_flour = 1, flammable = 1},
3232
})
3333

3434
minetest.register_craftitem("farming:bread", {
3535
description = "Bread",
3636
inventory_image = "farming_bread.png",
3737
on_use = minetest.item_eat(5),
38-
groups = {flammable = 2},
38+
groups = {food_bread = 1, flammable = 2},
3939
})
4040

4141
minetest.register_craft({

Diff for: ‎mods/flowers/init.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ minetest.register_node("flowers:mushroom_brown", {
212212
sunlight_propagates = true,
213213
walkable = false,
214214
buildable_to = true,
215-
groups = {snappy = 3, attached_node = 1, flammable = 1},
215+
groups = {food_mushroom = 1, snappy = 3, attached_node = 1, flammable = 1},
216216
sounds = default.node_sound_leaves_defaults(),
217217
on_use = minetest.item_eat(1),
218218
selection_box = {

0 commit comments

Comments
 (0)