Fixed printing reference instead of info.

This commit is contained in:
Harrison Deng 2021-05-03 14:59:56 -05:00
parent d239a69470
commit 0396caf149

View File

@ -101,8 +101,8 @@ local function handleMessage(sender, type, data)
if type == LOG then
print("[" .. sender .. "]: " .. data["log"] .. ": " .. (data["content"]["n"] >= 1 and tostring(data["content"][1]) or ""))
if data["log"] == STATUS then
print("Relative position: " .. data["content"][1]["relative_position"]["coordinates"])
print("Position: " .. (data["content"][1]["position"]["coordinates"] and data["content"][1]["position"]["coordinates"] or "not positioned."))
print("Relative position: " .. textutils.serializeJSON(data["content"][1]["relative_position"]["coordinates"]))
print("Position: " .. (data["content"][1]["position"]["coordinates"] and textutils.serialiseJSON(data["content"][1]["position"]["coordinates"]) or "not positioned."))
print("fuel: " .. tostring(data["content"][1]["fuel"]))
print("current task: " .. data["content"][1]["task"])
end