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:
parent
3260afbad4
commit
9cd2974533
4
bee.lua
4
bee.lua
@ -73,10 +73,10 @@ mobs:alias_mob("mobs:bee", "mobs_animal:bee")
|
|||||||
|
|
||||||
-- honey
|
-- honey
|
||||||
minetest.register_craftitem(":mobs:honey", {
|
minetest.register_craftitem(":mobs:honey", {
|
||||||
description = S("Honey"),
|
description = S("Honey") .. " (♥4)",
|
||||||
inventory_image = "mobs_honey_inv.png",
|
inventory_image = "mobs_honey_inv.png",
|
||||||
on_use = minetest.item_eat(4),
|
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}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
@ -157,18 +157,18 @@ mobs:alias_mob("mobs:bunny", "mobs_animal:bunny") -- compatibility
|
|||||||
|
|
||||||
-- raw rabbit
|
-- raw rabbit
|
||||||
minetest.register_craftitem(":mobs:rabbit_raw", {
|
minetest.register_craftitem(":mobs:rabbit_raw", {
|
||||||
description = S("Raw Rabbit"),
|
description = S("Raw Rabbit") .. " (♥3)",
|
||||||
inventory_image = "mobs_rabbit_raw.png",
|
inventory_image = "mobs_rabbit_raw.png",
|
||||||
on_use = minetest.item_eat(3),
|
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
|
-- cooked rabbit
|
||||||
minetest.register_craftitem(":mobs:rabbit_cooked", {
|
minetest.register_craftitem(":mobs:rabbit_cooked", {
|
||||||
description = S("Cooked Rabbit"),
|
description = S("Cooked Rabbit") .. " (♥5)",
|
||||||
inventory_image = "mobs_rabbit_cooked.png",
|
inventory_image = "mobs_rabbit_cooked.png",
|
||||||
on_use = minetest.item_eat(5),
|
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({
|
minetest.register_craft({
|
||||||
|
12
chicken.lua
12
chicken.lua
@ -270,10 +270,10 @@ minetest.register_node(":mobs:egg", {
|
|||||||
|
|
||||||
-- fried egg
|
-- fried egg
|
||||||
minetest.register_craftitem(":mobs:chicken_egg_fried", {
|
minetest.register_craftitem(":mobs:chicken_egg_fried", {
|
||||||
description = S("Fried Egg"),
|
description = S("Fried Egg") .. " (♥2)",
|
||||||
inventory_image = "mobs_chicken_egg_fried.png",
|
inventory_image = "mobs_chicken_egg_fried.png",
|
||||||
on_use = minetest.item_eat(2),
|
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({
|
minetest.register_craft({
|
||||||
@ -284,18 +284,18 @@ minetest.register_craft({
|
|||||||
|
|
||||||
-- raw chicken
|
-- raw chicken
|
||||||
minetest.register_craftitem(":mobs:chicken_raw", {
|
minetest.register_craftitem(":mobs:chicken_raw", {
|
||||||
description = S("Raw Chicken"),
|
description = S("Raw Chicken") .. " (♥2)",
|
||||||
inventory_image = "mobs_chicken_raw.png",
|
inventory_image = "mobs_chicken_raw.png",
|
||||||
on_use = minetest.item_eat(2),
|
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
|
-- cooked chicken
|
||||||
minetest.register_craftitem(":mobs:chicken_cooked", {
|
minetest.register_craftitem(":mobs:chicken_cooked", {
|
||||||
description = S("Cooked Chicken"),
|
description = S("Cooked Chicken") .. " (♥6)",
|
||||||
inventory_image = "mobs_chicken_cooked.png",
|
inventory_image = "mobs_chicken_cooked.png",
|
||||||
on_use = minetest.item_eat(6),
|
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({
|
minetest.register_craft({
|
||||||
|
16
cow.lua
16
cow.lua
@ -173,19 +173,19 @@ mobs:alias_mob("mobs:cow", "mobs_animal:cow") -- compatibility
|
|||||||
|
|
||||||
-- bucket of milk
|
-- bucket of milk
|
||||||
minetest.register_craftitem(":mobs:bucket_milk", {
|
minetest.register_craftitem(":mobs:bucket_milk", {
|
||||||
description = S("Bucket of Milk"),
|
description = S("Bucket of Milk") .. " (♥8)",
|
||||||
inventory_image = "mobs_bucket_milk.png",
|
inventory_image = "mobs_bucket_milk.png",
|
||||||
stack_max = 1,
|
stack_max = 1,
|
||||||
on_use = minetest.item_eat(8, "bucket:bucket_empty"),
|
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
|
-- glass of milk
|
||||||
minetest.register_craftitem(":mobs:glass_milk", {
|
minetest.register_craftitem(":mobs:glass_milk", {
|
||||||
description = S("Glass of Milk"),
|
description = S("Glass of Milk") .. " (♥2)",
|
||||||
inventory_image = "mobs_glass_milk.png",
|
inventory_image = "mobs_glass_milk.png",
|
||||||
on_use = minetest.item_eat(2, "vessels:drinking_glass"),
|
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({
|
minetest.register_craft({
|
||||||
@ -213,10 +213,10 @@ minetest.register_craft({
|
|||||||
|
|
||||||
-- butter
|
-- butter
|
||||||
minetest.register_craftitem(":mobs:butter", {
|
minetest.register_craftitem(":mobs:butter", {
|
||||||
description = S("Butter"),
|
description = S("Butter") .. " (♥1)",
|
||||||
inventory_image = "mobs_butter.png",
|
inventory_image = "mobs_butter.png",
|
||||||
on_use = minetest.item_eat(1),
|
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
|
local salt_item = "default:sapling" -- some saplings are high in sodium
|
||||||
@ -233,10 +233,10 @@ minetest.register_craft({
|
|||||||
|
|
||||||
-- cheese wedge
|
-- cheese wedge
|
||||||
minetest.register_craftitem(":mobs:cheese", {
|
minetest.register_craftitem(":mobs:cheese", {
|
||||||
description = S("Cheese"),
|
description = S("Cheese") .. " (♥4)",
|
||||||
inventory_image = "mobs_cheese.png",
|
inventory_image = "mobs_cheese.png",
|
||||||
on_use = minetest.item_eat(4),
|
on_use = minetest.item_eat(4),
|
||||||
groups = {food_cheese = 1, flammable = 2}
|
groups = {food_cheese = 1, flammable = 2, eatable = 4}
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
|
4
rat.lua
4
rat.lua
@ -92,10 +92,10 @@ mobs:alias_mob("mobs:rat", "mobs_animal:rat") -- compatibility
|
|||||||
|
|
||||||
-- cooked rat, yummy!
|
-- cooked rat, yummy!
|
||||||
minetest.register_craftitem(":mobs:rat_cooked", {
|
minetest.register_craftitem(":mobs:rat_cooked", {
|
||||||
description = S("Cooked Rat"),
|
description = S("Cooked Rat") .. " (♥3)",
|
||||||
inventory_image = "mobs_cooked_rat.png",
|
inventory_image = "mobs_cooked_rat.png",
|
||||||
on_use = minetest.item_eat(3),
|
on_use = minetest.item_eat(3),
|
||||||
groups = {food_rat = 1, flammable = 2}
|
groups = {food_rat = 1, flammable = 2, eatable = 3}
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
|
@ -515,18 +515,18 @@ mobs:alias_mob("mobs:sheep", "mobs_animal:sheep_white") -- compatibility
|
|||||||
|
|
||||||
-- raw mutton
|
-- raw mutton
|
||||||
minetest.register_craftitem(":mobs:mutton_raw", {
|
minetest.register_craftitem(":mobs:mutton_raw", {
|
||||||
description = S("Raw Mutton"),
|
description = S("Raw Mutton") .. " (♥2)",
|
||||||
inventory_image = "mobs_mutton_raw.png",
|
inventory_image = "mobs_mutton_raw.png",
|
||||||
on_use = minetest.item_eat(2),
|
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
|
-- cooked mutton
|
||||||
minetest.register_craftitem(":mobs:mutton_cooked", {
|
minetest.register_craftitem(":mobs:mutton_cooked", {
|
||||||
description = S("Cooked Mutton"),
|
description = S("Cooked Mutton") .. " (♥6)",
|
||||||
inventory_image = "mobs_mutton_cooked.png",
|
inventory_image = "mobs_mutton_cooked.png",
|
||||||
on_use = minetest.item_eat(6),
|
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({
|
minetest.register_craft({
|
||||||
|
@ -104,18 +104,18 @@ mobs:alias_mob("mobs:pumba", "mobs_animal:pumba") -- compatibility
|
|||||||
|
|
||||||
-- raw porkchop
|
-- raw porkchop
|
||||||
minetest.register_craftitem(":mobs:pork_raw", {
|
minetest.register_craftitem(":mobs:pork_raw", {
|
||||||
description = S("Raw Porkchop"),
|
description = S("Raw Porkchop") .. " (♥4)",
|
||||||
inventory_image = "mobs_pork_raw.png",
|
inventory_image = "mobs_pork_raw.png",
|
||||||
on_use = minetest.item_eat(4),
|
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
|
-- cooked porkchop
|
||||||
minetest.register_craftitem(":mobs:pork_cooked", {
|
minetest.register_craftitem(":mobs:pork_cooked", {
|
||||||
description = S("Cooked Porkchop"),
|
description = S("Cooked Porkchop") .. " (♥8)",
|
||||||
inventory_image = "mobs_pork_cooked.png",
|
inventory_image = "mobs_pork_cooked.png",
|
||||||
on_use = minetest.item_eat(8),
|
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({
|
minetest.register_craft({
|
||||||
|
Loading…
Reference in New Issue
Block a user