1
0
mirror of https://codeberg.org/tenplus1/mobs_animal.git synced 2024-12-22 17:00:26 +01:00

add {eatable} group to food items and update infotext

This commit is contained in:
tenplus1 2024-07-26 14:49:21 +01:00
parent 3260afbad4
commit 9cd2974533
7 changed files with 30 additions and 30 deletions

View File

@ -73,10 +73,10 @@ mobs:alias_mob("mobs:bee", "mobs_animal:bee")
-- honey
minetest.register_craftitem(":mobs:honey", {
description = S("Honey"),
description = S("Honey") .. " (♥4)",
inventory_image = "mobs_honey_inv.png",
on_use = minetest.item_eat(4),
groups = {food_honey = 1, food_sugar = 1, flammable = 1}
groups = {food_honey = 1, food_sugar = 1, flammable = 1, eatable = 4}
})

View File

@ -157,18 +157,18 @@ mobs:alias_mob("mobs:bunny", "mobs_animal:bunny") -- compatibility
-- raw rabbit
minetest.register_craftitem(":mobs:rabbit_raw", {
description = S("Raw Rabbit"),
description = S("Raw Rabbit") .. " (♥3)",
inventory_image = "mobs_rabbit_raw.png",
on_use = minetest.item_eat(3),
groups = {food_meat_raw = 1, food_rabbit_raw = 1, flammable = 2}
groups = {food_meat_raw = 1, food_rabbit_raw = 1, flammable = 2, eatable = 3}
})
-- cooked rabbit
minetest.register_craftitem(":mobs:rabbit_cooked", {
description = S("Cooked Rabbit"),
description = S("Cooked Rabbit") .. " (♥5)",
inventory_image = "mobs_rabbit_cooked.png",
on_use = minetest.item_eat(5),
groups = {food_meat = 1, food_rabbit = 1, flammable = 2}
groups = {food_meat = 1, food_rabbit = 1, flammable = 2, eatable = 5}
})
minetest.register_craft({

View File

@ -270,10 +270,10 @@ minetest.register_node(":mobs:egg", {
-- fried egg
minetest.register_craftitem(":mobs:chicken_egg_fried", {
description = S("Fried Egg"),
description = S("Fried Egg") .. " (♥2)",
inventory_image = "mobs_chicken_egg_fried.png",
on_use = minetest.item_eat(2),
groups = {food_egg_fried = 1, flammable = 2}
groups = {food_egg_fried = 1, flammable = 2, eatable = 2}
})
minetest.register_craft({
@ -284,18 +284,18 @@ minetest.register_craft({
-- raw chicken
minetest.register_craftitem(":mobs:chicken_raw", {
description = S("Raw Chicken"),
description = S("Raw Chicken") .. " (♥2)",
inventory_image = "mobs_chicken_raw.png",
on_use = minetest.item_eat(2),
groups = {food_meat_raw = 1, food_chicken_raw = 1, flammable = 2}
groups = {food_meat_raw = 1, food_chicken_raw = 1, flammable = 2, eatable = 2}
})
-- cooked chicken
minetest.register_craftitem(":mobs:chicken_cooked", {
description = S("Cooked Chicken"),
description = S("Cooked Chicken") .. " (♥6)",
inventory_image = "mobs_chicken_cooked.png",
on_use = minetest.item_eat(6),
groups = {food_meat = 1, food_chicken = 1, flammable = 2}
groups = {food_meat = 1, food_chicken = 1, flammable = 2, eatable = 6}
})
minetest.register_craft({

16
cow.lua
View File

@ -173,19 +173,19 @@ mobs:alias_mob("mobs:cow", "mobs_animal:cow") -- compatibility
-- bucket of milk
minetest.register_craftitem(":mobs:bucket_milk", {
description = S("Bucket of Milk"),
description = S("Bucket of Milk") .. " (♥8)",
inventory_image = "mobs_bucket_milk.png",
stack_max = 1,
on_use = minetest.item_eat(8, "bucket:bucket_empty"),
groups = {food_milk = 1, flammable = 3, drink = 1}
groups = {food_milk = 1, flammable = 3, drink = 1, eatable = 8}
})
-- glass of milk
minetest.register_craftitem(":mobs:glass_milk", {
description = S("Glass of Milk"),
description = S("Glass of Milk") .. " (♥2)",
inventory_image = "mobs_glass_milk.png",
on_use = minetest.item_eat(2, "vessels:drinking_glass"),
groups = {food_milk_glass = 1, flammable = 3, vessel = 1, drink = 1}
groups = {food_milk_glass = 1, flammable = 3, vessel = 1, drink = 1, eatable = 2}
})
minetest.register_craft({
@ -213,10 +213,10 @@ minetest.register_craft({
-- butter
minetest.register_craftitem(":mobs:butter", {
description = S("Butter"),
description = S("Butter") .. " (♥1)",
inventory_image = "mobs_butter.png",
on_use = minetest.item_eat(1),
groups = {food_butter = 1, flammable = 2}
groups = {food_butter = 1, flammable = 2, eatable = 1}
})
local salt_item = "default:sapling" -- some saplings are high in sodium
@ -233,10 +233,10 @@ minetest.register_craft({
-- cheese wedge
minetest.register_craftitem(":mobs:cheese", {
description = S("Cheese"),
description = S("Cheese") .. " (♥4)",
inventory_image = "mobs_cheese.png",
on_use = minetest.item_eat(4),
groups = {food_cheese = 1, flammable = 2}
groups = {food_cheese = 1, flammable = 2, eatable = 4}
})
minetest.register_craft({

View File

@ -92,10 +92,10 @@ mobs:alias_mob("mobs:rat", "mobs_animal:rat") -- compatibility
-- cooked rat, yummy!
minetest.register_craftitem(":mobs:rat_cooked", {
description = S("Cooked Rat"),
description = S("Cooked Rat") .. " (♥3)",
inventory_image = "mobs_cooked_rat.png",
on_use = minetest.item_eat(3),
groups = {food_rat = 1, flammable = 2}
groups = {food_rat = 1, flammable = 2, eatable = 3}
})
minetest.register_craft({

View File

@ -515,18 +515,18 @@ mobs:alias_mob("mobs:sheep", "mobs_animal:sheep_white") -- compatibility
-- raw mutton
minetest.register_craftitem(":mobs:mutton_raw", {
description = S("Raw Mutton"),
description = S("Raw Mutton") .. " (♥2)",
inventory_image = "mobs_mutton_raw.png",
on_use = minetest.item_eat(2),
groups = {food_meat_raw = 1, food_mutton_raw = 1, flammable = 2}
groups = {food_meat_raw = 1, food_mutton_raw = 1, flammable = 2, eatable = 2}
})
-- cooked mutton
minetest.register_craftitem(":mobs:mutton_cooked", {
description = S("Cooked Mutton"),
description = S("Cooked Mutton") .. " (♥6)",
inventory_image = "mobs_mutton_cooked.png",
on_use = minetest.item_eat(6),
groups = {food_meat = 1, food_mutton = 1, flammable = 2}
groups = {food_meat = 1, food_mutton = 1, flammable = 2, eatable = 6}
})
minetest.register_craft({

View File

@ -104,18 +104,18 @@ mobs:alias_mob("mobs:pumba", "mobs_animal:pumba") -- compatibility
-- raw porkchop
minetest.register_craftitem(":mobs:pork_raw", {
description = S("Raw Porkchop"),
description = S("Raw Porkchop") .. " (♥4)",
inventory_image = "mobs_pork_raw.png",
on_use = minetest.item_eat(4),
groups = {food_meat_raw = 1, food_pork_raw = 1, flammable = 2}
groups = {food_meat_raw = 1, food_pork_raw = 1, flammable = 2, eatable = 4}
})
-- cooked porkchop
minetest.register_craftitem(":mobs:pork_cooked", {
description = S("Cooked Porkchop"),
description = S("Cooked Porkchop") .. " (♥8)",
inventory_image = "mobs_pork_cooked.png",
on_use = minetest.item_eat(8),
groups = {food_meat = 1, food_pork = 1, flammable = 2}
groups = {food_meat = 1, food_pork = 1, flammable = 2, eatable = 8}
})
minetest.register_craft({