evaporation bug fix

quiet down the debug printing
master
Izzy 2019-04-09 00:11:07 -06:00
parent 80a5f9c848
commit 5c542a4241
3 changed files with 16 additions and 16 deletions

View File

@ -202,7 +202,7 @@ minetest.register_abm({
-- evaporation
minetest.register_abm({
nodenames = {"group:fresh_water"},
neighbors = {"group:fresh_water", "air"},
neighbors = {"air"},
interval = 5,
chance = 10,
action = function(pos)
@ -329,7 +329,7 @@ minetest.register_abm({
minetest.register_abm({
nodenames = {"springs:water_full"},
neighbors = {"air"},
interval = 5,
interval = 6,
chance = 1,
action = function(pos)
-- if it's near air it might flow
@ -341,8 +341,8 @@ minetest.register_abm({
minetest.register_abm({
nodenames = {"springs:water"},
neighbors = {"group:fresh_water", "air"},
interval = 1,
chance = 1,
interval = 2,
chance = 2,
action = function(pos)
local mylevel = minetest.get_node_level(pos)
-- print("\n mylevel ".. mylevel)

View File

@ -26,7 +26,7 @@ end
-- centralized network creation for consistency
local function new_network(pos)
local hash = minetest.hash_node_position(pos)
print("new network: hash: ".. hash .." name: " ..netname);
-- print("new network: hash: ".. hash .." name: " ..netname);
networks[hash] = {
hash = hash,
@ -65,7 +65,7 @@ local function check_merge(pos)
local pnet = networks[nphash]
if nil == current_net then
print("joining existing network: ".. pnet.name)
-- print("joining existing network: ".. pnet.name)
net_members[hash] = nphash
current_net = nphash
pnet.count = pnet.count + 1
@ -352,12 +352,12 @@ springs.pipes.push_fluid = function(pos, fluid, amount, extra_pressure)
pnet.in_pressure = pnet.in_pressure or -32000
if pnet.in_pressure > input_pres then
print("backflow at intake: " .. pnet.in_pressure.. " > " ..input_pres )
-- print("backflow at intake: " .. pnet.in_pressure.. " > " ..input_pres )
return 0
end
pnet.in_pressure = math.max(pnet.in_pressure, input_pres)
print("net pressure: ".. pnet.in_pressure)
--print("net pressure: ".. pnet.in_pressure)
local rate = amount --math.max(1, math.ceil(ulevel / 2))
local cap = 64
@ -492,7 +492,7 @@ minetest.register_abm({
pos.y = pos.y + 1
local unode = minetest.get_node(pos)
if unode.name ~= "springs:water" and unode.name ~= "springs:water_full" then
print("no water near intake")
-- print("no water near intake")
return
end
@ -509,7 +509,7 @@ minetest.register_abm({
pnet.in_pressure = pnet.in_pressure or -32000
if pnet.in_pressure > pos.y - 1 then
print("backflow at intake: " .. pnet.in_pressure.. " > " ..(pos.y - 1) )
-- print("backflow at intake: " .. pnet.in_pressure.. " > " ..(pos.y - 1) )
return
end

View File

@ -154,15 +154,15 @@ minetest.register_abm({
-- end
local lift = 70
print("fpos ".. minetest.pos_to_string(frontpos) .. " | bpos "..minetest.pos_to_string(backpos))
print("fp ".. frontnet.in_pressure .. " | bp "..backnet.in_pressure)
--print("fpos ".. minetest.pos_to_string(frontpos) .. " | bpos "..minetest.pos_to_string(backpos))
--print("fp ".. frontnet.in_pressure .. " | bp "..backnet.in_pressure)
local taken, fluid = springs.pipes.take_fluid(frontpos, 10, 0, 2)
local pushed = springs.pipes.push_fluid(backpos, fluid, taken, lift)
print("pumped " ..taken .. " > "..pushed)
--print("pumped " ..taken .. " > "..pushed)
if pushed < taken then
print("pump leaked ".. (taken - pushed))
end
-- if pushed < taken then
-- print("pump leaked ".. (taken - pushed))
-- end
--print("")
end