controller event bugfix

This commit is contained in:
Joachim Stolberg 2019-02-10 13:28:17 +01:00
parent f2876b191f
commit 9e12dc1ae7
2 changed files with 2 additions and 2 deletions

@ -525,7 +525,7 @@ minetest.register_craft({
-- write inputs from remote nodes
local function set_input(pos, number, input, val)
if input and M(pos):get_int("state") == tubelib.RUNNING then
if Cache[number] and Cache[number].inputs then
if (Cache[number] or compile(pos, M(pos), number)) and Cache[number].inputs then
if input == "msg" then
if #Cache[number].inputs["msg"] < 10 then
table.insert(Cache[number].inputs["msg"], val)

@ -69,7 +69,7 @@ function tubelib.state(running)
elseif running == -2 then
return tubelib.BLOCKED
else
return tubelib.FAULT
return tubelib.STOPPED
end
end