Skip to content

Commit

Permalink
Make flowing liquids "fall through" for water source nodes
Browse files Browse the repository at this point in the history
This makes liquids in float and falling_node groups fall through
flowing liquid nodes instead of being supported by them in the air.
  • Loading branch information
kromka-chleba committed Sep 18, 2023
1 parent 8820b41 commit 15ce440
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions builtin/game/falling.lua
Expand Up @@ -536,13 +536,17 @@ function core.check_single_for_falling(p)
local success, _ = convert_to_falling_node(p, n)
return success
end
local d_falling = core.registered_nodes[n.name]
-- Otherwise only if the bottom node is considered "fall through"
if not same and
(not d_bottom.walkable or d_bottom.buildable_to) and
(core.get_item_group(n.name, "float") == 0 or
d_bottom.liquidtype == "none") then
local success, _ = convert_to_falling_node(p, n)
return success
(not d_bottom.walkable or d_bottom.buildable_to) and
((core.get_item_group(n.name, "float") == 0 or
d_bottom.liquidtype == "none") or
(core.get_item_group(n.name, "float") > 0 and
d_falling.liquidtype == "source" and
d_bottom.liquidtype ~= "source")) then
local success, _ = convert_to_falling_node(p, n)
return success
end
end
end
Expand Down

0 comments on commit 15ce440

Please sign in to comment.