diff --git a/reactor-plc/startup.lua b/reactor-plc/startup.lua index 0c8022f..66435d9 100644 --- a/reactor-plc/startup.lua +++ b/reactor-plc/startup.lua @@ -19,7 +19,7 @@ local plc = require("reactor-plc.plc") local renderer = require("reactor-plc.renderer") local threads = require("reactor-plc.threads") -local R_PLC_VERSION = "v1.5.5" +local R_PLC_VERSION = "v1.5.6" local println = util.println local println_ts = util.println_ts diff --git a/reactor-plc/threads.lua b/reactor-plc/threads.lua index 10634ef..12ae75a 100644 --- a/reactor-plc/threads.lua +++ b/reactor-plc/threads.lua @@ -165,7 +165,7 @@ function threads.thread__main(smem, init) local type, device = ppm.handle_unmount(param1) if type ~= nil and device ~= nil then - if type == "fissionReactorLogicAdapter" then + if device == plc_dev.reactor then println_ts("reactor disconnected!") log.error("reactor logic adapter disconnected") @@ -205,7 +205,7 @@ function threads.thread__main(smem, init) local type, device = ppm.mount(param1) if type ~= nil and device ~= nil then - if type == "fissionReactorLogicAdapter" then + if plc_state.no_reactor and (type == "fissionReactorLogicAdapter") then -- reconnected reactor plc_dev.reactor = device plc_state.no_reactor = false