Skip to content

Commit e5a7af1

Browse files
authoredMay 14, 2020
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.
1 parent b3d91a4 commit e5a7af1

File tree

5 files changed

+94
-3
lines changed

5 files changed

+94
-3
lines changed
 

Diff for: ‎mods/farming/README.txt

+3
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,6 @@ Created by Gambit (CC BY 3.0):
3838

3939
Created by Napiophelios (CC BY-SA 3.0):
4040
farming_cotton.png
41+
42+
Created by Extex101 (CC BY-SA 3.0):
43+
farming_cotton_wild.png

Diff for: ‎mods/farming/init.lua

+22-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ dofile(farming.path .. "/nodes.lua")
1616
dofile(farming.path .. "/hoes.lua")
1717

1818

19-
-- WHEAT
19+
-- Wheat
2020

2121
farming.register_plant("farming:wheat", {
2222
description = S("Wheat Seed"),
@@ -71,6 +71,25 @@ farming.register_plant("farming:cotton", {
7171
groups = {flammable = 4},
7272
})
7373

74+
minetest.register_decoration({
75+
name = "farming:cotton_wild",
76+
deco_type = "simple",
77+
place_on = {"default:dry_dirt_with_dry_grass"},
78+
sidelen = 16,
79+
noise_params = {
80+
offset = -0.1,
81+
scale = 0.1,
82+
spread = {x = 50, y = 50, z = 50},
83+
seed = 4242,
84+
octaves = 3,
85+
persist = 0.7
86+
},
87+
biomes = {"savanna"},
88+
y_max = 31000,
89+
y_min = 1,
90+
decoration = "farming:cotton_wild",
91+
})
92+
7493
minetest.register_craftitem("farming:string", {
7594
description = S("String"),
7695
inventory_image = "farming_string.png",
@@ -139,7 +158,9 @@ minetest.register_craft({
139158
burntime = 5,
140159
})
141160

161+
142162
-- Register farming items as dungeon loot
163+
143164
if minetest.global_exists("dungeon_loot") then
144165
dungeon_loot.register({
145166
{name = "farming:string", chance = 0.5, count = {1, 8}},

Diff for: ‎mods/farming/license.txt

+34
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,37 @@ rights may limit how you use the material.
5959

6060
For more details:
6161
http://creativecommons.org/licenses/by/3.0/
62+
63+
-----------------------
64+
65+
Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
66+
Copyright (C) 2017 Napiophelios
67+
Copyright (C) 2020 Extex101
68+
69+
You are free to:
70+
Share — copy and redistribute the material in any medium or format.
71+
Adapt — remix, transform, and build upon the material for any purpose, even commercially.
72+
The licensor cannot revoke these freedoms as long as you follow the license terms.
73+
74+
Under the following terms:
75+
76+
Attribution — You must give appropriate credit, provide a link to the license, and
77+
indicate if changes were made. You may do so in any reasonable manner, but not in any way
78+
that suggests the licensor endorses you or your use.
79+
80+
ShareAlike — If you remix, transform, or build upon the material, you must distribute
81+
your contributions under the same license as the original.
82+
83+
No additional restrictions — You may not apply legal terms or technological measures that
84+
legally restrict others from doing anything the license permits.
85+
86+
Notices:
87+
88+
You do not have to comply with the license for elements of the material in the public
89+
domain or where your use is permitted by an applicable exception or limitation.
90+
No warranties are given. The license may not give you all of the permissions necessary
91+
for your intended use. For example, other rights such as publicity, privacy, or moral
92+
rights may limit how you use the material.
93+
94+
For more details:
95+
http://creativecommons.org/licenses/by-sa/3.0/

Diff for: ‎mods/farming/nodes.lua

+35-2
Original file line numberDiff line numberDiff line change
@@ -230,20 +230,53 @@ minetest.register_abm({
230230
})
231231

232232

233+
-- Make default:grass_* occasionally drop wheat seed
234+
233235
for i = 1, 5 do
234236
minetest.override_item("default:grass_"..i, {drop = {
235237
max_items = 1,
236238
items = {
237-
{items = {"farming:seed_wheat"},rarity = 5},
239+
{items = {"farming:seed_wheat"}, rarity = 5},
238240
{items = {"default:grass_1"}},
239241
}
240242
}})
241243
end
242244

245+
246+
-- Make default:junglegrass occasionally drop cotton seed.
247+
248+
-- This is the old source of cotton seeds that makes no sense. It is a leftover
249+
-- from Mapgen V6 where junglegrass was the only plant available to be a source.
250+
-- This source is kept for now to avoid disruption but should probably be
251+
-- removed in future as players get used to the new source.
252+
243253
minetest.override_item("default:junglegrass", {drop = {
244254
max_items = 1,
245255
items = {
246-
{items = {"farming:seed_cotton"},rarity = 8},
256+
{items = {"farming:seed_cotton"}, rarity = 8},
247257
{items = {"default:junglegrass"}},
248258
}
249259
}})
260+
261+
262+
-- Wild cotton as a source of cotton seed
263+
264+
minetest.register_node("farming:cotton_wild", {
265+
description = S("Wild Cotton"),
266+
drawtype = "plantlike",
267+
waving = 1,
268+
tiles = {"farming_cotton_wild.png"},
269+
inventory_image = "farming_cotton_wild.png",
270+
wield_image = "farming_cotton_wild.png",
271+
paramtype = "light",
272+
sunlight_propagates = true,
273+
walkable = false,
274+
buildable_to = true,
275+
groups = {snappy = 3, attached_node = 1, flammable = 4},
276+
drop = "farming:seed_cotton",
277+
sounds = default.node_sound_leaves_defaults(),
278+
selection_box = {
279+
type = "fixed",
280+
fixed = {-6 / 16, -8 / 16, -6 / 16, 6 / 16, 5 / 16, 6 / 16},
281+
},
282+
})

Diff for: ‎mods/farming/textures/farming_cotton_wild.png

228 Bytes
Loading

0 commit comments

Comments
 (0)
Please sign in to comment.