#312 improved reactor peripheral handling

This commit is contained in:
Mikayla 2023-08-11 14:20:13 +00:00
parent b2c55f9d4b
commit 17731de61b
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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