#580 reactor PLC changes for wired comms modems

This commit is contained in:
Mikayla
2025-05-05 17:54:47 +00:00
parent 04c53c7074
commit 454d166ac9
5 changed files with 43 additions and 15 deletions

View File

@@ -447,6 +447,19 @@ end
---@return table|nil reactor function table
function ppm.get_fission_reactor() return ppm.get_device("fissionReactorLogicAdapter") end
-- get the named wired modem
---@nodiscard
---@param iface string CC peripheral interface
---@return Modem|nil modem function table
function ppm.get_wired_modem(iface)
local modem = nil
local device = ppm_sys.mounts[iface]
if device.type == "modem" then modem = device.dev end
return modem
end
-- get the wireless modem (if multiple, returns the first)<br>
-- if this is in a CraftOS emulated environment, wired modems will be used instead
---@nodiscard