Remove plant growth lbm -> abm catch_up

This commit is contained in:
cora 2022-07-27 22:01:53 +02:00 committed by Gitea
parent 56f5ffc09c
commit ff82c71a03
1 changed files with 1 additions and 15 deletions

View File

@ -68,6 +68,7 @@ function mcl_farming:add_plant(identifier, full_grown, names, interval, chance)
nodenames = names,
interval = interval,
chance = chance,
catch_up = true,
action = function(pos, node)
local low_speed = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name ~= "mcl_farming:soil_wet"
mcl_farming:grow_plant(identifier, pos, node, false, false, low_speed)
@ -460,18 +461,3 @@ function mcl_farming:stem_color(startcolor, endcolor, step, step_count)
local colorstring = string.format("#%02X%02X%02X", color.r, color.g, color.b)
return colorstring
end
minetest.register_lbm({
label = "Add growth for unloaded farming plants",
name = "mcl_farming:growth",
nodenames = {"group:plant"},
run_at_every_load = true,
action = function(pos, node)
local identifier = plant_nodename_to_id_list[node.name]
if not identifier then
return
end
local low_speed = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name ~= "mcl_farming:soil_wet"
mcl_farming:grow_plant(identifier, pos, node, false, false, low_speed)
end,
})