From 15ce440286291ef8f19c7975f7ce9c3e79ed24d1 Mon Sep 17 00:00:00 2001 From: kromka-chleba <65868699+kromka-chleba@users.noreply.github.com> Date: Sun, 10 Sep 2023 10:46:56 +0000 Subject: [PATCH] Make flowing liquids "fall through" for water source nodes This makes liquids in float and falling_node groups fall through flowing liquid nodes instead of being supported by them in the air. --- builtin/game/falling.lua | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/builtin/game/falling.lua b/builtin/game/falling.lua index ee2647fd50fc..5135c10eb7ae 100644 --- a/builtin/game/falling.lua +++ b/builtin/game/falling.lua @@ -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