summaryrefslogtreecommitdiff
path: root/food.lua
diff options
context:
space:
mode:
authorTenPlus1 <kinsellaja@yahoo.com>2018-06-09 16:47:38 +0100
committerTenPlus1 <kinsellaja@yahoo.com>2018-06-09 16:47:38 +0100
commit6783670154386ae4a49ba689637fbf876349c42c (patch)
treeacd0ac0f2c120febda3512db6c1a7a392031767f /food.lua
parentaa6dc610cfd855dc2d7bf4b2d157f2e71c8fc688 (diff)
tidy and tweak code
Diffstat (limited to 'food.lua')
-rw-r--r--food.lua74
1 files changed, 74 insertions, 0 deletions
diff --git a/food.lua b/food.lua
index 777e317..f099e53 100644
--- a/food.lua
+++ b/food.lua
@@ -112,3 +112,77 @@ minetest.register_craft({
output = "farming:garlic_bread",
recipe = {"group:food_toast", "group:food_garlic_clove", "group:food_garlic_clove"},
})
+
+--= Donuts (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 = {
+ {"", "group:food_wheat", ""},
+ {"group:food_wheat", "group:food_sugar", "group:food_wheat"},
+ {"", "group:food_wheat", ""},
+ }
+})
+
+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 = {
+ {'group:food_cocoa'},
+ {'farming: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, "farming:bowl"),
+})
+
+minetest.after(0, function()
+
+ local fluid = "bucket:bucket_water"
+ local fluid_return = "bucket:bucket_water"
+
+ if minetest.get_modpath("mobs") and mobs and mobs.mod == "redo" then
+ fluid = "group:food_milk"
+ fluid_return = "mobs:bucket_milk"
+ end
+
+ minetest.register_craft({
+ type = "shapeless",
+ output = "farming:porridge",
+ recipe = {
+ "group:food_barley", "group:food_barley", "group:food_wheat",
+ "group:food_wheat", "group:food_bowl", fluid
+ },
+ replacements = {{fluid_return, "bucket:bucket_empty"}}
+ })
+end)