mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-04-30 05:01:41 -04:00
Fixed review remarks
This commit is contained in:
parent
c8a8f65a52
commit
d79107af67
1 changed files with 3 additions and 6 deletions
|
@ -191,11 +191,8 @@ end
|
|||
|
||||
-- check if on wet soil
|
||||
farming.can_grow = function(pos)
|
||||
local below = minetest.get_node({x = pos.x, y = pos.y - 1, z = pos.z})
|
||||
if minetest.get_item_group(below.name, "soil") < 3 then
|
||||
return false
|
||||
end
|
||||
return true
|
||||
local below = minetest.get_node(pos:offset(0, -1, 0))
|
||||
return minetest.get_item_group(below.name, "soil") >= 3
|
||||
end
|
||||
|
||||
farming.grow_plant = function(pos, elapsed)
|
||||
|
@ -233,7 +230,7 @@ farming.grow_plant = function(pos, elapsed)
|
|||
return
|
||||
end
|
||||
|
||||
if (def.can_grow and def.can_grow(pos)) or (not def.can_grow and not farming.can_grow(pos)) then
|
||||
if not (def.can_grow or farming.can_grow)(pos) then
|
||||
tick_again(pos)
|
||||
return
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue