1
0
mirror of https://github.com/mt-mods/plantlife_modpack.git synced 2025-07-12 21:10:21 +02:00

Fix timer bug causing persistent blossoms

Because minetest.after() is not bound to a position, and because it is not
saved, it may trigger after the node to which it applies was unloaded, or
not at all (if the session ends). If that happens, The 'young' flag
will not be cleared, and will have become persistent (i.e. without a timer
which will eventually clear it).

This patch removes the 'young' flag, and replaces it with a timestamp, removing
the need for a timer. Any lingering 'young' flags that have become persistent
are automatically removed over time (i.e.: they are simply ignored...)
This commit is contained in:
Rogier
2015-04-02 13:27:10 +02:00
parent aaa4186695
commit 6c715f65f6
2 changed files with 5 additions and 13 deletions

View File

@ -26,10 +26,8 @@ nature.blossom_delay = 3600
nature.apple_chance = 10
nature.apple_spread = 2
nature.node_young = "young"
nature.setting_true = "true"
nature.setting_false = "false"
nature.youth_delay = 5
nature.meta_blossom_time = "blossom_time"
nature.blossom_duration = 5
function dumppos(pos)
return "("..pos.x..","..pos.y..","..pos.z..")"