Fix bone meal failing to grow crops when it's dark

This commit is contained in:
Wuzzy 2019-02-08 05:36:43 +01:00
parent 7d0c647e8b
commit cb8e3fcf82
2 changed files with 10 additions and 9 deletions

View file

@ -24,14 +24,15 @@ end
-- pos: Position
-- node: Node table
-- stages: Number of stages to advance (optional, defaults to 1)
-- ignore_light: if true, ignore light requirements for growing
-- Returns true if plant has been grown by 1 or more stages.
-- Returns false if nothing changed.
function mcl_farming:grow_plant(identifier, pos, node, stages)
if not minetest.get_node_light(pos) then
function mcl_farming:grow_plant(identifier, pos, node, stages, ignore_light)
if not minetest.get_node_light(pos) and not ignore_light then
return false
end
if minetest.get_node_light(pos) < 10 then
if minetest.get_node_light(pos) < 10 and not ignore_light then
return false
end