2017-05-16 05:57:30 +02:00
|
|
|
--
|
|
|
|
-- Crafts and items
|
|
|
|
--
|
2019-08-28 17:31:41 +02:00
|
|
|
local S = minetest.get_translator("farming")
|
2017-05-16 05:57:30 +02:00
|
|
|
|
|
|
|
-- Items
|
|
|
|
|
2017-05-12 04:29:55 +02:00
|
|
|
minetest.register_craftitem(
|
2015-09-01 17:15:24 +02:00
|
|
|
"farming:cotton",
|
|
|
|
{
|
2019-08-28 17:31:41 +02:00
|
|
|
description = S("Cotton"),
|
2015-09-01 17:15:24 +02:00
|
|
|
inventory_image = "farming_cotton.png"
|
2017-05-16 05:57:30 +02:00
|
|
|
})
|
2015-09-01 17:15:24 +02:00
|
|
|
|
2017-05-12 04:29:55 +02:00
|
|
|
minetest.register_craftitem(
|
2015-09-01 17:15:24 +02:00
|
|
|
"farming:wheat",
|
|
|
|
{
|
2019-08-28 17:31:41 +02:00
|
|
|
description = S("Wheat"),
|
2015-09-01 17:15:24 +02:00
|
|
|
inventory_image = "farming_wheat.png"
|
2017-05-16 05:57:30 +02:00
|
|
|
})
|
2015-09-01 17:15:24 +02:00
|
|
|
|
2017-05-12 04:29:55 +02:00
|
|
|
minetest.register_craftitem(
|
2015-09-01 17:15:24 +02:00
|
|
|
"farming:flour",
|
|
|
|
{
|
2019-08-28 17:31:41 +02:00
|
|
|
description = S("Flour"),
|
2015-09-01 17:15:24 +02:00
|
|
|
inventory_image = "farming_flour.png"
|
2017-05-16 05:57:30 +02:00
|
|
|
})
|
2015-09-01 17:15:24 +02:00
|
|
|
|
2017-05-12 04:29:55 +02:00
|
|
|
minetest.register_craftitem(
|
2015-09-01 17:15:24 +02:00
|
|
|
"farming:bread",
|
|
|
|
{
|
2019-08-28 17:31:41 +02:00
|
|
|
description = S("Bread"),
|
2015-09-01 17:15:24 +02:00
|
|
|
inventory_image = "farming_bread.png",
|
2017-05-12 04:29:55 +02:00
|
|
|
on_use = minetest.item_eat({hp = 4, sat = 40})
|
2017-05-16 05:57:30 +02:00
|
|
|
})
|
2015-09-01 17:15:24 +02:00
|
|
|
|
2017-05-16 05:57:30 +02:00
|
|
|
-- Craft recipes
|
|
|
|
|
|
|
|
crafting.register_craft(
|
2015-09-01 17:15:24 +02:00
|
|
|
{
|
|
|
|
output = "farming:flour",
|
2017-05-16 05:57:30 +02:00
|
|
|
items = {
|
|
|
|
"farming:wheat 4",
|
2015-09-01 17:15:24 +02:00
|
|
|
}
|
2017-05-16 05:57:30 +02:00
|
|
|
})
|
2015-09-01 17:15:24 +02:00
|
|
|
|
2017-05-16 05:57:30 +02:00
|
|
|
crafting.register_craft(
|
2015-09-01 17:15:24 +02:00
|
|
|
{
|
|
|
|
output = "farming:cotton_bale 2",
|
2017-05-16 05:57:30 +02:00
|
|
|
items = {
|
|
|
|
"farming:cotton 2",
|
2015-09-01 17:15:24 +02:00
|
|
|
}
|
2017-05-16 05:57:30 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
-- Cooking
|
2015-09-01 17:15:24 +02:00
|
|
|
|
2017-05-12 04:29:55 +02:00
|
|
|
minetest.register_craft(
|
2015-09-01 17:15:24 +02:00
|
|
|
{
|
|
|
|
type = "cooking",
|
|
|
|
output = "farming:bread",
|
|
|
|
recipe = "farming:flour",
|
|
|
|
cooktime = 15,
|
2017-05-16 05:57:30 +02:00
|
|
|
})
|
2015-09-01 17:15:24 +02:00
|
|
|
|
2017-05-16 05:57:30 +02:00
|
|
|
default.log("craft", "loaded")
|