From b61998217df83eef1fa5a97fbd641899485598e6 Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Sat, 27 Jul 2024 08:23:46 +0100 Subject: [PATCH] tidy code --- crops/artichoke.lua | 2 +- crops/asparagus.lua | 2 +- crops/beans.lua | 2 +- crops/beetroot.lua | 3 +-- crops/blackberry.lua | 2 +- crops/blueberry.lua | 2 +- crops/cabbage.lua | 2 +- crops/carrot.lua | 5 ++--- crops/chili.lua | 2 +- crops/cocoa.lua | 6 ++---- crops/corn.lua | 6 +++--- crops/cucumber.lua | 2 +- crops/eggplant.lua | 2 +- crops/garlic.lua | 2 +- crops/ginger.lua | 2 +- crops/grapes.lua | 2 +- crops/lettuce.lua | 2 +- crops/melon.lua | 2 +- crops/mint.lua | 3 +-- crops/onion.lua | 4 ++-- crops/parsley.lua | 2 +- crops/peas.lua | 4 ++-- crops/pepper.lua | 8 ++++---- crops/pineapple.lua | 2 +- crops/potato.lua | 8 +++----- crops/pumpkin.lua | 4 ++-- crops/raspberry.lua | 2 +- crops/rhubarb.lua | 4 ++-- crops/rice.lua | 2 +- crops/ryeoatrice.lua | 2 +- crops/soy.lua | 4 ++-- crops/spinach.lua | 2 +- crops/strawberry.lua | 2 +- crops/sunflower.lua | 4 ++-- crops/tomato.lua | 4 ++-- crops/vanilla.lua | 2 +- crops/wheat.lua | 2 +- food.lua | 2 ++ init.lua | 6 ++++-- 39 files changed, 59 insertions(+), 62 deletions(-) diff --git a/crops/artichoke.lua b/crops/artichoke.lua index ba95d90..4528ae8 100644 --- a/crops/artichoke.lua +++ b/crops/artichoke.lua @@ -6,7 +6,7 @@ minetest.register_craftitem("farming:artichoke", { description = S("Artichoke"), inventory_image = "farming_artichoke.png", groups = { - compostability = 48, seed = 2, food_artichoke = 1, flammable = 2 + compostability = 48, seed = 2, food_artichoke = 1 }, on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:artichoke_1") diff --git a/crops/asparagus.lua b/crops/asparagus.lua index 1af5a7b..fed92f1 100644 --- a/crops/asparagus.lua +++ b/crops/asparagus.lua @@ -6,7 +6,7 @@ minetest.register_craftitem("farming:asparagus", { description = S("Asparagus"), inventory_image = "farming_asparagus.png", groups = { - compostability = 48, seed = 2, food_asparagus = 1, flammable = 2 + compostability = 48, seed = 2, food_asparagus = 1 }, on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:asparagus_1") diff --git a/crops/beans.lua b/crops/beans.lua index c582598..82bcc43 100644 --- a/crops/beans.lua +++ b/crops/beans.lua @@ -72,7 +72,7 @@ end minetest.register_craftitem("farming:beans", { description = S("Green Beans"), inventory_image = "farming_beans.png", - groups = {compostability = 48, seed = 2, food_beans = 1, flammable = 2}, + groups = {compostability = 48, seed = 2, food_beans = 1}, on_use = minetest.item_eat(1), on_place = function(itemstack, placer, pointed_thing) return place_beans(itemstack, placer, pointed_thing, "farming:beanpole_1") diff --git a/crops/beetroot.lua b/crops/beetroot.lua index d4a10b5..d3e88fd 100644 --- a/crops/beetroot.lua +++ b/crops/beetroot.lua @@ -7,7 +7,7 @@ minetest.register_craftitem("farming:beetroot", { description = S("Beetroot"), inventory_image = "farming_beetroot.png", groups = { - compostability = 48, seed = 2, food_beetroot = 1, flammable = 2 + compostability = 48, seed = 2, food_beetroot = 1 }, on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:beetroot_1") @@ -21,7 +21,6 @@ farming.add_eatable("farming:beetroot", 1) minetest.register_craftitem("farming:beetroot_soup", { description = S("Beetroot Soup"), inventory_image = "farming_beetroot_soup.png", - groups = {flammable = 2}, on_use = minetest.item_eat(6, "farming:bowl") }) diff --git a/crops/blackberry.lua b/crops/blackberry.lua index e041930..6c8f7f0 100644 --- a/crops/blackberry.lua +++ b/crops/blackberry.lua @@ -7,7 +7,7 @@ minetest.register_craftitem("farming:blackberry", { inventory_image = "farming_blackberry.png", groups = { compostability = 48, seed = 2, food_blackberries = 1, food_blackberry = 1, - food_berry = 1, flammable = 2 + food_berry = 1 }, on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:blackberry_1") diff --git a/crops/blueberry.lua b/crops/blueberry.lua index 9a6aaa0..9c1ed7c 100644 --- a/crops/blueberry.lua +++ b/crops/blueberry.lua @@ -8,7 +8,7 @@ minetest.register_craftitem("farming:blueberries", { inventory_image = "farming_blueberries.png", groups = { compostability = 48,seed = 2, food_blueberries = 1, food_blueberry = 1, - food_berry = 1, flammable = 2 + food_berry = 1 }, on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:blueberry_1") diff --git a/crops/cabbage.lua b/crops/cabbage.lua index 09c878d..d1a0731 100644 --- a/crops/cabbage.lua +++ b/crops/cabbage.lua @@ -6,7 +6,7 @@ minetest.register_craftitem("farming:cabbage", { description = S("Cabbage"), inventory_image = "farming_cabbage.png", groups = { - compostability = 48, seed = 2, food_cabbage = 1, flammable = 2 + compostability = 48, seed = 2, food_cabbage = 1 }, on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:cabbage_1") diff --git a/crops/carrot.lua b/crops/carrot.lua index f00be26..6393501 100644 --- a/crops/carrot.lua +++ b/crops/carrot.lua @@ -12,7 +12,7 @@ minetest.register_craftitem("farming:carrot", { description = S("Carrot"), inventory_image = "farming_carrot.png", groups = { - compostability = 48, seed = 2, food_carrot = 1, flammable = 2 + compostability = 48, seed = 2, food_carrot = 1 }, on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:carrot_1") @@ -48,8 +48,7 @@ minetest.register_craft({ minetest.register_craftitem("farming:carrot_gold", { description = S("Golden Carrot"), inventory_image = "farming_carrot_gold.png", - on_use = minetest.item_eat(10), - groups = {flammable = 2} + on_use = minetest.item_eat(10) }) farming.add_eatable("farming:carrot_gold", 10) diff --git a/crops/chili.lua b/crops/chili.lua index b5e2e0d..a71d8ab 100644 --- a/crops/chili.lua +++ b/crops/chili.lua @@ -7,7 +7,7 @@ minetest.register_craftitem("farming:chili_pepper", { description = S("Chili Pepper"), inventory_image = "farming_chili_pepper.png", groups = { - compostability = 48, seed = 2, food_chili_pepper = 1, flammable = 4 + compostability = 48, seed = 2, food_chili_pepper = 1 }, on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:chili_1") diff --git a/crops/cocoa.lua b/crops/cocoa.lua index 0f80233..9d99058 100644 --- a/crops/cocoa.lua +++ b/crops/cocoa.lua @@ -96,8 +96,7 @@ minetest.register_craft( { minetest.register_craftitem("farming:cookie", { description = S("Cookie"), inventory_image = "farming_cookie.png", - on_use = minetest.item_eat(2), - groups = {flammable = 2} + on_use = minetest.item_eat(2) }) farming.add_eatable("farming:cookie", 2) @@ -113,8 +112,7 @@ minetest.register_craft( { minetest.register_craftitem("farming:chocolate_dark", { description = S("Bar of Dark Chocolate"), inventory_image = "farming_chocolate_dark.png", - on_use = minetest.item_eat(3), - groups = {flammable = 2} + on_use = minetest.item_eat(3) }) farming.add_eatable("farming:chocolate_dark", 3) diff --git a/crops/corn.lua b/crops/corn.lua index 5e650d2..9bf600c 100644 --- a/crops/corn.lua +++ b/crops/corn.lua @@ -12,7 +12,7 @@ minetest.register_craftitem("farming:corn", { description = S("Corn"), inventory_image = "farming_corn.png", groups = { - compostability = 45, seed = 2, food_corn = 1, flammable = 2 + compostability = 45, seed = 2, food_corn = 1 }, on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:corn_1") @@ -26,7 +26,7 @@ farming.add_eatable("farming:corn", 3) minetest.register_craftitem("farming:corn_cob", { description = S("Corn on the Cob"), inventory_image = "farming_corn_cob.png", - groups = {compostability = 65, food_corn_cooked = 1, flammable = 2}, + groups = {compostability = 65, food_corn_cooked = 1}, on_use = minetest.item_eat(5) }) @@ -43,7 +43,7 @@ minetest.register_craft({ minetest.register_craftitem("farming:popcorn", { description = S("Popcorn"), inventory_image = "farming_popcorn.png", - groups = {compostability = 55, food_popcorn = 1, flammable = 2}, + groups = {compostability = 55, food_popcorn = 1}, on_use = minetest.item_eat(4) }) diff --git a/crops/cucumber.lua b/crops/cucumber.lua index 58b65ae..3f96a4f 100644 --- a/crops/cucumber.lua +++ b/crops/cucumber.lua @@ -11,7 +11,7 @@ minetest.register_craftitem("farming:cucumber", { description = S("Cucumber"), inventory_image = "farming_cucumber.png", groups = { - compostability = 48, seed = 2, food_cucumber = 1, flammable = 2 + compostability = 48, seed = 2, food_cucumber = 1 }, on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:cucumber_1") diff --git a/crops/eggplant.lua b/crops/eggplant.lua index 9dec3d1..9b8009a 100644 --- a/crops/eggplant.lua +++ b/crops/eggplant.lua @@ -6,7 +6,7 @@ minetest.register_craftitem("farming:eggplant", { description = S("Eggplant"), inventory_image = "farming_eggplant.png", groups = { - compostability = 48, seed = 2, food_eggplant = 1, flammable = 2 + compostability = 48, seed = 2, food_eggplant = 1 }, on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:eggplant_1") diff --git a/crops/garlic.lua b/crops/garlic.lua index dbcfbfb..ea9c054 100644 --- a/crops/garlic.lua +++ b/crops/garlic.lua @@ -16,7 +16,7 @@ minetest.register_craftitem("farming:garlic", { description = S("Garlic"), inventory_image = "crops_garlic.png", on_use = minetest.item_eat(1), - groups = {food_garlic = 1, flammable = 3, compostability = 55} + groups = {food_garlic = 1, compostability = 55} }) farming.add_eatable("farming:garlic", 1) diff --git a/crops/ginger.lua b/crops/ginger.lua index 9081074..9a88ecd 100644 --- a/crops/ginger.lua +++ b/crops/ginger.lua @@ -6,7 +6,7 @@ minetest.register_craftitem("farming:ginger", { description = S("Ginger"), inventory_image = "farming_ginger.png", groups = { - compostability = 48, seed = 2, food_ginger = 1, flammable = 2 + compostability = 48, seed = 2, food_ginger = 1 }, on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:ginger_1") diff --git a/crops/grapes.lua b/crops/grapes.lua index 851a4ea..eb75eef 100644 --- a/crops/grapes.lua +++ b/crops/grapes.lua @@ -69,7 +69,7 @@ minetest.register_craftitem("farming:grapes", { inventory_image = "farming_grapes.png", on_use = minetest.item_eat(2), groups = { - compostability = 48, seed = 2, food_grapes = 1, flammable = 3 + compostability = 48, seed = 2, food_grapes = 1 }, on_place = function(itemstack, placer, pointed_thing) return place_grapes(itemstack, placer, pointed_thing, "farming:grapes_1") diff --git a/crops/lettuce.lua b/crops/lettuce.lua index 6c2365d..2423525 100644 --- a/crops/lettuce.lua +++ b/crops/lettuce.lua @@ -6,7 +6,7 @@ minetest.register_craftitem("farming:lettuce", { description = S("Lettuce"), inventory_image = "farming_lettuce.png", groups = { - compostability = 48, seed = 2, food_lettuce = 1, flammable = 2 + compostability = 48, seed = 2, food_lettuce = 1 }, on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:lettuce_1") diff --git a/crops/melon.lua b/crops/melon.lua index c5c74b3..000044c 100644 --- a/crops/melon.lua +++ b/crops/melon.lua @@ -7,7 +7,7 @@ minetest.register_craftitem("farming:melon_slice", { description = S("Melon Slice"), inventory_image = "farming_melon_slice.png", groups = { - compostability = 48, seed = 2, food_melon_slice = 1, flammable = 3 + compostability = 48, seed = 2, food_melon_slice = 1 }, on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:melon_1") diff --git a/crops/mint.lua b/crops/mint.lua index 038c7b1..809f7b6 100644 --- a/crops/mint.lua +++ b/crops/mint.lua @@ -40,8 +40,7 @@ minetest.register_craftitem("farming:mint_leaf", { minetest.register_craftitem("farming:mint_tea", { description = S("Mint Tea"), inventory_image = "farming_mint_tea.png", - on_use = minetest.item_eat(2, a.drinking_glass), - groups = {flammable = 4} + on_use = minetest.item_eat(2, a.drinking_glass) }) farming.add_eatable("farming:mint_tea", 2) diff --git a/crops/onion.lua b/crops/onion.lua index ef5250f..771ba1f 100644 --- a/crops/onion.lua +++ b/crops/onion.lua @@ -13,7 +13,7 @@ minetest.register_craftitem("farming:onion", { description = S("Onion"), inventory_image = "crops_onion.png", groups = { - compostability = 48, seed = 2, food_onion = 1, flammable = 3 + compostability = 48, seed = 2, food_onion = 1 }, on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:onion_1") @@ -27,7 +27,7 @@ farming.add_eatable("farming:onion", 1) minetest.register_craftitem("farming:onion_soup", { description = S("Onion Soup"), inventory_image = "farming_onion_soup.png", - groups = {flammable = 2, compostability = 65}, + groups = {compostability = 65}, on_use = minetest.item_eat(6, a.bowl) }) diff --git a/crops/parsley.lua b/crops/parsley.lua index bfb679a..237985c 100644 --- a/crops/parsley.lua +++ b/crops/parsley.lua @@ -6,7 +6,7 @@ minetest.register_craftitem("farming:parsley", { description = S("Parsley"), inventory_image = "farming_parsley.png", groups = { - compostability = 48, seed = 2, food_parsley = 1, flammable = 2 + compostability = 48, seed = 2, food_parsley = 1 }, on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:parsley_1") diff --git a/crops/peas.lua b/crops/peas.lua index ef49d7c..857860b 100644 --- a/crops/peas.lua +++ b/crops/peas.lua @@ -9,7 +9,7 @@ minetest.register_craftitem("farming:pea_pod", { description = S("Pea Pod"), inventory_image = "farming_pea_pod.png", groups = { - compostability = 48, seed = 2, food_peas = 1, food_pea_pod = 1, flammable = 2 + compostability = 48, seed = 2, food_peas = 1, food_pea_pod = 1 }, on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:pea_1") @@ -26,7 +26,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, compostability = 65}, + groups = {compostability = 65}, on_use = minetest.item_eat(4, a.bowl) }) diff --git a/crops/pepper.lua b/crops/pepper.lua index 1b0965f..2569485 100644 --- a/crops/pepper.lua +++ b/crops/pepper.lua @@ -23,7 +23,7 @@ minetest.register_craftitem("farming:pepper", { description = S("Green Pepper"), inventory_image = "crops_pepper.png", on_use = minetest.item_eat(2), - groups = {food_pepper = 1, flammable = 3, compostability = 55} + groups = {food_pepper = 1, compostability = 55} }) farming.add_eatable("farming:pepper", 2) @@ -33,7 +33,7 @@ minetest.register_craftitem("farming:pepper_yellow", { description = S("Yellow Pepper"), inventory_image = "crops_pepper_yellow.png", on_use = minetest.item_eat(3), - groups = {food_pepper = 1, flammable = 3, compostability = 55} + groups = {food_pepper = 1, compostability = 55} }) farming.add_eatable("farming:pepper_yellow", 3) @@ -43,10 +43,10 @@ minetest.register_craftitem("farming:pepper_red", { description = S("Red Pepper"), inventory_image = "crops_pepper_red.png", on_use = minetest.item_eat(4), - groups = {food_pepper = 1, flammable = 3, compostability = 55} + groups = {food_pepper = 1, compostability = 55} }) -farming.add_eatable("farming:pepper_red", 3) +farming.add_eatable("farming:pepper_red", 4) minetest.register_craft({ output = "farming:peppercorn", diff --git a/crops/pineapple.lua b/crops/pineapple.lua index 708e35f..9b3a57e 100644 --- a/crops/pineapple.lua +++ b/crops/pineapple.lua @@ -38,7 +38,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, compostability = 45}, + groups = {food_pineapple_ring = 1, compostability = 45}, on_use = minetest.item_eat(1) }) diff --git a/crops/potato.lua b/crops/potato.lua index aeb722f..63ce789 100644 --- a/crops/potato.lua +++ b/crops/potato.lua @@ -10,7 +10,7 @@ local S = farming.translate minetest.register_craftitem("farming:potato", { description = S("Potato"), inventory_image = "farming_potato.png", - groups = {compostability = 48, seed = 2, food_potato = 1, flammable = 2}, + groups = {compostability = 48, seed = 2, food_potato = 1}, on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:potato_1") end, @@ -32,8 +32,7 @@ farming.add_eatable("farming:potato", 1) minetest.register_craftitem("farming:baked_potato", { description = S("Baked Potato"), inventory_image = "farming_baked_potato.png", - on_use = minetest.item_eat(6), - groups = {flammable = 2} + on_use = minetest.item_eat(6) }) farming.add_eatable("farming:baked_potato", 6) @@ -49,8 +48,7 @@ minetest.register_craft({ minetest.register_craftitem("farming:potato_salad", { description = S("Cucumber and Potato Salad"), inventory_image = "farming_potato_salad.png", - on_use = minetest.item_eat(10, "farming:bowl"), - groups = {flammable = 2} + on_use = minetest.item_eat(10, "farming:bowl") }) farming.add_eatable("farming:potato_salad", 10) diff --git a/crops/pumpkin.lua b/crops/pumpkin.lua index 524ea93..2d0bcda 100644 --- a/crops/pumpkin.lua +++ b/crops/pumpkin.lua @@ -6,7 +6,7 @@ minetest.register_craftitem("farming:pumpkin_slice", { description = S("Pumpkin Slice"), inventory_image = "farming_pumpkin_slice.png", groups = { - compostability = 48, seed = 2, food_pumpkin_slice = 1, flammable = 2 + compostability = 48, seed = 2, food_pumpkin_slice = 1 }, on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:pumpkin_1") @@ -130,7 +130,7 @@ minetest.register_craftitem("farming:pumpkin_bread", { description = S("Pumpkin Bread"), inventory_image = "farming_pumpkin_bread.png", on_use = minetest.item_eat(8), - groups = {food_bread = 1, flammable = 2} + groups = {food_bread = 1} }) farming.add_eatable("farming:pumpkin_bread", 8) diff --git a/crops/raspberry.lua b/crops/raspberry.lua index 8fc986b..5434a71 100644 --- a/crops/raspberry.lua +++ b/crops/raspberry.lua @@ -8,7 +8,7 @@ minetest.register_craftitem("farming:raspberries", { inventory_image = "farming_raspberries.png", groups = { compostability = 48, seed = 2, food_raspberries = 1, food_raspberry = 1, - food_berry = 1, flammable = 2 + food_berry = 1 }, on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:raspberry_1") diff --git a/crops/rhubarb.lua b/crops/rhubarb.lua index 87a250c..7304886 100644 --- a/crops/rhubarb.lua +++ b/crops/rhubarb.lua @@ -7,7 +7,7 @@ minetest.register_craftitem("farming:rhubarb", { description = S("Rhubarb"), inventory_image = "farming_rhubarb.png", groups = { - compostability = 48, seed = 2, food_rhubarb = 1, flammable = 2 + compostability = 48, seed = 2, food_rhubarb = 1 }, on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:rhubarb_1") @@ -22,7 +22,7 @@ minetest.register_craftitem("farming:rhubarb_pie", { description = S("Rhubarb Pie"), inventory_image = "farming_rhubarb_pie.png", on_use = minetest.item_eat(6), - groups = {compostability = 65, flammable = 2} + groups = {compostability = 65} }) farming.add_eatable("farming:rhubarb_pie", 6) diff --git a/crops/rice.lua b/crops/rice.lua index 6dc2d59..6cfef8a 100644 --- a/crops/rice.lua +++ b/crops/rice.lua @@ -49,7 +49,7 @@ minetest.register_craftitem("farming:rice_bread", { description = S("Rice Bread"), inventory_image = "farming_rice_bread.png", on_use = minetest.item_eat(5), - groups = {food_rice_bread = 1, flammable = 2, compostability = 65} + groups = {food_rice_bread = 1, compostability = 65} }) farming.add_eatable("farming:rice_bread", 5) diff --git a/crops/ryeoatrice.lua b/crops/ryeoatrice.lua index 81fa8db..358a7ae 100644 --- a/crops/ryeoatrice.lua +++ b/crops/ryeoatrice.lua @@ -84,7 +84,7 @@ minetest.register_craftitem("farming:bread_multigrain", { description = S("Multigrain Bread"), inventory_image = "farming_bread_multigrain.png", on_use = minetest.item_eat(7), - groups = {food_bread = 1, flammable = 2, compostability = 65} + groups = {food_bread = 1, compostability = 65} }) farming.add_eatable("farming:bread_multigrain", 7) diff --git a/crops/soy.lua b/crops/soy.lua index dee9e92..0c5a202 100644 --- a/crops/soy.lua +++ b/crops/soy.lua @@ -90,7 +90,7 @@ minetest.register_craftitem("farming:tofu", { description = S("Tofu"), inventory_image = "farming_tofu.png", groups = { - food_tofu = 1, food_meat_raw = 1, flammable = 2, compostability = 65, + food_tofu = 1, food_meat_raw = 1, compostability = 65, }, on_use = minetest.item_eat(3) }) @@ -110,7 +110,7 @@ minetest.register_craft({ minetest.register_craftitem("farming:tofu_cooked", { description = S("Cooked Tofu"), inventory_image = "farming_tofu_cooked.png", - groups = {food_meat = 1, flammable = 2, compostability = 65}, + groups = {food_meat = 1, compostability = 65}, on_use = minetest.item_eat(6) }) diff --git a/crops/spinach.lua b/crops/spinach.lua index d07bf5e..ea4019e 100644 --- a/crops/spinach.lua +++ b/crops/spinach.lua @@ -6,7 +6,7 @@ minetest.register_craftitem("farming:spinach", { description = S("Spinach"), inventory_image = "farming_spinach.png", groups = { - compostability = 48, seed = 2, food_spinach = 1, flammable = 2 + compostability = 48, seed = 2, food_spinach = 1 }, on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:spinach_1") diff --git a/crops/strawberry.lua b/crops/strawberry.lua index 77983b6..60f763d 100644 --- a/crops/strawberry.lua +++ b/crops/strawberry.lua @@ -6,7 +6,7 @@ minetest.register_craftitem(":ethereal:strawberry", { description = S("Strawberry"), inventory_image = "ethereal_strawberry.png", groups = { - compostability = 48, seed = 2, food_strawberry = 1, food_berry = 1, flammable = 2 + compostability = 48, seed = 2, food_strawberry = 1, food_berry = 1 }, on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "ethereal:strawberry_1") diff --git a/crops/sunflower.lua b/crops/sunflower.lua index 9134336..339465a 100644 --- a/crops/sunflower.lua +++ b/crops/sunflower.lua @@ -48,7 +48,7 @@ minetest.register_craftitem("farming:sunflower_seeds_toasted", { description = S("Toasted Sunflower Seeds"), inventory_image = "farming_sunflower_seeds_toasted.png", groups = { - food_sunflower_seeds_toasted = 1, flammable = 2, compostability = 65 + food_sunflower_seeds_toasted = 1, compostability = 65 }, on_use = minetest.item_eat(1) }) @@ -104,7 +104,7 @@ minetest.register_craftitem("farming:sunflower_bread", { description = S("Sunflower Seed Bread"), inventory_image = "farming_sunflower_bread.png", on_use = minetest.item_eat(8), - groups = {food_bread = 1, flammable = 2} + groups = {food_bread = 1} }) farming.add_eatable("farming:sunflower_bread", 8) diff --git a/crops/tomato.lua b/crops/tomato.lua index c1f66c7..f3a88a3 100644 --- a/crops/tomato.lua +++ b/crops/tomato.lua @@ -10,7 +10,7 @@ local S = farming.translate minetest.register_craftitem("farming:tomato", { description = S("Tomato"), inventory_image = "farming_tomato.png", - groups = {compostability = 45, seed = 2, food_tomato = 1, flammable = 2}, + groups = {compostability = 45, seed = 2, food_tomato = 1}, on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:tomato_1") end, @@ -23,7 +23,7 @@ farming.add_eatable("farming:tomato", 4) minetest.register_craftitem("farming:tomato_soup", { description = S("Tomato Soup"), inventory_image = "farming_tomato_soup.png", - groups = {flammable = 2, compostability = 65}, + groups = {compostability = 65}, on_use = minetest.item_eat(8, "farming:bowl") }) diff --git a/crops/vanilla.lua b/crops/vanilla.lua index 057f119..ed47fa7 100644 --- a/crops/vanilla.lua +++ b/crops/vanilla.lua @@ -7,7 +7,7 @@ minetest.register_craftitem("farming:vanilla", { description = S("Vanilla"), inventory_image = "farming_vanilla.png", groups = { - compostability = 48, seed = 2, food_vanilla = 1, flammable = 2 + compostability = 48, seed = 2, food_vanilla = 1 }, on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:vanilla_1") diff --git a/crops/wheat.lua b/crops/wheat.lua index 6e98bb4..f166dd3 100644 --- a/crops/wheat.lua +++ b/crops/wheat.lua @@ -102,7 +102,7 @@ minetest.register_craftitem("farming:bread", { description = S("Bread"), inventory_image = "farming_bread.png", on_use = minetest.item_eat(5), - groups = {food_bread = 1, flammable = 2} + groups = {food_bread = 1} }) farming.add_eatable("farming:bread", 5) diff --git a/food.lua b/food.lua index 8fc5422..3b57b36 100644 --- a/food.lua +++ b/food.lua @@ -308,6 +308,8 @@ minetest.register_node("farming:mayonnaise", { sounds = farming.sounds.node_sound_glass_defaults() }) +farming.add_eatable("farming:mayonnaise", 3) + minetest.register_craft({ output = "farming:mayonnaise", recipe = { diff --git a/init.lua b/init.lua index ea6a22c..9a9e51b 100644 --- a/init.lua +++ b/init.lua @@ -7,7 +7,7 @@ farming = { mod = "redo", - version = "20240726", + version = "20240727", path = minetest.get_modpath("farming"), select = { type = "fixed", @@ -777,11 +777,13 @@ function farming.add_eatable(item, hp) if def then local grps = def.groups or {} + local txt = " (" ; if hp > 0 then txt = txt .. "+" end + txt = txt .. hp .. " HP)" grps.eatable = hp ; grps.flammable = 2 if mod_tt_base == nil then - def.description = def.description .. " (♥" .. hp .. ")" + def.description = def.description .. txt end minetest.override_item(item, {description = def.description, groups = grps})