From 2c16b9d01fa0f7ae78b63aefce8059bfd72f310b Mon Sep 17 00:00:00 2001 From: Joachim Stolberg Date: Wed, 1 Nov 2023 18:10:58 +0100 Subject: [PATCH] Fix #147 (Sea level might not be y==1 for water inlets) --- liquids/waterinlet.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/liquids/waterinlet.lua b/liquids/waterinlet.lua index afb29c0..866eb5d 100644 --- a/liquids/waterinlet.lua +++ b/liquids/waterinlet.lua @@ -18,9 +18,10 @@ local S = techage.S local Pipe = techage.LiquidPipe local liquid = networks.liquid +local water_level = tonumber(minetest.get_mapgen_setting("water_level")) or 1 local function is_ocean(pos) - if pos.y > 1 then + if pos.y > water_level then M(pos):set_string("infotext", S("Error: Not on sea level!")) return false end