2014-04-16 23:44:58 +02:00
|
|
|
-- Global farming namespace
|
2013-08-30 10:10:30 +02:00
|
|
|
farming = {}
|
2014-04-16 23:44:58 +02:00
|
|
|
farming.path = minetest.get_modpath("farming")
|
2013-08-30 10:10:30 +02:00
|
|
|
|
2014-04-16 23:44:58 +02:00
|
|
|
-- Load files
|
|
|
|
dofile(farming.path .. "/api.lua")
|
|
|
|
dofile(farming.path .. "/nodes.lua")
|
|
|
|
dofile(farming.path .. "/hoes.lua")
|
2014-04-17 14:14:56 +02:00
|
|
|
|
2014-04-16 23:44:58 +02:00
|
|
|
-- WHEAT
|
|
|
|
farming.register_plant("farming:wheat", {
|
|
|
|
description = "Wheat seed",
|
2012-11-11 11:47:53 +01:00
|
|
|
inventory_image = "farming_wheat_seed.png",
|
2014-04-16 23:44:58 +02:00
|
|
|
steps = 8,
|
|
|
|
minlight = 13,
|
2014-12-07 15:17:09 +01:00
|
|
|
maxlight = default.LIGHT_MAX,
|
2016-10-24 20:34:00 +02:00
|
|
|
fertility = {"grassland"},
|
|
|
|
groups = {flammable = 4},
|
2012-11-11 11:47:53 +01:00
|
|
|
})
|
|
|
|
minetest.register_craftitem("farming:flour", {
|
|
|
|
description = "Flour",
|
|
|
|
inventory_image = "farming_flour.png",
|
2016-10-24 20:34:00 +02:00
|
|
|
groups = {flammable = 1},
|
2012-11-11 11:47:53 +01:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craftitem("farming:bread", {
|
|
|
|
description = "Bread",
|
|
|
|
inventory_image = "farming_bread.png",
|
2015-05-14 17:33:10 +02:00
|
|
|
on_use = minetest.item_eat(5),
|
2016-10-24 20:34:00 +02:00
|
|
|
groups = {flammable = 2},
|
2012-11-11 11:47:53 +01:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
type = "shapeless",
|
|
|
|
output = "farming:flour",
|
|
|
|
recipe = {"farming:wheat", "farming:wheat", "farming:wheat", "farming:wheat"}
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
type = "cooking",
|
|
|
|
cooktime = 15,
|
|
|
|
output = "farming:bread",
|
|
|
|
recipe = "farming:flour"
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Cotton
|
2014-04-16 23:44:58 +02:00
|
|
|
farming.register_plant("farming:cotton", {
|
|
|
|
description = "Cotton seed",
|
2012-11-11 11:47:53 +01:00
|
|
|
inventory_image = "farming_cotton_seed.png",
|
2014-04-16 23:44:58 +02:00
|
|
|
steps = 8,
|
|
|
|
minlight = 13,
|
2014-12-07 15:17:09 +01:00
|
|
|
maxlight = default.LIGHT_MAX,
|
2016-10-24 20:34:00 +02:00
|
|
|
fertility = {"grassland", "desert"},
|
|
|
|
groups = {flammable = 4},
|
2012-11-11 11:47:53 +01:00
|
|
|
})
|
|
|
|
|
2014-07-09 20:40:18 +02:00
|
|
|
minetest.register_alias("farming:string", "farming:cotton")
|
2012-11-11 11:47:53 +01:00
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "wool:white",
|
|
|
|
recipe = {
|
2014-04-16 23:44:58 +02:00
|
|
|
{"farming:cotton", "farming:cotton"},
|
|
|
|
{"farming:cotton", "farming:cotton"},
|
2012-11-11 11:47:53 +01:00
|
|
|
}
|
|
|
|
})
|
2015-01-12 20:21:06 +01:00
|
|
|
|
|
|
|
-- Straw
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "farming:straw 3",
|
|
|
|
recipe = {
|
|
|
|
{"farming:wheat", "farming:wheat", "farming:wheat"},
|
|
|
|
{"farming:wheat", "farming:wheat", "farming:wheat"},
|
|
|
|
{"farming:wheat", "farming:wheat", "farming:wheat"},
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "farming:wheat 3",
|
|
|
|
recipe = {
|
|
|
|
{"farming:straw"},
|
|
|
|
}
|
|
|
|
})
|