bugfixes
This commit is contained in:
parent
5c79631bbd
commit
f7043f4e10
@ -259,7 +259,7 @@ function NodeStates:blocked(pos, mem)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function NodeStates:fault(pos, mem)
|
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
|
mem.techage_state = FAULT
|
||||||
if self.node_name_passive then
|
if self.node_name_passive then
|
||||||
local node = minetest.get_node(pos)
|
local node = minetest.get_node(pos)
|
||||||
|
@ -125,8 +125,10 @@ local function check_power_consumption(pos, dir)
|
|||||||
local mem = tubelib2.get_mem(pos)
|
local mem = tubelib2.get_mem(pos)
|
||||||
Route = {}
|
Route = {}
|
||||||
local sum = power_consumption(pos, dir)
|
local sum = power_consumption(pos, dir)
|
||||||
Route = {}
|
if sum < 1 then
|
||||||
turn_on(pos, nil, sum > 0)
|
Route = {}
|
||||||
|
turn_on(pos, nil, false)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--
|
--
|
||||||
|
@ -20,7 +20,7 @@ end
|
|||||||
-- To be able to check if power connection is on the
|
-- To be able to check if power connection is on the
|
||||||
-- correct node side (mem.power_dir == in_dir)
|
-- correct node side (mem.power_dir == in_dir)
|
||||||
local function valid_power_dir(pos, mem, 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
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user