feat: replace CreateHTTPRequest with CreateHTTPRequestScriptVM

Allows the game client to make HTTP API calls from a listen server
(local lobby) instead of requiring a Steam dedicated server.
CreateHTTPRequestScriptVM has the exact same API signature but works
in both dedicated server and listen server contexts.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
achmad
2026-05-29 17:36:08 +07:00
parent 49b790349f
commit 72b73c4dd6
16 changed files with 70 additions and 70 deletions
+3 -3
View File
@@ -188,7 +188,7 @@ local function saveArcadePityToBackend(self, playerId, state)
if not steamId then
return
end
local request = CreateHTTPRequest(
local request = CreateHTTPRequestScriptVM(
"PUT",
((SERVER_CONFIG.API_URL .. "/player/") .. tostring(steamId)) .. "/arcade_pity"
)
@@ -209,7 +209,7 @@ function ____exports.loadArcadePityForPlayer(self, playerId)
if not steamId then
return
end
local request = CreateHTTPRequest(
local request = CreateHTTPRequestScriptVM(
"GET",
((SERVER_CONFIG.API_URL .. "/player/") .. tostring(steamId)) .. "/arcade_pity"
)
@@ -547,7 +547,7 @@ local function tryConsumeArcadePackCredit(self, playerId, packId, onDone)
onDone(nil, false)
return
end
local request = CreateHTTPRequest(
local request = CreateHTTPRequestScriptVM(
"POST",
((SERVER_CONFIG.API_URL .. "/player/") .. tostring(steamId)) .. "/arcade_pack_credits/consume"
)