Added some verbosity.

Mostly to test if the in-game computer can download on startup.
This commit is contained in:
Harrison Deng 2021-05-03 12:52:11 -05:00
parent 6a791d2741
commit 3fd7385441

View File

@ -27,10 +27,11 @@ local FAILED = "failed"
running = true
local modem = peripheral.find("modem")
print("Checking for modem.")
if (modem == nil) then
error("Modem not found.")
end
print("Modem found.")
local function captureString(str, seq)
if seq == nil then seq = "([^%s]+)" end
@ -60,6 +61,7 @@ local function interpretData(data)
end
-- User command loop
print("Now listening for user input.")
local function listenForCommands()
while running do
printPrompt()
@ -108,7 +110,6 @@ local function listenToMiners()
while running do
local event, side, channel, reply, message, distance = os.pullEvent("modem_message")
print("")
print("Recieved data.")
local token, recipient, sender, type, content = interpretData(message)
if token == TOKEN and recipient == HOST then
handleMessage(sender, content, type)