2024-10-28 15:57:54 +01:00
|
|
|
local S = core.get_translator("testfood")
|
2020-05-24 15:46:26 +02:00
|
|
|
|
2024-10-28 15:57:54 +01:00
|
|
|
core.register_craftitem("testfood:good1", {
|
2022-10-09 14:05:22 +02:00
|
|
|
description = S("Good Food (+1)").."\n"..
|
|
|
|
S("Punch: Eat"),
|
2020-05-24 15:46:26 +02:00
|
|
|
inventory_image = "testfood_good.png",
|
2024-10-28 15:57:54 +01:00
|
|
|
on_use = core.item_eat(1),
|
2020-05-24 15:46:26 +02:00
|
|
|
})
|
2024-10-28 15:57:54 +01:00
|
|
|
core.register_craftitem("testfood:good5", {
|
2022-10-09 14:05:22 +02:00
|
|
|
description = S("Good Food (+5)").."\n"..
|
|
|
|
S("Punch: Eat"),
|
2020-05-24 15:46:26 +02:00
|
|
|
inventory_image = "testfood_good2.png",
|
2024-10-28 15:57:54 +01:00
|
|
|
on_use = core.item_eat(5),
|
2020-05-24 15:46:26 +02:00
|
|
|
})
|
|
|
|
|
2024-10-28 15:57:54 +01:00
|
|
|
core.register_craftitem("testfood:bad1", {
|
2022-10-09 14:05:22 +02:00
|
|
|
description = S("Bad Food (-1)").."\n"..
|
|
|
|
S("Punch: Eat"),
|
2020-05-24 15:46:26 +02:00
|
|
|
inventory_image = "testfood_bad.png",
|
2024-10-28 15:57:54 +01:00
|
|
|
on_use = core.item_eat(-1),
|
2020-05-24 15:46:26 +02:00
|
|
|
})
|
2024-10-28 15:57:54 +01:00
|
|
|
core.register_craftitem("testfood:bad5", {
|
2022-10-09 14:05:22 +02:00
|
|
|
description = S("Bad Food (-5)").."\n"..
|
|
|
|
S("Punch: Eat"),
|
2020-05-24 15:46:26 +02:00
|
|
|
inventory_image = "testfood_bad2.png",
|
2024-10-28 15:57:54 +01:00
|
|
|
on_use = core.item_eat(-5),
|
2020-05-24 15:46:26 +02:00
|
|
|
})
|
|
|
|
|
2024-10-28 15:57:54 +01:00
|
|
|
core.register_craftitem("testfood:replace1", {
|
2020-12-18 19:38:39 +01:00
|
|
|
description = S("Replacing Food (+1)").."\n"..
|
2022-10-09 14:05:22 +02:00
|
|
|
S("Punch: Eat and replace with 'Good Food (+1)'"),
|
2020-12-18 19:38:39 +01:00
|
|
|
inventory_image = "testfood_replace.png",
|
2024-10-28 15:57:54 +01:00
|
|
|
on_use = core.item_eat(1, "testfood:good1"),
|
2020-12-18 19:38:39 +01:00
|
|
|
})
|
|
|
|
|