Make farming more flexible
[oweals/minetest_game.git] / mods / farming / API.txt
1 farming.register_hoe(name, hoe definition)
2  -> Register a new hoe, see [hoe definition]
3  
4 farming.register_plant(name, Plant definition)
5  -> Register a new growing plant, see [Plant definition]
6
7 Hoe Definition
8 {
9         description = "",       -- Description for tooltip
10         inventory_image = "unknown_item.png",   -- Image to be used as wield- and inventory image
11         max_uses = 30,  -- Uses until destroyed
12         recipe = {      -- Craft recipe
13                 {"air", "air", "air"},
14                 {"", "group:stick"},
15                 {"", "group:stick"},
16         }
17 }
18
19 Plant definition
20 {
21         description = "",       -- Description of seed item
22         inventory_image = "unknown_item.png",   -- Image to be used as seed's wield- and inventory image
23         steps = 8,      -- How many steps the plant has to grow, until it can be harvested
24         ^ Always provide a plant texture for ech step, format: modname_plantname_i.png (i = stepnumber)
25         minlight = 13, -- Minimum light to grow
26         maxlight = LIGHT_MAX -- Maximum light to grow
27 }