From c5a18b63461a6fbedd5b43d307e0561dd11e4acb Mon Sep 17 00:00:00 2001 From: Moonlit Productions Date: Fri, 2 Jan 2026 01:13:57 -0500 Subject: [PATCH] I did fix it, but had to do another fix too --- startup.lua | 60 ++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 53 insertions(+), 7 deletions(-) diff --git a/startup.lua b/startup.lua index 60c7079..afa9eb4 100644 --- a/startup.lua +++ b/startup.lua @@ -697,16 +697,29 @@ local function handleOutgoingDial() end end + -- Check if remote iris is closed (for safety, not password prompting) + local remoteIrisState = nil + if transceiver then + remoteIrisState = transceiver.checkConnectedShielding() + end + + -- Close local iris if remote iris is closed (unsafe for travel) + if remoteIrisState and remoteIrisState > 0 then + if config.irisEnabled then + utils.closeIris() + end + if remoteIrisState == 100 then + utils.log("WARNING: Remote iris is fully closed!") + else + utils.log("WARNING: Remote iris is " .. remoteIrisState .. "% closed!") + end + end + local connectionSafe = false -- If remote computer requested a password, show the prompt if state.remotePasswordRequired then utils.log("Password required by remote gate") - - -- Close local iris to protect travelers - if config.irisEnabled then - utils.closeIris() - end local result = HandlePasswordEntry() @@ -742,6 +755,14 @@ local function handleOutgoingDial() end end + -- Re-check remote iris state after password/GDO attempt + if transceiver then + remoteIrisState = transceiver.checkConnectedShielding() + if not remoteIrisState or remoteIrisState == 0 then + connectionSafe = true + end + end + -- If still not safe, show warning if not connectionSafe then mon.setBackgroundColor(colors.red) @@ -757,8 +778,33 @@ local function handleOutgoingDial() display.drawDisconnectButton() end else - -- No password required - connection is safe - connectionSafe = true + -- No password required - check if remote iris is open + if transceiver then + remoteIrisState = transceiver.checkConnectedShielding() + end + + if not remoteIrisState or remoteIrisState == 0 then + -- Remote iris is open - connection is safe + connectionSafe = true + else + -- Remote iris is closed but no password system - show warning + utils.log("WARNING: Remote iris closed but no password system available") + mon.setBackgroundColor(colors.red) + mon.clear() + mon.setTextScale(1) + mon.setCursorPos(6, 5) + mon.write("REMOTE IRIS") + mon.setCursorPos(8, 7) + if remoteIrisState == 100 then + mon.write("CLOSED!") + else + mon.write(remoteIrisState .. "% CLOSED") + end + mon.setCursorPos(3, 10) + mon.write("Connection unsafe") + display.drawIrisStatus() + display.drawDisconnectButton() + end end utils.log("DEBUG: Before iris opening check - connectionSafe=" ..