ademant 4561d59854 decoration of plants vor 5 Jahren
..
locale e6126465b2 add german translation vor 5 Jahren
textures 9895efc12b enable garlic/onion vor 5 Jahren
README.md 2f24022226 typo vor 5 Jahren
abm.lua 4561d59854 decoration of plants vor 5 Jahren
actions_register.lua 6d35186158 error handling vor 5 Jahren
api.lua 816e86a4df change punching/digging into registered handler vor 5 Jahren
api.txt f81af70fa8 code cleaning; documentation vor 5 Jahren
compatibility.lua 1b8e1e8992 integrate farming vor 5 Jahren
config.lua 833a621004 planting crops near other plants are less common when more plants are nearby vor 5 Jahren
craft.lua 1b8e1e8992 integrate farming vor 5 Jahren
crops.lua 3ce70f6632 add decoration as spread mechanism vor 5 Jahren
crops.txt 4561d59854 decoration of plants vor 5 Jahren
depends.txt 1b8e1e8992 integrate farming vor 5 Jahren
description.txt 1b8e1e8992 integrate farming vor 5 Jahren
hoes.lua 1b8e1e8992 integrate farming vor 5 Jahren
init.lua 1b8e1e8992 integrate farming vor 5 Jahren
intllib.lua 1b8e1e8992 integrate farming vor 5 Jahren
license.txt 1b8e1e8992 integrate farming vor 5 Jahren
light_stat.txt 1b8e1e8992 integrate farming vor 5 Jahren
mapgen.lua 1b8e1e8992 integrate farming vor 5 Jahren
mod.conf d3af8483ef add framework for counting fruits and harvest vor 5 Jahren
nodes.lua e6126465b2 add german translation vor 5 Jahren
nodes_register.lua 4561d59854 decoration of plants vor 5 Jahren
screenshot.png b47d939ed9 reduce png size vor 5 Jahren
settingtypes.txt 4561d59854 decoration of plants vor 5 Jahren
statistics.lua 1b8e1e8992 integrate farming vor 5 Jahren
tool_shot.png b47d939ed9 reduce png size vor 5 Jahren
tools.lua e6126465b2 add german translation vor 5 Jahren
tools.txt 1b8e1e8992 integrate farming vor 5 Jahren
tools_register.lua 816e86a4df change punching/digging into registered handler vor 5 Jahren
utensils.lua 1b8e1e8992 integrate farming vor 5 Jahren

README.md

Minetest Mod: Farming

See license.txt for license information.

Short description

Mod for extending the farming capabilities of minetest.

Description

You have wild crops, which you can cultivate to get faster and more harvest. The crops can be infected, where you get nothing. And the infection spreads to nearby crops. A culture of crops can be destroyed by the infection, where the cultured variant of crops are easier infected than the wild form.

With special plants (right now nettles) you can make a curing mixture. And other plants can protect the culture. You should use special devices to get more fruits:

  • With a scythe you dig the node and by change get one more harvest. The change is better for a steel scythe than for stone or wood
  • With a billhook you punch for example berries to get by change one berry more. Booth are weared out by each harvest.

For each crop you can define the count of step. In the last step the crop is full-grown, where the crops can be punchable. The defined grow time is modified by the amount of light the crop would see and the place: The less light at the position will be (under a tree for example), the longer the crop needs to reach the next step.

The code is written to enable extension by other mods.

You have only one txt file to configure the crops. It's read in a table. Not defined fields are filled, if a default row is given. If no default is given, the field is not importet to the crop. Based on the definition the behauvior is defined:

  • Crops with harvest (Wheat, Barley, Spelt, Nettle, Hemp): The crop has to be digged and drops a harvest, which can not be seeded again. The seed has to be crafted out of the harvest. If the option "use_flail" is activated, a standard craft is used: With a flail you get one seed and one straw (default, can be changed by field "straw"). The seed can be placed again to grow more. If a cultured variant is given (Wheat), by change you get cultured harvest, which grows faster, has more harvest, gets easier infected or what ever is defined for the cultured crop. Most kind of wheat, barley and so on are defined this way.
  • Crops with seed: The crop drops directly seed. The amount is given in the configuration by "max_harvest". Crops like potato or corn are defined in this way.
  • Punchable fruits (Berries, Tea, Tobaco, Coffee): Full-grown fruits can be punched to give one fruit and back one step. After the growing time the fruits are available again. The full-grown can't be digged. It will be punched, directly afterwards the second last step will be digged, giving one fruit.
  • Crops with trellis (Tomatoes, Hop, Grapes): For creating seedable items you have to craft out of the harvest the seed with a trellis. Digging any step will release the trellis for further usage. By using the option "use_trellis" the craft is direct registered.
  • crops with extractable seed (Tea, Tobaco): The normal harvest are the leaves of the plant, which you can punch out of the box. To get a seed of the fruit, you have to use a seed picker. The plant goes back one step and need to regrow booth leaves and seed.

API

The crops inside farming mod are defined by a single .txt file, where for each crop in a row the whole definition is given.

Each row will by interpreted to generate a data object, which is registered by farming.register_plant. Inside this function all registering are called by functions intended for internal usage.

A detailed description of the txt file is given in crops.lua

Most important function is farming.register_plant(def). The structure of is given in api.txt.

Authors of source code

Originally by PilzAdam (MIT)

webdesigner97 (MIT)

TenPlus1 (MIT)

ademant (MIT)

Various Minetest developers and contributors (MIT)

Authors of media (textures)

Created by PilzAdam (CC BY 3.0):

  • farming_bread.png
  • farming_soil.png
  • farming_soil_wet.png
  • farming_soil_wet_side.png
  • farming_string.png

Created by BlockMen (CC BY 3.0):

  • farming_tool_steelhoe.png
  • farming_tool_stonehoe.png
  • farming_tool_woodhoe.png

Created by MasterGollum (CC BY 3.0):

  • farming_straw.png

Created by Gambit (CC BY 3.0):

  • farming_wheat.png
  • farmingwheat*.png
  • farmingcotton*.png
  • farming_flour.png
  • farming_cotton_seed.png
  • farming_wheat_seed.png

Created by Napiophelios (CC BY-SA 3.0):

  • farming_cotton.png

Created by Ten1Plus (CC BY-SA 3.0):

  • farming_hemp.png
  • farming_beetroot
  • farming_strawberry

Created by ademant (CC BY 3.0):

  • farming_tool_flail.png
  • farming_tool_coffee_grinder.png (based on art by cactus_cowboy on openclipart.org)
  • farming_tool_scythe (based on svg by Rinaldum on wikimedia)
  • farming_tool_billhook (based on svg by Henrysalome on wikimedia)
  • farming_sugerbeet (based on farming_beetroot)
  • farming_blackberry (based on farming_blueberry)
  • farming_blackberry_seed (based on jpg from AlbertCahalan on wikimedia)
  • farming_blueberry_seed (based on jpg from Bateau ivre on wikimedia)
  • farming_strawberry_seed (based on gif from Nicke L on wikimedia)
  • farming_raspberry_seed (based on jpg from AlbertCahalan on wikimedia)
  • farming_mustard
  • farming_spelt (based on farming_barley)
  • farming_hop
  • farming_tobaco (based on pictures of wikimedia)
  • farming_tool_spinningwheal (based on drawing by firkin on opencliparts)
  • farming_yarn (based on picture from ikiwana on wikimedia)