This commit is contained in:
Joachim Stolberg 2019-03-05 18:38:41 +01:00
parent 5c79631bbd
commit f7043f4e10
3 changed files with 6 additions and 4 deletions

View File

@ -259,7 +259,7 @@ function NodeStates:blocked(pos, mem)
end
function NodeStates:fault(pos, mem)
if mem.techage_state == RUNNING then
if mem.techage_state == RUNNING or mem.techage_state == STOPPED then
mem.techage_state = FAULT
if self.node_name_passive then
local node = minetest.get_node(pos)

View File

@ -125,8 +125,10 @@ local function check_power_consumption(pos, dir)
local mem = tubelib2.get_mem(pos)
Route = {}
local sum = power_consumption(pos, dir)
if sum < 1 then
Route = {}
turn_on(pos, nil, sum > 0)
turn_on(pos, nil, false)
end
end
--

View File

@ -20,7 +20,7 @@ end
-- To be able to check if power connection is on the
-- correct node side (mem.power_dir == in_dir)
local function valid_power_dir(pos, mem, in_dir)
print("valid_power_dir", mem.power_dir, in_dir)
--print("valid_power_dir", mem.power_dir, in_dir)
return true
end