Camas/mods/farming/craft.lua

67 lines
1.1 KiB
Lua
Raw Normal View History

--
-- Crafts and items
--
2019-08-28 17:31:41 +02:00
local S = minetest.get_translator("farming")
-- Items
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"
})
2015-09-01 17:15:24 +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"
})
2015-09-01 17:15:24 +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"
})
2015-09-01 17:15:24 +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",
2019-08-31 14:06:32 +02:00
groups = { food = 2 },
on_use = minetest.item_eat({hp = 4, sat = 40})
})
2015-09-01 17:15:24 +02:00
-- Craft recipes
crafting.register_craft(
2015-09-01 17:15:24 +02:00
{
output = "farming:flour",
items = {
"farming:wheat 4",
2015-09-01 17:15:24 +02:00
}
})
2015-09-01 17:15:24 +02:00
crafting.register_craft(
2015-09-01 17:15:24 +02:00
{
output = "farming:cotton_bale 2",
items = {
"farming:cotton 2",
2015-09-01 17:15:24 +02:00
}
})
-- Cooking
2015-09-01 17:15:24 +02:00
minetest.register_craft(
2015-09-01 17:15:24 +02:00
{
type = "cooking",
output = "farming:bread",
recipe = "farming:flour",
cooktime = 15,
})
2015-09-01 17:15:24 +02:00
default.log("craft", "loaded")