-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.lua
187 lines (168 loc) · 5.32 KB
/
init.lua
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
minetest.register_craftitem("pizza:pizza_dough", {
description = "Pizza Dough",
inventory_image = "pizza_dough.png"
})
minetest.register_craft({
type = "shapeless",
output = "pizza:pizza_dough",
recipe = {"group:food_flour", "bucket:bucket_water", "farming:salt"},
replacements = {{"bucket:bucket_water", "bucket:bucket_empty"}}
})
minetest.register_craftitem("pizza:ketchup", {
description = "Ketchup",
inventory_image = "ketchup.png"
})
minetest.register_craft({
type = "shapeless",
output = "pizza:ketchup",
recipe = {"vessels:glass_bottle", "farming:pepper_ground", "farming:tomato"},
})
minetest.register_craftitem("pizza:uncooked_pizza", {
description = "Uncooked Pizza",
inventory_image = "uncooked_pizza.png"
})
minetest.register_craft({
type = "shapeless",
output = "pizza:uncooked_pizza",
recipe = {
"caverealms:mycena", "mobs:cheese", "caverealms:mycena",
"caverealms:mycena", "pizza:ketchup", "caverealms:mycena",
"farming:tomato", "pizza:pizza_dough", "farming:tomato"
},
replacements = {{"pizza:ketchup", "vessels:glass_bottle"}}
})
minetest.register_craft({
type = "shapeless",
output = "pizza:uncooked_pizza",
recipe = {
"flowers:mushroom_brown", "mobs:cheese", "flowers:mushroom_brown",
"flowers:mushroom_brown", "pizza:ketchup", "flowers:mushroom_brown",
"farming:tomato", "pizza:pizza_dough", "farming:tomato"
},
replacements = {{"pizza:ketchup", "vessels:glass_bottle"}}
})
minetest.register_craft({
type = "shapeless",
output = "pizza:uncooked_pizza",
recipe = {
"farming:pineapple_ring", "mobs:cheese", "farming:pineapple_ring",
"mobs:chicken_cooked", "pizza:ketchup", "mobs:chicken_cooked",
"farming:tomato", "pizza:pizza_dough", "farming:tomato"
},
replacements = {{"pizza:ketchup", "vessels:glass_bottle"}}
})
minetest.register_craft({
type = "shapeless",
output = "pizza:uncooked_pizza",
recipe = {
"farming:pepper", "mobs:cheese", "farming:pepper",
"mobs_squid:tentacle", "pizza:ketchup", "mobs_squid:tentacle",
"farming:tomato", "pizza:pizza_dough", "farming:tomato"
},
replacements = {{"pizza:ketchup", "vessels:glass_bottle"}}
})
minetest.register_craft({
type = "shapeless",
output = "pizza:uncooked_pizza",
recipe = {
"farming:chili_pepper", "mobs:cheese", "farming:chili_pepper",
"mobs:pork_cooked", "pizza:ketchup", "mobs:pork_cooked",
"farming:tomato", "pizza:pizza_dough", "farming:tomato"
},
replacements = {{"pizza:ketchup", "vessels:glass_bottle"}}
})
minetest.register_node("pizza:pizza", {
description = "Pizza",
drawtype = "signlike",
tiles = { "pizza.png" },
inventory_image = "pizza.png",
wield_image = "pizza.png",
groups = { dig_immediate=2 },
paramtype = "light",
on_use = minetest.item_eat(30),
})
minetest.register_craftitem("pizza:pizzaslice", {
description = "Pizza Slice",
inventory_image = "pizzaslice.png",
on_use = minetest.item_eat(5)
})
minetest.register_node("pizza:pizzabox", {
description = "Pizzabox",
tiles = {
"pizzabox_top.png",
"pizzabox_bottom.png",
"pizzabox_side.png",
"pizzabox_side.png",
"pizzabox_side.png",
"pizzabox_side.png",
},
inventory_image = "pizzabox_top.png",
groups = { dig_immediate=2 },
paramtype = "light",
paramtype2 = "facedir",
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {
{ -0.5, -0.5, -0.5, 0.5, -0.3, 0.5 }
}
},
on_rightclick = function(pos, node, clicker, itemstack)
node.name = "pizza:pizzabox_open"
minetest.add_node(pos, node)
end,
})
minetest.register_node("pizza:pizzabox_open", {
description = "Open Pizzabox",
tiles = {
"pizzabox_bottom.png^pizza.png",
"pizzabox_bottom.png",
"pizzabox_side.png^(pizzabox_side.png^[transformR90)",
"pizzabox_side.png^(pizzabox_side.png^[transformR90FX)",
"pizzabox_top.png^[transformFY",
"pizzabox_bottom.png^pizzabox_side.png",
},
inventory_image = "pizzabox_top.png",
groups = { dig_immediate=2, not_in_creative_inventory=1 },
paramtype = "light",
paramtype2 = "facedir",
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {
{ -0.5, -0.5, -0.5, 0.5, -0.3, 0.5 },
{ -0.5, -0.5, 0.5, 0.5, 0.5, 0.5 }
}
},
drop = "pizza:pizzabox",
on_rightclick = function(pos, node, clicker, itemstack)
node.name = "pizza:pizzabox"
minetest.add_node(pos, node)
end,
})
-- recipes
minetest.register_craft({
output = "pizza:pizza",
type = "cooking",
cooktime = 50.0,
recipe = "pizza:uncooked_pizza",
})
minetest.register_craft({
type = "shapeless",
output = "pizza:pizza",
recipe = {"pizza:pizzabox"},
})
minetest.register_craft({
type = "shapeless",
output = "pizza:pizzaslice 6",
recipe = {"pizza:pizza", "farming:cutting_board"},
replacements = {{"farming:cutting_board", "farming:cutting_board"}}
})
minetest.register_craft({
output = "pizza:pizzabox",
recipe = {
{"", "default:paper", ""},
{"default:paper", "pizza:pizza", "default:paper"},
{"", "default:paper", ""},
},
})