summaryrefslogtreecommitdiff
path: root/games/devtest/mods/testfood/init.lua
blob: a6236ff68c17e2c67d4e39ae392a63f014eb567f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
local S = minetest.get_translator("testfood")

minetest.register_craftitem("testfood:good1", {
	description = S("Good Food (+1)"),
	inventory_image = "testfood_good.png",
	on_use = minetest.item_eat(1),
})
minetest.register_craftitem("testfood:good5", {
	description = S("Good Food (+5)"),
	inventory_image = "testfood_good2.png",
	on_use = minetest.item_eat(5),
})

minetest.register_craftitem("testfood:bad1", {
	description = S("Bad Food (-1)"),
	inventory_image = "testfood_bad.png",
	on_use = minetest.item_eat(-1),
})
minetest.register_craftitem("testfood:bad5", {
	description = S("Bad Food (-5)"),
	inventory_image = "testfood_bad2.png",
	on_use = minetest.item_eat(-5),
})