refactor: enhance player position update to include label and timestamp for improved tracking

This commit is contained in:
MayaTheShy
2026-02-20 04:31:47 -05:00
parent f61e7ca185
commit 720c6c20fb

View File

@@ -98,10 +98,10 @@ local function updateMyPosition()
modem.transmit(POCKET_CHANNEL, CHANNEL_RECEIVE, {
type = "player_position",
playerID = os.getComputerID(),
label = os.getComputerLabel() or ("Pocket #" .. os.getComputerID()),
position = myPosition,
timestamp = os.epoch("utc")
})
addLog("GPS: " .. x .. "," .. y .. "," .. z, colors.lime)
return true
else
addLog("GPS: Failed to locate", colors.red)
@@ -556,7 +556,7 @@ parallel.waitForAny(
function()
-- GPS update loop
while true do
sleep(5)
sleep(2)
updateMyPosition()
end
end,