2018-05-31 10:36:29 +02:00
|
|
|
|
|
|
|
local S = farming.intllib
|
|
|
|
|
|
|
|
--= Sugar
|
|
|
|
|
|
|
|
minetest.register_craftitem("farming:sugar", {
|
|
|
|
description = S("Sugar"),
|
|
|
|
inventory_image = "farming_sugar.png",
|
2020-07-02 15:31:12 +02:00
|
|
|
groups = {food_sugar = 1, flammable = 3}
|
2018-05-31 10:36:29 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
type = "cooking",
|
|
|
|
cooktime = 3,
|
|
|
|
output = "farming:sugar 2",
|
2020-07-02 15:31:12 +02:00
|
|
|
recipe = "default:papyrus"
|
2018-05-31 10:36:29 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
--= Salt
|
|
|
|
|
|
|
|
minetest.register_node("farming:salt", {
|
2020-04-26 16:41:39 +02:00
|
|
|
description = S("Salt"),
|
2018-05-31 10:36:29 +02:00
|
|
|
inventory_image = "farming_salt.png",
|
|
|
|
wield_image = "farming_salt.png",
|
|
|
|
drawtype = "plantlike",
|
|
|
|
visual_scale = 0.8,
|
|
|
|
paramtype = "light",
|
|
|
|
tiles = {"farming_salt.png"},
|
|
|
|
groups = {food_salt = 1, vessel = 1, dig_immediate = 3,
|
|
|
|
attached_node = 1},
|
|
|
|
sounds = default.node_sound_defaults(),
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25}
|
2020-07-02 15:31:12 +02:00
|
|
|
}
|
2018-05-31 10:36:29 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
type = "cooking",
|
|
|
|
cooktime = 15,
|
|
|
|
output = "farming:salt",
|
|
|
|
recipe = "bucket:bucket_water",
|
|
|
|
replacements = {{"bucket:bucket_water", "bucket:bucket_empty"}}
|
|
|
|
})
|
|
|
|
|
|
|
|
--= Rose Water
|
|
|
|
|
|
|
|
minetest.register_node("farming:rose_water", {
|
2020-04-26 16:41:39 +02:00
|
|
|
description = S("Rose Water"),
|
2018-05-31 10:36:29 +02:00
|
|
|
inventory_image = "farming_rose_water.png",
|
2018-05-31 10:39:30 +02:00
|
|
|
wield_image = "farming_rose_water.png",
|
2018-05-31 10:36:29 +02:00
|
|
|
drawtype = "plantlike",
|
|
|
|
visual_scale = 0.8,
|
|
|
|
paramtype = "light",
|
|
|
|
tiles = {"farming_rose_water.png"},
|
|
|
|
groups = {food_rose_water = 1, vessel = 1, dig_immediate = 3,
|
|
|
|
attached_node = 1},
|
|
|
|
sounds = default.node_sound_defaults(),
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25}
|
2020-07-02 15:31:12 +02:00
|
|
|
}
|
2018-05-31 10:36:29 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "farming:rose_water",
|
|
|
|
recipe = {
|
|
|
|
{"flowers:rose", "flowers:rose", "flowers:rose"},
|
|
|
|
{"flowers:rose", "flowers:rose", "flowers:rose"},
|
2020-09-04 16:05:09 +02:00
|
|
|
{"group:water_bucket", "group:food_pot", "vessels:glass_bottle"}
|
2018-05-31 10:36:29 +02:00
|
|
|
},
|
|
|
|
replacements = {
|
2020-09-04 16:05:09 +02:00
|
|
|
{"group:water_bucket", "bucket:bucket_empty"},
|
2020-07-02 15:31:12 +02:00
|
|
|
{"group:food_pot", "farming:pot"}
|
2018-05-31 10:36:29 +02:00
|
|
|
}
|
|
|
|
})
|
|
|
|
|
2020-09-04 16:05:09 +02:00
|
|
|
if minetest.get_modpath("bucket_wooden") then
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "farming:rose_water",
|
|
|
|
recipe = {
|
|
|
|
{"flowers:rose", "flowers:rose", "flowers:rose"},
|
|
|
|
{"flowers:rose", "flowers:rose", "flowers:rose"},
|
|
|
|
{"group:water_bucket_wooden", "group:food_pot", "vessels:glass_bottle"}
|
|
|
|
},
|
|
|
|
replacements = {
|
|
|
|
{"group:water_bucket_wooden", "bucket_wooden:bucket_empty"},
|
|
|
|
{"group:food_pot", "farming:pot"}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
end
|
|
|
|
|
2018-05-31 10:36:29 +02:00
|
|
|
--= Turkish Delight
|
|
|
|
|
|
|
|
minetest.register_craftitem("farming:turkish_delight", {
|
|
|
|
description = S("Turkish Delight"),
|
|
|
|
inventory_image = "farming_turkish_delight.png",
|
|
|
|
groups = {flammable = 3},
|
2020-07-02 15:31:12 +02:00
|
|
|
on_use = minetest.item_eat(2)
|
2018-05-31 10:36:29 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "farming:turkish_delight 4",
|
|
|
|
recipe = {
|
|
|
|
{"group:food_gelatin", "group:food_sugar", "group:food_gelatin"},
|
|
|
|
{"group:food_sugar", "group:food_rose_water", "group:food_sugar"},
|
2020-07-02 15:31:12 +02:00
|
|
|
{"group:food_cornstarch", "group:food_sugar", "dye:pink"}
|
2018-05-31 10:36:29 +02:00
|
|
|
},
|
2018-05-31 10:50:32 +02:00
|
|
|
replacements = {
|
2018-06-03 09:57:02 +02:00
|
|
|
{"group:food_cornstarch", "farming:bowl"},
|
2020-07-02 15:31:12 +02:00
|
|
|
{"group:food_rose_water", "vessels:glass_bottle"}
|
|
|
|
}
|
2018-05-31 10:36:29 +02:00
|
|
|
})
|
2018-06-02 13:18:01 +02:00
|
|
|
|
|
|
|
--= Garlic Bread
|
|
|
|
|
|
|
|
minetest.register_craftitem("farming:garlic_bread", {
|
|
|
|
description = S("Garlic Bread"),
|
|
|
|
inventory_image = "farming_garlic_bread.png",
|
|
|
|
groups = {flammable = 3},
|
2020-07-02 15:31:12 +02:00
|
|
|
on_use = minetest.item_eat(2)
|
2018-06-02 13:18:01 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
type = "shapeless",
|
|
|
|
output = "farming:garlic_bread",
|
2020-07-02 15:31:12 +02:00
|
|
|
recipe = {"group:food_toast", "group:food_garlic_clove", "group:food_garlic_clove"}
|
2018-06-02 13:18:01 +02:00
|
|
|
})
|
2018-06-09 17:47:38 +02:00
|
|
|
|
|
|
|
--= Donuts (thanks to Bockwurst for making the donut images)
|
|
|
|
|
|
|
|
minetest.register_craftitem("farming:donut", {
|
|
|
|
description = S("Donut"),
|
|
|
|
inventory_image = "farming_donut.png",
|
2020-07-02 15:31:12 +02:00
|
|
|
on_use = minetest.item_eat(4)
|
2018-06-09 17:47:38 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "farming:donut 3",
|
|
|
|
recipe = {
|
|
|
|
{"", "group:food_wheat", ""},
|
|
|
|
{"group:food_wheat", "group:food_sugar", "group:food_wheat"},
|
2020-07-02 15:31:12 +02:00
|
|
|
{"", "group:food_wheat", ""}
|
2018-06-09 17:47:38 +02:00
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craftitem("farming:donut_chocolate", {
|
|
|
|
description = S("Chocolate Donut"),
|
|
|
|
inventory_image = "farming_donut_chocolate.png",
|
2020-07-02 15:31:12 +02:00
|
|
|
on_use = minetest.item_eat(6)
|
2018-06-09 17:47:38 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "farming:donut_chocolate",
|
|
|
|
recipe = {
|
2019-08-05 10:12:06 +02:00
|
|
|
{"group:food_cocoa"},
|
2020-07-02 15:31:12 +02:00
|
|
|
{"farming:donut"}
|
2018-06-09 17:47:38 +02:00
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craftitem("farming:donut_apple", {
|
|
|
|
description = S("Apple Donut"),
|
|
|
|
inventory_image = "farming_donut_apple.png",
|
2020-07-02 15:31:12 +02:00
|
|
|
on_use = minetest.item_eat(6)
|
2018-06-09 17:47:38 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "farming:donut_apple",
|
|
|
|
recipe = {
|
2019-08-05 10:12:06 +02:00
|
|
|
{"default:apple"},
|
2020-07-02 15:31:12 +02:00
|
|
|
{"farming:donut"}
|
2018-06-09 17:47:38 +02:00
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
--= Porridge Oats
|
|
|
|
|
|
|
|
minetest.register_craftitem("farming:porridge", {
|
|
|
|
description = S("Porridge"),
|
|
|
|
inventory_image = "farming_porridge.png",
|
2020-07-02 15:31:12 +02:00
|
|
|
on_use = minetest.item_eat(6, "farming:bowl")
|
2018-06-09 17:47:38 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.after(0, function()
|
|
|
|
|
2020-09-04 16:05:09 +02:00
|
|
|
local fluid = "group:water_bucket"
|
|
|
|
local fluid_return = {
|
|
|
|
{"group:water_bucket", "bucket:bucket_empty"},
|
|
|
|
{"group:water_bucket_wooden", "bucket:bucket_empty"}
|
|
|
|
}
|
2018-06-09 17:47:38 +02:00
|
|
|
|
|
|
|
if minetest.get_modpath("mobs") and mobs and mobs.mod == "redo" then
|
|
|
|
fluid = "group:food_milk"
|
2020-09-04 16:05:09 +02:00
|
|
|
fluid_return = {
|
|
|
|
{"mobs:bucket_milk", "bucket:bucket_empty"}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
minetest.register_craft({
|
|
|
|
type = "shapeless",
|
|
|
|
output = "farming:porridge",
|
|
|
|
recipe = {
|
|
|
|
"group:food_oats", "group:food_oats", "group:food_oats",
|
|
|
|
"group:food_oats", "group:food_bowl", "group:water_bucket_wooden"
|
|
|
|
},
|
|
|
|
replacements = fluid_return
|
|
|
|
})
|
2018-06-09 17:47:38 +02:00
|
|
|
end
|
|
|
|
|
2019-01-06 11:37:41 +01:00
|
|
|
minetest.register_craft({
|
|
|
|
type = "shapeless",
|
|
|
|
output = "farming:porridge",
|
|
|
|
recipe = {
|
|
|
|
"group:food_oats", "group:food_oats", "group:food_oats",
|
|
|
|
"group:food_oats", "group:food_bowl", fluid
|
|
|
|
},
|
2020-09-04 16:05:09 +02:00
|
|
|
replacements = fluid_return
|
2019-01-06 11:37:41 +01:00
|
|
|
})
|
2020-09-04 16:05:09 +02:00
|
|
|
|
|
|
|
if minetest.get_modpath("bucket_wooden") then
|
|
|
|
end
|
2018-06-09 17:47:38 +02:00
|
|
|
end)
|
2019-01-08 11:23:28 +01:00
|
|
|
|
|
|
|
--= Jaffa Cake
|
|
|
|
|
|
|
|
minetest.register_craftitem("farming:jaffa_cake", {
|
|
|
|
description = S("Jaffa Cake"),
|
|
|
|
inventory_image = "farming_jaffa_cake.png",
|
2020-07-02 15:31:12 +02:00
|
|
|
on_use = minetest.item_eat(6)
|
2019-01-08 11:23:28 +01:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
type = "shapeless",
|
|
|
|
output = "farming:jaffa_cake",
|
|
|
|
recipe = {
|
|
|
|
"farming:baking_tray", "group:food_egg", "group:food_sugar",
|
|
|
|
"group:food_flour", "group:food_cocoa", "group:food_orange",
|
|
|
|
"group:food_milk"
|
|
|
|
},
|
|
|
|
replacements = {
|
|
|
|
{"farming:baking_tray", "farming:baking_tray"},
|
|
|
|
{"mobs:bucket_milk", "bucket:bucket_empty"}
|
|
|
|
}
|
|
|
|
})
|
2020-06-05 10:00:40 +02:00
|
|
|
|
|
|
|
-- Apple Pie
|
|
|
|
|
|
|
|
minetest.register_craftitem("farming:apple_pie", {
|
|
|
|
description = S("Apple Pie"),
|
|
|
|
inventory_image = "farming_apple_pie.png",
|
2020-07-02 15:31:12 +02:00
|
|
|
on_use = minetest.item_eat(6)
|
2020-06-05 10:00:40 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "farming:apple_pie",
|
|
|
|
type = "shapeless",
|
|
|
|
recipe = {
|
|
|
|
"group:food_flour", "group:food_sugar",
|
|
|
|
"group:food_apple", "group:food_baking_tray"
|
|
|
|
},
|
|
|
|
replacements = {{"group:food_baking_tray", "farming:baking_tray"}}
|
|
|
|
})
|
2020-06-18 22:02:39 +02:00
|
|
|
|
|
|
|
-- Cactus Juice
|
|
|
|
|
|
|
|
minetest.register_craftitem("farming:cactus_juice", {
|
|
|
|
description = S("Cactus Juice"),
|
|
|
|
inventory_image = "farming_cactus_juice.png",
|
2020-06-30 21:06:11 +02:00
|
|
|
groups = {vessel = 1, drink = 1},
|
2020-06-18 22:02:39 +02:00
|
|
|
on_use = function(itemstack, user, pointed_thing)
|
|
|
|
if user then
|
2020-07-02 15:31:12 +02:00
|
|
|
if math.random(5) == 1 then
|
2020-06-18 22:02:39 +02:00
|
|
|
return minetest.do_item_eat(-1, "vessels:drinking_glass",
|
|
|
|
itemstack, user, pointed_thing)
|
|
|
|
else
|
|
|
|
return minetest.do_item_eat(2, "vessels:drinking_glass",
|
|
|
|
itemstack, user, pointed_thing)
|
|
|
|
end
|
|
|
|
end
|
2020-07-02 15:31:12 +02:00
|
|
|
end
|
2020-06-18 22:02:39 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "farming:cactus_juice 2",
|
|
|
|
type = "shapeless",
|
|
|
|
recipe = {
|
|
|
|
"vessels:drinking_glass", "vessels:drinking_glass",
|
|
|
|
"default:cactus", "farming:juicer"
|
|
|
|
},
|
|
|
|
replacements = {
|
2020-07-02 15:31:12 +02:00
|
|
|
{"group:food_juicer", "farming:juicer"}
|
|
|
|
}
|
2020-06-18 22:02:39 +02:00
|
|
|
})
|
2020-06-25 17:20:33 +02:00
|
|
|
|
|
|
|
-- Pasta
|
|
|
|
|
|
|
|
minetest.register_craftitem("farming:pasta", {
|
|
|
|
description = S("Pasta"),
|
|
|
|
inventory_image = "farming_pasta.png",
|
2020-07-02 15:31:12 +02:00
|
|
|
groups = {food_pasta = 1}
|
2020-06-25 17:20:33 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
if minetest.get_modpath("mobs_animal") or minetest.get_modpath("xanadu")then
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "farming:pasta",
|
|
|
|
type = "shapeless",
|
|
|
|
recipe = {
|
|
|
|
"group:food_flour", "group:food_mixing_bowl",
|
|
|
|
"group:food_butter"
|
|
|
|
},
|
|
|
|
replacements = {{"group:food_mixing_bowl", "farming:mixing_bowl"}}
|
|
|
|
})
|
|
|
|
else
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "farming:pasta",
|
|
|
|
type = "shapeless",
|
|
|
|
recipe = {
|
|
|
|
"group:food_flour", "group:food_mixing_bowl",
|
|
|
|
"group:food_oil"
|
|
|
|
},
|
|
|
|
replacements = {
|
|
|
|
{"group:food_mixing_bowl", "farming:mixing_bowl"},
|
2020-07-02 15:31:12 +02:00
|
|
|
{"group:food_oil", "vessels:glass_bottle"}
|
2020-06-25 17:20:33 +02:00
|
|
|
}
|
|
|
|
})
|
|
|
|
end
|
|
|
|
|
|
|
|
-- Spaghetti
|
|
|
|
|
|
|
|
minetest.register_craftitem("farming:spaghetti", {
|
|
|
|
description = S("Spaghetti"),
|
|
|
|
inventory_image = "farming_spaghetti.png",
|
2020-07-02 15:31:12 +02:00
|
|
|
on_use = minetest.item_eat(8)
|
2020-06-25 17:20:33 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "farming:spaghetti",
|
|
|
|
type = "shapeless",
|
|
|
|
recipe = {
|
|
|
|
"group:food_pasta", "group:food_saucepan",
|
|
|
|
"group:food_tomato", "group:food_garlic_clove", "group:food_garlic_clove"
|
|
|
|
},
|
|
|
|
replacements = {{"group:food_saucepan", "farming:saucepan"}}
|
|
|
|
})
|
2020-07-01 20:32:38 +02:00
|
|
|
|
|
|
|
-- Korean Bibimbap
|
|
|
|
|
|
|
|
minetest.register_craftitem("farming:bibimbap", {
|
|
|
|
description = S("Bibimbap"),
|
|
|
|
inventory_image = "farming_bibimbap.png",
|
2020-07-02 15:31:12 +02:00
|
|
|
on_use = minetest.item_eat(8, "farming:bowl")
|
2020-07-01 20:32:38 +02:00
|
|
|
})
|
|
|
|
|
2020-07-01 22:15:47 +02:00
|
|
|
if minetest.get_modpath("mobs_animal") or minetest.get_modpath("xanadu")then
|
2020-07-01 20:32:38 +02:00
|
|
|
minetest.register_craft({
|
|
|
|
output = "farming:bibimbap",
|
|
|
|
type = "shapeless",
|
|
|
|
recipe = {
|
2020-07-11 15:16:42 +02:00
|
|
|
"group:food_skillet", "group:food_bowl", "group:food_egg", "group:food_rice",
|
|
|
|
"group:food_chicken_raw", "group:food_cabbage", "group:food_carrot",
|
|
|
|
"group:food_chili_pepper"
|
2020-07-01 20:32:38 +02:00
|
|
|
},
|
|
|
|
replacements = {{"group:food_skillet", "farming:skillet"}}
|
|
|
|
})
|
|
|
|
else
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "farming:bibimbap",
|
|
|
|
type = "shapeless",
|
|
|
|
recipe = {
|
|
|
|
"group:food_skillet", "group:food_bowl", "group:food_mushroom",
|
|
|
|
"group:food_rice", "group:food_cabbage", "group:food_carrot",
|
2020-07-11 15:16:42 +02:00
|
|
|
"group:food_mushroom", "group:food_chili_pepper"
|
2020-07-01 20:32:38 +02:00
|
|
|
},
|
|
|
|
replacements = {{"group:food_skillet", "farming:skillet"}}
|
|
|
|
})
|
|
|
|
end
|