stop timers when seeds are picked up

This commit is contained in:
FaceDeer 2022-08-01 13:21:29 -06:00
parent c8fa25ccd7
commit 1d7b6010c3
2 changed files with 8 additions and 0 deletions

View File

@ -171,6 +171,10 @@ df_farming.register_seed = function(name, description, image, stage_one, grow_ti
on_timer = function(pos, elapsed)
df_farming.grow_underground_plant(pos, "df_farming:"..name, elapsed)
end,
on_destruct = function(pos)
minetest.get_node_timer(pos):stop()
end,
}
minetest.register_node("df_farming:"..name, def)

View File

@ -90,6 +90,10 @@ minetest.register_node("df_farming:plump_helmet_spawn", {
on_timer = function(pos, elapsed)
df_farming.grow_underground_plant(pos, "df_farming:plump_helmet_spawn", elapsed)
end,
on_destruct = function(pos)
minetest.get_node_timer(pos):stop()
end,
})
minetest.register_node("df_farming:plump_helmet_1", {