forked from VoxeLibre/VoxeLibre
Compare commits
1 Commits
master
...
fix-server
Author | SHA1 | Date |
---|---|---|
|
ff82c71a03 |
|
@ -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,
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue