Logging updates.

This commit is contained in:
Harrison Deng 2021-05-03 14:33:36 -05:00
parent 5802c9372d
commit 4385aa23a0
2 changed files with 2 additions and 2 deletions

View File

@ -100,7 +100,7 @@ end
local function handleMessage(sender, type, data) local function handleMessage(sender, type, data)
if type == LOG then if type == LOG then
print("[" .. sender .. "]: " .. data["log"] .. " : " .. (data["content"] and textutils.serialiseJSON(data["content"]) or "")) print("[" .. sender .. "]: " .. data["log"] .. " : " .. (data["content"] and textutils.serialise(data["content"]) or ""))
elseif type == REQUEST then elseif type == REQUEST then
handleRequest(sender, data["request"], data["content"]) handleRequest(sender, data["request"], data["content"])
end end

View File

@ -278,7 +278,7 @@ local function determineHeading()
end end
local function moveBy(delta, forward, right) local function moveBy(delta, forward, right)
sendLog("Attempting to move by (" .. delta.x .. "," .. delta.y .. "," .. delta.z .. ") (x,y,z).") sendLog(MOVEBY, "Attempting to move by (" .. delta.x .. "," .. delta.y .. "," .. delta.z .. ") (x,y,z).")
-- x first -- x first
if delta.x ~= 0 then if delta.x ~= 0 then
sendLog(MOVEBY, "Moving on x axis by: " .. delta.x) sendLog(MOVEBY, "Moving on x axis by: " .. delta.x)