Add wild cotton plant in savanna as a source of cotton seeds (#2617)

Junglegrass is unchanged as a source of cotton seeds for now, but
probably should be removed as a source in future, as players get
used to the new source.
This commit is contained in:
Paramat 2020-05-14 23:49:17 +01:00 committed by GitHub
parent b3d91a487d
commit e5a7af1c4a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 94 additions and 3 deletions

View 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}},