dirt grow abm was executed too often, todo: test if disabled catch_up makes it execute when it loads the node first

master
HybridDog 2016-02-26 23:05:26 +01:00
parent 09b1ec4b8e
commit 2c4a4723f4
1 changed files with 8 additions and 0 deletions

View File

@ -180,12 +180,20 @@ local function conifer_abm_rand_delay(pos)
end
end
local can_grass_abm = true
minetest.register_abm({
nodenames = "default:dirt_with_grass",
interval = INTERVAL,
chance = 9.1,
catch_up = false,
action = function(pos)
if not can_grass_abm then
return
end
can_grass_abm = false
minetest.after(INTERVAL, function()
can_grass_abm = true
end)
minetest.delay_function(INTERVAL-1, conifer_abm_rand_delay, pos)
end
})