mirror of
https://github.com/FaceDeer/dfcaverns.git
synced 2024-12-25 10:20:45 +01:00
add an additional check to ensure old timers don't cause inappropriate growth
This commit is contained in:
parent
1d7b6010c3
commit
0a61781b99
@ -134,6 +134,8 @@ local place_seed = function(itemstack, placer, pointed_thing, plantname)
|
|||||||
local growth_permitted_function = df_farming.growth_permitted[plantname]
|
local growth_permitted_function = df_farming.growth_permitted[plantname]
|
||||||
if not growth_permitted_function or growth_permitted_function(pt.above) then
|
if not growth_permitted_function or growth_permitted_function(pt.above) then
|
||||||
df_farming.plant_timer(pt.above, plantname)
|
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
|
end
|
||||||
if not minetest.settings:get_bool("creative_mode", false) then
|
if not minetest.settings:get_bool("creative_mode", false) then
|
||||||
itemstack:take_item()
|
itemstack:take_item()
|
||||||
|
Loading…
Reference in New Issue
Block a user