1
0
mirror of https://github.com/minetest/minetest_game.git synced 2024-10-31 23:30:31 +01:00
minetest_game/mods/farming/init.lua

140 lines
2.6 KiB
Lua
Raw Normal View History

-- Global farming namespace
farming = {}
farming.path = minetest.get_modpath("farming")
-- Load files
dofile(farming.path .. "/api.lua")
dofile(farming.path .. "/nodes.lua")
dofile(farming.path .. "/hoes.lua")
-- WHEAT
farming.register_plant("farming:wheat", {
description = "Wheat Seed",
paramtype2 = "meshoptions",
2012-11-11 11:47:53 +01:00
inventory_image = "farming_wheat_seed.png",
steps = 8,
minlight = 13,
2014-12-07 15:17:09 +01:00
maxlight = default.LIGHT_MAX,
fertility = {"grassland"},
groups = {food_wheat = 1, flammable = 4},
place_param2 = 3,
2012-11-11 11:47:53 +01:00
})
2012-11-11 11:47:53 +01:00
minetest.register_craftitem("farming:flour", {
description = "Flour",
inventory_image = "farming_flour.png",
groups = {food_flour = 1, flammable = 1},
2012-11-11 11:47:53 +01:00
})
minetest.register_craftitem("farming:bread", {
description = "Bread",
inventory_image = "farming_bread.png",
on_use = minetest.item_eat(5),
groups = {food_bread = 1, 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"
})
2012-11-11 11:47:53 +01:00
-- Cotton
farming.register_plant("farming:cotton", {
description = "Cotton Seed",
2012-11-11 11:47:53 +01:00
inventory_image = "farming_cotton_seed.png",
steps = 8,
minlight = 13,
2014-12-07 15:17:09 +01:00
maxlight = default.LIGHT_MAX,
fertility = {"grassland", "desert"},
groups = {flammable = 4},
2012-11-11 11:47:53 +01:00
})
minetest.register_craftitem("farming:string", {
description = "String",
inventory_image = "farming_string.png",
groups = {flammable = 2},
})
2012-11-11 11:47:53 +01:00
minetest.register_craft({
output = "wool:white",
recipe = {
{"farming:cotton", "farming:cotton"},
{"farming:cotton", "farming:cotton"},
2012-11-11 11:47:53 +01:00
}
})
2015-01-12 20:21:06 +01:00
minetest.register_craft({
output = "farming:string 2",
recipe = {
{"farming:cotton"},
{"farming:cotton"},
}
})
2015-01-12 20:21:06 +01:00
-- Straw
2015-01-12 20:21:06 +01:00
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"},
}
})
-- Fuels
minetest.register_craft({
type = "fuel",
recipe = "farming:straw",
burntime = 3,
})
minetest.register_craft({
type = "fuel",
recipe = "farming:wheat",
burntime = 1,
})
minetest.register_craft({
type = "fuel",
recipe = "farming:cotton",
burntime = 1,
})
minetest.register_craft({
type = "fuel",
recipe = "farming:string",
burntime = 1,
})
minetest.register_craft({
type = "fuel",
recipe = "farming:hoe_wood",
burntime = 5,
})