Fix #147 (Sea level might not be y==1 for water inlets)

This commit is contained in:
Joachim Stolberg 2023-11-01 18:10:58 +01:00
parent c81f62fd39
commit 2c16b9d01f

View File

@ -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