Respond to iris opening quicker

This commit is contained in:
2026-01-02 00:24:27 -05:00
parent d11641693b
commit 037445da00
4 changed files with 43 additions and 12 deletions

View File

@ -82,8 +82,9 @@ function handlers.handlePasswordInput()
elseif eventType == "stargate_message_received" then
-- Pass to message handler
handlers.handleMessage(table.unpack(event))
-- Check if iris opened
if state.lastReceivedMessage == "IRIS_OPEN" then
-- Check if iris opened (via password or GDO)
if state.lastReceivedMessage == "IRIS_OPEN" or state.lastReceivedMessage == "GDO_IRIS_OPEN" then
utils.log("Received iris open confirmation: " .. state.lastReceivedMessage)
state.lastReceivedMessage = nil
state.enteringPassword = false
return "IRIS_OPENED"
@ -258,6 +259,13 @@ function handlers.handleGDOTransmission(eventType, side, frequency, idc, matches
utils.log("Valid GDO code received - opening iris")
utils.debug("Valid GDO - opening iris")
utils.openIris()
-- Send message to remote gate that iris opened via GDO
if config.enableMessaging then
gate.sendStargateMessage("GDO_IRIS_OPEN")
utils.log("Sent GDO iris open notification to remote gate")
utils.debug("Sent: GDO_IRIS_OPEN")
end
end
return "gdo_received"