forked from VoxeLibre/VoxeLibre
Remove plant growth lbm -> abm catch_up
This commit is contained in:
parent
56f5ffc09c
commit
ff82c71a03
|
@ -68,6 +68,7 @@ function mcl_farming:add_plant(identifier, full_grown, names, interval, chance)
|
||||||
nodenames = names,
|
nodenames = names,
|
||||||
interval = interval,
|
interval = interval,
|
||||||
chance = chance,
|
chance = chance,
|
||||||
|
catch_up = true,
|
||||||
action = function(pos, node)
|
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"
|
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)
|
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)
|
local colorstring = string.format("#%02X%02X%02X", color.r, color.g, color.b)
|
||||||
return colorstring
|
return colorstring
|
||||||
end
|
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,
|
|
||||||
})
|
|
||||||
|
|
Loading…
Reference in New Issue