mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-04-30 13:11: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
|
-- check if on wet soil
|
||||||
farming.can_grow = function(pos)
|
farming.can_grow = function(pos)
|
||||||
local below = minetest.get_node({x = pos.x, y = pos.y - 1, z = pos.z})
|
local below = minetest.get_node(pos:offset(0, -1, 0))
|
||||||
if minetest.get_item_group(below.name, "soil") < 3 then
|
return minetest.get_item_group(below.name, "soil") >= 3
|
||||||
return false
|
|
||||||
end
|
|
||||||
return true
|
|
||||||
end
|
end
|
||||||
|
|
||||||
farming.grow_plant = function(pos, elapsed)
|
farming.grow_plant = function(pos, elapsed)
|
||||||
|
@ -233,7 +230,7 @@ farming.grow_plant = function(pos, elapsed)
|
||||||
return
|
return
|
||||||
end
|
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)
|
tick_again(pos)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue