Skip to content

Commit bf3efa0

Browse files
authoredJul 17, 2018
Flora spread: Reduce maximum density
Previously, maximum flora density was chosen based on the extremely rare occurrence of all 8 flowers being at high density at one location. This caused flora everywhere to spread to an unacceptably high density. Revert the threshold to 3, which in testing results in a more acceptable maximum density of 7 flora per 9x9 area.
1 parent ee72bc7 commit bf3efa0

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed
 

‎mods/flowers/init.lua

+3-6
Original file line numberDiff line numberDiff line change
@@ -139,12 +139,9 @@ function flowers.flower_spread(pos, node)
139139

140140
local pos0 = vector.subtract(pos, 4)
141141
local pos1 = vector.add(pos, 4)
142-
-- Maximum flower density created by mapgen is 13 per 9x9 area.
143-
-- The limit of 7 below was tuned by in-game testing to result in a maximum
144-
-- flower density by ABM spread of 13 per 9x9 area.
145-
-- Warning: Setting this limit theoretically without in-game testing
146-
-- results in a maximum flower density by ABM spread that is far too high.
147-
if #minetest.find_nodes_in_area(pos0, pos1, "group:flora") > 7 then
142+
-- Testing shows that a threshold of 3 results in an appropriate maximum
143+
-- density of approximately 7 flora per 9x9 area.
144+
if #minetest.find_nodes_in_area(pos0, pos1, "group:flora") > 3 then
148145
return
149146
end
150147

0 commit comments

Comments
 (0)
Please sign in to comment.