Fix teleport pipe pump bug
This commit is contained in:
parent
7281ec7af7
commit
bdc6074790
@ -161,19 +161,21 @@ liquid.register_nodes({"techage:ta5_tele_pipe"}, Pipe, "tank", {"L"}, {
|
|||||||
nvm.oil_amount = nvm.oil_amount or 0
|
nvm.oil_amount = nvm.oil_amount or 0
|
||||||
if not blocked and techage.is_operational(nvm) then
|
if not blocked and techage.is_operational(nvm) then
|
||||||
local rmt_pos = teleport.get_remote_pos(pos)
|
local rmt_pos = teleport.get_remote_pos(pos)
|
||||||
local rmt_nvm = techage.get_nvm(rmt_pos)
|
if rmt_pos then
|
||||||
if techage.is_operational(rmt_nvm) then
|
local rmt_nvm = techage.get_nvm(rmt_pos)
|
||||||
local pipe_dir = M(rmt_pos):get_int("pipe_dir")
|
if techage.is_operational(rmt_nvm) then
|
||||||
blocked = true
|
local pipe_dir = M(rmt_pos):get_int("pipe_dir")
|
||||||
local leftover = liquid.put(rmt_pos, Pipe, pipe_dir, name, amount)
|
blocked = true
|
||||||
blocked = false
|
local leftover = liquid.put(rmt_pos, Pipe, pipe_dir, name, amount)
|
||||||
if leftover < amount then
|
blocked = false
|
||||||
State:keep_running(pos, nvm, COUNTDOWN_TICKS)
|
if leftover < amount then
|
||||||
State:keep_running(rmt_pos, rmt_nvm, COUNTDOWN_TICKS)
|
State:keep_running(pos, nvm, COUNTDOWN_TICKS)
|
||||||
|
State:keep_running(rmt_pos, rmt_nvm, COUNTDOWN_TICKS)
|
||||||
|
end
|
||||||
|
return leftover
|
||||||
|
else
|
||||||
|
State:blocked(pos, nvm, S("Remote block error"))
|
||||||
end
|
end
|
||||||
return leftover
|
|
||||||
else
|
|
||||||
State:blocked(pos, nvm, S("Remote block error"))
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return amount
|
return amount
|
||||||
|
Loading…
Reference in New Issue
Block a user