summaryrefslogtreecommitdiff
path: root/farming/donut.lua
blob: be2e9b80ef11785d8ac2b4bed613bf4e2cb044cf (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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81

local S = farming.intllib

-- Donut (thanks to Bockwurst for making the donut images)
minetest.register_craftitem("farming:donut", {
	description = S("Donut"),
	inventory_image = "farming_donut.png",
	on_use = minetest.item_eat(4),
})

minetest.register_craft({
	output = "farming:donut 3",
	recipe = {
		{'', 'farming:wheat', ''},
		{'farming:wheat', 'farming:sugar', 'farming:wheat'},
		{'', 'farming:wheat', ''},
	}
})

-- Chocolate Donut
minetest.register_craftitem("farming:donut_chocolate", {
	description = S("Chocolate Donut"),
	inventory_image = "farming_donut_chocolate.png",
	on_use = minetest.item_eat(6),
})

minetest.register_craft({
	output = "farming:donut_chocolate",
	recipe = {
		{'farming:cocoa_beans'},
		{'farming:donut'},
	}
})

-- Apple Donut
minetest.register_craftitem("farming:donut_apple", {
	description = S("Apple Donut"),
	inventory_image = "farming_donut_apple.png",
	on_use = minetest.item_eat(6),
})

minetest.register_craft({
	output = "farming:donut_apple",
	recipe = {
		{'default:apple'},
		{'farming:donut'},
	}
})

-- Porridge Oats
minetest.register_craftitem("farming:porridge", {
	description = S("Porridge"),
	inventory_image = "farming_porridge.png",
	on_use = minetest.item_eat(6),
})

minetest.after(0, function()

	if minetest.get_modpath("mobs") and mobs and mobs.mod == "redo" then

	minetest.register_craft({
		output = "farming:porridge",
		type = "shapeless",
		recipe = {
			"farming:barley", "farming:barley", "farming:wheat",
			"farming:wheat", "mobs:bucket_milk"
		},
		replacements = {{"mobs:bucket_milk", "bucket:bucket_empty"}}
	})
else
	minetest.register_craft({
		output = "farming:porridge",
		type = "shapeless",
		recipe = {
			"farming:barley", "farming:barley", "farming:wheat",
			"farming:wheat", "bucket:bucket_water"
		},
		replacements = {{"bucket:bucket_water", "bucket:bucket_empty"}}
	})
	end
end)