add an additional check to ensure old timers don't cause inappropriate growth

This commit is contained in:
FaceDeer 2022-08-01 14:50:07 -06:00
parent 1d7b6010c3
commit 0a61781b99
1 changed files with 2 additions and 0 deletions

View File

@ -134,6 +134,8 @@ local place_seed = function(itemstack, placer, pointed_thing, plantname)
local growth_permitted_function = df_farming.growth_permitted[plantname]
if not growth_permitted_function or growth_permitted_function(pt.above) then
df_farming.plant_timer(pt.above, plantname)
else
minetest.get_node_timer(pt.above):stop() -- make sure no old timers are running on this node
end
if not minetest.settings:get_bool("creative_mode", false) then
itemstack:take_item()