|
@@ -9,6 +9,10 @@
|
9
|
9
|
|
10
|
10
|
print("Sweet Foods - Version 0.1")
|
11
|
11
|
|
|
12
|
+if not food or not food.version or food.version < 2.1 then
|
|
13
|
+ error("You need to update your version of the Food mod - it is too old")
|
|
14
|
+end
|
|
15
|
+
|
12
|
16
|
-- Boilerplate to support localized strings if intllib mod is installed.
|
13
|
17
|
local S
|
14
|
18
|
if (minetest.get_modpath("intllib")) then
|
|
@@ -20,13 +24,13 @@ end
|
20
|
24
|
|
21
|
25
|
food.support("strawberry","farming_plus","farming_plus:strawberry_item")
|
22
|
26
|
food.support("strawberry","plantlib","plantlib:strawberry")
|
|
27
|
+food.support("strawberry","bushes_classic","bushes:strawberry")
|
23
|
28
|
food.support("rhubarb","farming_plus","farming_plus:rhubarb_item")
|
24
|
29
|
|
25
|
30
|
if minetest.setting_get("food_sweet_use_2d")==nil then
|
26
|
31
|
minetest.setting_set("food_sweet_use_2d", "1")
|
27
|
32
|
end
|
28
|
33
|
|
29
|
|
-
|
30
|
34
|
food.asupport("walnut",function()
|
31
|
35
|
minetest.register_craftitem("food_sweet:walnut", {
|
32
|
36
|
description = S("Walnut"),
|
|
@@ -36,9 +40,9 @@ food.asupport("walnut",function()
|
36
|
40
|
food.craft({
|
37
|
41
|
output = "food_sweet:walnut 4",
|
38
|
42
|
recipe = {
|
39
|
|
- {"","default:sand",""},
|
40
|
43
|
{"default:sand","","default:sand"},
|
41
|
|
- {"","default:sand",""}
|
|
44
|
+ {"","default:sand",""},
|
|
45
|
+ {"default:sand","","default:sand"}
|
42
|
46
|
}
|
43
|
47
|
})
|
44
|
48
|
end)
|
|
@@ -79,7 +83,7 @@ food.asupport("rhubarb",function()
|
79
|
83
|
groups = {food_rhubarb = 1}
|
80
|
84
|
})
|
81
|
85
|
food.craft({
|
82
|
|
- output = "food_sweet:rhubarb 4",
|
|
86
|
+ output = "food_sweet:rhubarb 10",
|
83
|
87
|
recipe = {
|
84
|
88
|
{"wool:red"},
|
85
|
89
|
{"wool:red"},
|
|
@@ -87,6 +91,21 @@ food.asupport("rhubarb",function()
|
87
|
91
|
}
|
88
|
92
|
})
|
89
|
93
|
end)
|
|
94
|
+food.asupport("lemon",function()
|
|
95
|
+ minetest.register_craftitem("food_sweet:lemon", {
|
|
96
|
+ description = S("Lemon"),
|
|
97
|
+ inventory_image = "food_lemon.png",
|
|
98
|
+ groups = {food_lemon = 1}
|
|
99
|
+ })
|
|
100
|
+ food.craft({
|
|
101
|
+ output = "food_sweet:lemon 4",
|
|
102
|
+ recipe = {
|
|
103
|
+ {"","default:sand",""},
|
|
104
|
+ {"default:sand","","default:sand"},
|
|
105
|
+ {"","default:sand",""}
|
|
106
|
+ }
|
|
107
|
+ })
|
|
108
|
+end)
|
90
|
109
|
|
91
|
110
|
-- Walnut and Coffee cake
|
92
|
111
|
food.register("food_sweet:cake_walnut_coffee",{
|
|
@@ -142,7 +161,7 @@ minetest.register_craftitem("food_sweet:cake_cheese",{
|
142
|
161
|
description = S("Strawberry Cheese Cake"),
|
143
|
162
|
inventory_image = "food_sweet_cake_cheese.png",
|
144
|
163
|
on_use = food.item_eat(4),
|
145
|
|
- groups={food=3,crumbly=3}
|
|
164
|
+ groups={food=3}
|
146
|
165
|
})
|
147
|
166
|
minetest.register_craftitem("food_sweet:cakemix_cheese",{
|
148
|
167
|
description = S("Strawberry Cheese Cake Mix"),
|
|
@@ -167,7 +186,7 @@ minetest.register_craftitem("food_sweet:cake_cheese_blueberry",{
|
167
|
186
|
description = S("Blueberry Cheese Cake"),
|
168
|
187
|
inventory_image = "food_sweet_cake_cheese_blueberry.png",
|
169
|
188
|
on_use = food.item_eat(4),
|
170
|
|
- groups={food=3,crumbly=3}
|
|
189
|
+ groups={food=3}
|
171
|
190
|
})
|
172
|
191
|
minetest.register_craftitem("food_sweet:cakemix_cheese_blueberry",{
|
173
|
192
|
description = S("Blueberry Cheese Cake Mix"),
|
|
@@ -192,7 +211,7 @@ minetest.register_craftitem("food_sweet:cake_triple_choco",{
|
192
|
211
|
description = S("Triple Chocolate Cake"),
|
193
|
212
|
inventory_image = "food_sweet_cake_triple_choco.png",
|
194
|
213
|
on_use = food.item_eat(4),
|
195
|
|
- groups={food=3,crumbly=3}
|
|
214
|
+ groups={food=3}
|
196
|
215
|
})
|
197
|
216
|
minetest.register_craftitem("food_sweet:cakemix_triple_choco",{
|
198
|
217
|
description = S("Triple Chocolate Cake Mix"),
|
|
@@ -217,7 +236,7 @@ minetest.register_craftitem("food_sweet:cake_wedding",{
|
217
|
236
|
description = S("Wedding Cake"),
|
218
|
237
|
inventory_image = "food_sweet_cake_wedding.png",
|
219
|
238
|
on_use = food.item_eat(4),
|
220
|
|
- groups={food=3,crumbly=3}
|
|
239
|
+ groups={food=3}
|
221
|
240
|
})
|
222
|
241
|
|
223
|
242
|
food.craft({
|
|
@@ -234,7 +253,7 @@ minetest.register_craftitem("food_sweet:crumble_rhubarb",{
|
234
|
253
|
description = S("Rhubarb Crumble"),
|
235
|
254
|
inventory_image = "food_sweet_crumble_rhubarb.png",
|
236
|
255
|
on_use = food.item_eat(4),
|
237
|
|
- groups={food=3,crumbly=3}
|
|
256
|
+ groups={food=3}
|
238
|
257
|
})
|
239
|
258
|
minetest.register_craftitem("food_sweet:crumble_rhubarb_raw",{
|
240
|
259
|
description = S("Raw Rhubarb Crumble"),
|
|
@@ -253,3 +272,134 @@ food.craft({
|
253
|
272
|
{"group:food_flour","group:food_sugar","group:food_egg"}
|
254
|
273
|
}
|
255
|
274
|
})
|
|
275
|
+
|
|
276
|
+-- Cup cake
|
|
277
|
+minetest.register_craftitem("food_sweet:cupcake",{
|
|
278
|
+ description = S("Cupcake"),
|
|
279
|
+ inventory_image = "food_sweet_cupcake.png",
|
|
280
|
+ on_use = food.item_eat(2),
|
|
281
|
+ groups={food=1}
|
|
282
|
+})
|
|
283
|
+minetest.register_craftitem("food_sweet:cupcake_mix",{
|
|
284
|
+ description = S("Cupcake Mix"),
|
|
285
|
+ inventory_image = "food_sweet_cupcake_mix.png"
|
|
286
|
+})
|
|
287
|
+food.craft({
|
|
288
|
+ type = "cooking",
|
|
289
|
+ output = "food_sweet:cupcake",
|
|
290
|
+ recipe = "food_sweet:cupcake_mix",
|
|
291
|
+ cooktime = 1
|
|
292
|
+})
|
|
293
|
+food.craft({
|
|
294
|
+ output = "food_sweet:cupcake_mix 6",
|
|
295
|
+ recipe = {
|
|
296
|
+ {"group:food_flour","","group:food_egg"},
|
|
297
|
+ {"","group:food_sugar",""}
|
|
298
|
+ }
|
|
299
|
+})
|
|
300
|
+
|
|
301
|
+-- Chocolate Cupcake
|
|
302
|
+minetest.register_craftitem("food_sweet:cupcake_choco",{
|
|
303
|
+ description = S("Chocolate Cupcake"),
|
|
304
|
+ inventory_image = "food_sweet_cupcake_choco.png",
|
|
305
|
+ on_use = food.item_eat(2),
|
|
306
|
+ groups={food=1}
|
|
307
|
+})
|
|
308
|
+minetest.register_craftitem("food_sweet:cupcake_choco_mix",{
|
|
309
|
+ description = S("Chocolate Cupcake Mix"),
|
|
310
|
+ inventory_image = "food_sweet_cupcake_choco_mix.png"
|
|
311
|
+})
|
|
312
|
+food.craft({
|
|
313
|
+ type = "cooking",
|
|
314
|
+ output = "food_sweet:cupcake_choco",
|
|
315
|
+ recipe = "food_sweet:cupcake_choco_mix",
|
|
316
|
+ cooktime = 1
|
|
317
|
+})
|
|
318
|
+food.craft({
|
|
319
|
+ output = "food_sweet:cupcake_choco_mix 6",
|
|
320
|
+ recipe = {
|
|
321
|
+ {"group:food_flour","group:food_milk_chocolate","group:food_egg"},
|
|
322
|
+ {"","group:food_sugar",""}
|
|
323
|
+ }
|
|
324
|
+})
|
|
325
|
+
|
|
326
|
+-- Fairy Cake
|
|
327
|
+minetest.register_craftitem("food_sweet:cupcake_fairy",{
|
|
328
|
+ description = S("Fairy Cake"),
|
|
329
|
+ inventory_image = "food_sweet_cupcake_fairy.png",
|
|
330
|
+ on_use = food.item_eat(2),
|
|
331
|
+ groups={food=1}
|
|
332
|
+})
|
|
333
|
+food.craft({
|
|
334
|
+ output = "food_sweet:cupcake_fairy",
|
|
335
|
+ recipe = {
|
|
336
|
+ {"group:food_sugar"},
|
|
337
|
+ {"food_sweet:cupcake"}
|
|
338
|
+ }
|
|
339
|
+})
|
|
340
|
+
|
|
341
|
+-- Lemon Cake
|
|
342
|
+minetest.register_craftitem("food_sweet:cupcake_lemon",{
|
|
343
|
+ description = S("Lemon Drizzle Cupcake"),
|
|
344
|
+ inventory_image = "food_sweet_cupcake_lemon.png",
|
|
345
|
+ on_use = food.item_eat(2),
|
|
346
|
+ groups={food=1}
|
|
347
|
+})
|
|
348
|
+food.craft({
|
|
349
|
+ output = "food_sweet:cupcake_lemon",
|
|
350
|
+ recipe = {
|
|
351
|
+ {"group:food_lemon"},
|
|
352
|
+ {"food_sweet:cupcake"}
|
|
353
|
+ }
|
|
354
|
+})
|
|
355
|
+
|
|
356
|
+-- Blueberry Muffin
|
|
357
|
+minetest.register_craftitem("food_sweet:muffin_blueberry",{
|
|
358
|
+ description = S("Blueberry Muffin"),
|
|
359
|
+ inventory_image = "food_sweet_muffin_blueberry.png",
|
|
360
|
+ on_use = food.item_eat(2),
|
|
361
|
+ groups={food=1}
|
|
362
|
+})
|
|
363
|
+minetest.register_craftitem("food_sweet:muffin_blueberry_mix",{
|
|
364
|
+ description = S("Blueberry Muffin Mix"),
|
|
365
|
+ inventory_image = "food_sweet_cupcake_mix.png"
|
|
366
|
+})
|
|
367
|
+food.craft({
|
|
368
|
+ type = "cooking",
|
|
369
|
+ output = "food_sweet:muffin_blueberry",
|
|
370
|
+ recipe = "food_sweet:muffin_blueberry_mix",
|
|
371
|
+ cooktime = 1
|
|
372
|
+})
|
|
373
|
+food.craft({
|
|
374
|
+ output = "food_sweet:muffin_blueberry_mix 6",
|
|
375
|
+ recipe = {
|
|
376
|
+ {"group:food_flour","group:food_blueberry","group:food_egg"},
|
|
377
|
+ {"","group:food_sugar",""}
|
|
378
|
+ }
|
|
379
|
+})
|
|
380
|
+
|
|
381
|
+-- Chocolate Chip Muffin
|
|
382
|
+minetest.register_craftitem("food_sweet:muffin_choco",{
|
|
383
|
+ description = S("Chocolate Chip Muffin"),
|
|
384
|
+ inventory_image = "food_sweet_muffin_choco.png",
|
|
385
|
+ on_use = food.item_eat(2),
|
|
386
|
+ groups={food=1}
|
|
387
|
+})
|
|
388
|
+minetest.register_craftitem("food_sweet:muffin_choco_mix",{
|
|
389
|
+ description = S("Chocolate Chip Muffin Mix"),
|
|
390
|
+ inventory_image = "food_sweet_cupcake_choco_mix.png"
|
|
391
|
+})
|
|
392
|
+food.craft({
|
|
393
|
+ type = "cooking",
|
|
394
|
+ output = "food_sweet:muffin_choco",
|
|
395
|
+ recipe = "food_sweet:muffin_choco_mix",
|
|
396
|
+ cooktime = 1
|
|
397
|
+})
|
|
398
|
+food.craft({
|
|
399
|
+ output = "food_sweet:muffin_choco_mix 6",
|
|
400
|
+ recipe = {
|
|
401
|
+ {"","group:food_milk_chocolate",""},
|
|
402
|
+ {"group:food_flour","group:food_milk_chocolate","group:food_egg"},
|
|
403
|
+ {"","group:food_sugar",""}
|
|
404
|
+ }
|
|
405
|
+})
|