Skip to content

Commit 7066a6a

Browse files
committedAug 9, 2015
Tweak mushroom drops
-> Don't always drop the main mushroom (allowed endless spore generation loop before) -> Drop less spores, before you got lots of spores
1 parent 6194f9f commit 7066a6a

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed
 

Diff for: ‎mods/flowers/init.lua

+9-8
Original file line numberDiff line numberDiff line change
@@ -85,23 +85,23 @@ minetest.register_abm({
8585
elseif under.name ~= "default:dirt_with_grass" then
8686
return
8787
end
88-
88+
8989
local light = minetest.get_node_light(pos)
9090
if not light or light < 13 then
9191
return
9292
end
93-
93+
9494
local pos0 = {x = pos.x - 4, y = pos.y - 4, z = pos.z - 4}
9595
local pos1 = {x = pos.x + 4, y = pos.y + 4, z = pos.z + 4}
9696
if #minetest.find_nodes_in_area(pos0, pos1, "group:flora_block") > 0 then
9797
return
9898
end
99-
99+
100100
local flowers = minetest.find_nodes_in_area(pos0, pos1, "group:flora")
101101
if #flowers > 3 then
102102
return
103103
end
104-
104+
105105
local seedling = minetest.find_nodes_in_area(pos0, pos1, "default:dirt_with_grass")
106106
if #seedling > 0 then
107107
seedling = seedling[math.random(#seedling)]
@@ -145,11 +145,12 @@ for _, m in pairs(mushrooms_datas) do
145145
buildable_to = true,
146146
groups = {snappy = 3, flammable = 3, attached_node = 1},
147147
drop = {
148+
max_items = 1,
148149
items = {
149-
{items = {"flowers:mushroom_spores_" .. name}, rarity = 2,},
150-
{items = {"flowers:mushroom_spores_" .. name}, rarity = 2,},
151-
{items = {"flowers:mushroom_spores_" .. name}, rarity = 2,},
152-
{items = {"flowers:mushroom_" .. name},},
150+
{items = {"flowers:mushroom_" .. name}, rarity = 2,},
151+
{items = {"flowers:mushroom_spores_" .. name}, rarity = 3,},
152+
{items = {"flowers:mushroom_spores_" .. name .. " 2"}, rarity = 2,},
153+
{items = {"flowers:mushroom_spores_" .. name .. " 3"}, rarity = 2,},
153154
},
154155
},
155156
sounds = default.node_sound_leaves_defaults(),

0 commit comments

Comments
 (0)
Please sign in to comment.