Skip to content
Snippets Groups Projects
Unverified Commit e5a7af1c authored by Paramat's avatar Paramat Committed by GitHub
Browse files

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.
parent b3d91a48
No related branches found
No related tags found
No related merge requests found
......@@ -38,3 +38,6 @@ Created by Gambit (CC BY 3.0):
Created by Napiophelios (CC BY-SA 3.0):
farming_cotton.png
Created by Extex101 (CC BY-SA 3.0):
farming_cotton_wild.png
......@@ -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}},
......
......@@ -59,3 +59,37 @@ rights may limit how you use the material.
For more details:
http://creativecommons.org/licenses/by/3.0/
-----------------------
Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
Copyright (C) 2017 Napiophelios
Copyright (C) 2020 Extex101
You are free to:
Share — copy and redistribute the material in any medium or format.
Adapt — remix, transform, and build upon the material for any purpose, even commercially.
The licensor cannot revoke these freedoms as long as you follow the license terms.
Under the following terms:
Attribution — You must give appropriate credit, provide a link to the license, and
indicate if changes were made. You may do so in any reasonable manner, but not in any way
that suggests the licensor endorses you or your use.
ShareAlike — If you remix, transform, or build upon the material, you must distribute
your contributions under the same license as the original.
No additional restrictions — You may not apply legal terms or technological measures that
legally restrict others from doing anything the license permits.
Notices:
You do not have to comply with the license for elements of the material in the public
domain or where your use is permitted by an applicable exception or limitation.
No warranties are given. The license may not give you all of the permissions necessary
for your intended use. For example, other rights such as publicity, privacy, or moral
rights may limit how you use the material.
For more details:
http://creativecommons.org/licenses/by-sa/3.0/
......@@ -230,20 +230,53 @@ minetest.register_abm({
})
-- Make default:grass_* occasionally drop wheat seed
for i = 1, 5 do
minetest.override_item("default:grass_"..i, {drop = {
max_items = 1,
items = {
{items = {"farming:seed_wheat"},rarity = 5},
{items = {"farming:seed_wheat"}, rarity = 5},
{items = {"default:grass_1"}},
}
}})
end
-- Make default:junglegrass occasionally drop cotton seed.
-- This is the old source of cotton seeds that makes no sense. It is a leftover
-- from Mapgen V6 where junglegrass was the only plant available to be a source.
-- This source is kept for now to avoid disruption but should probably be
-- removed in future as players get used to the new source.
minetest.override_item("default:junglegrass", {drop = {
max_items = 1,
items = {
{items = {"farming:seed_cotton"},rarity = 8},
{items = {"farming:seed_cotton"}, rarity = 8},
{items = {"default:junglegrass"}},
}
}})
-- Wild cotton as a source of cotton seed
minetest.register_node("farming:cotton_wild", {
description = S("Wild Cotton"),
drawtype = "plantlike",
waving = 1,
tiles = {"farming_cotton_wild.png"},
inventory_image = "farming_cotton_wild.png",
wield_image = "farming_cotton_wild.png",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
buildable_to = true,
groups = {snappy = 3, attached_node = 1, flammable = 4},
drop = "farming:seed_cotton",
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = {-6 / 16, -8 / 16, -6 / 16, 6 / 16, 5 / 16, 6 / 16},
},
})
mods/farming/textures/farming_cotton_wild.png

228 B

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment