Add wild cotton plant in savanna as a source of cotton seeds (#2617)
[oweals/minetest_game.git] / mods / farming / init.lua
index b583b8bd8ba8e6c611d8e575cfdfe9b5d124e8d8..d328cb4a61b6c3ebdb8160b143b073ba48b7e2ff 100644 (file)
@@ -16,7 +16,7 @@ dofile(farming.path .. "/nodes.lua")
 dofile(farming.path .. "/hoes.lua")
 
 
--- WHEAT
+-- Wheat
 
 farming.register_plant("farming:wheat", {
        description = S("Wheat Seed"),
@@ -71,6 +71,25 @@ farming.register_plant("farming:cotton", {
        groups = {flammable = 4},
 })
 
+minetest.register_decoration({
+       name = "farming:cotton_wild",
+       deco_type = "simple",
+       place_on = {"default:dry_dirt_with_dry_grass"},
+       sidelen = 16,
+       noise_params = {
+               offset = -0.1,
+               scale = 0.1,
+               spread = {x = 50, y = 50, z = 50},
+               seed = 4242,
+               octaves = 3,
+               persist = 0.7
+       },
+       biomes = {"savanna"},
+       y_max = 31000,
+       y_min = 1,
+       decoration = "farming:cotton_wild",
+})
+
 minetest.register_craftitem("farming:string", {
        description = S("String"),
        inventory_image = "farming_string.png",
@@ -139,7 +158,9 @@ minetest.register_craft({
        burntime = 5,
 })
 
+
 -- Register farming items as dungeon loot
+
 if minetest.global_exists("dungeon_loot") then
        dungeon_loot.register({
                {name = "farming:string", chance = 0.5, count = {1, 8}},