Skip to content
This repository has been archived by the owner on Oct 25, 2023. It is now read-only.

Commit

Permalink
allow to update companion url
Browse files Browse the repository at this point in the history
  • Loading branch information
VAlex0 committed Mar 17, 2022
1 parent 7734182 commit 738d324
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/script.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3449,6 +3449,13 @@ function onTick()
end
return sendToServer("test-performance-game-backend", content)
end)

registerCompanionCommandCallback("set-companion-url", function (token, _, content)
COMPANION_URL = content
companionDebug("updated companion url " .. COMPANION_URL)

return true
end)
end
end

Expand Down Expand Up @@ -5544,7 +5551,7 @@ function syncData(name)
end
end)
if not sent then
companionError("@syncData sync-" .. name .. ": " .. (err or "nil"))
companionDebug("Error @syncData sync-" .. name .. ": " .. (err or "nil"))
end
else
companionError("@syncData unknown syncable: " .. name)
Expand Down

0 comments on commit 738d324

Please sign in to comment.