This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- SPDX-FileCopyrightText: 2017 Daniel Ratcliffe | |
| -- | |
| -- SPDX-License-Identifier: LicenseRef-CCPL | |
| -- | |
| -- Patched to add Classic Peripherals' Radio Towers by Drucifer (Discord) 10/2025 | |
| -- Find modems and radio towers | |
| local tModems, tTowers, bAntFound = {}, {}, false | |
| for _, sModem in ipairs(peripheral.getNames()) do | |
| if peripheral.getType(sModem) == "modem" then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --Example PASC tuner, minimal code to start listening; usage: exampleTunerPASC [channel_number] (eg: exampleTunerPASC 1337) | |
| local modem=peripheral.find("modem",function(n,v)return v.isWireless()end) | |
| local speaker_left=peripheral.wrap("left") | |
| local speaker_right=peripheral.wrap("right") | |
| if not modem then error("No wireless modem found.",3) end | |
| local args={...} --Capture arguments | |
| local chan=args[1] and tonumber(args[1]) or nil | |
| if type(chan)=="number" then | |
| modem.open(chan) --Open channel | |
| while true do --Playback loop |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --PASC Discovery tool | |
| --Drucifer | |
| local find,pullEvent,serialize=_G.peripheral.find,_G.os.pullEvent,_G.textutils.serialize | |
| local modem=find("modem",function(n,v)return v.isWireless()end) | |
| repeat | |
| modem.open(759) | |
| until modem.isOpen(759) |