Fix #147 (Sea level might not be y==1 for water inlets)
This commit is contained in:
parent
c81f62fd39
commit
2c16b9d01f
@ -18,9 +18,10 @@ local S = techage.S
|
|||||||
|
|
||||||
local Pipe = techage.LiquidPipe
|
local Pipe = techage.LiquidPipe
|
||||||
local liquid = networks.liquid
|
local liquid = networks.liquid
|
||||||
|
local water_level = tonumber(minetest.get_mapgen_setting("water_level")) or 1
|
||||||
|
|
||||||
local function is_ocean(pos)
|
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!"))
|
M(pos):set_string("infotext", S("Error: Not on sea level!"))
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user