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:
@@ -1662,7 +1662,7 @@ function GameMode.prototype.saveChatWheelToServer(self, playerId, chatWheel)
|
||||
if not steamId then
|
||||
return
|
||||
end
|
||||
local request = CreateHTTPRequest(
|
||||
local request = CreateHTTPRequestScriptVM(
|
||||
"PUT",
|
||||
((SERVER_CONFIG.API_URL .. "/player/") .. tostring(steamId)) .. "/chat_wheel"
|
||||
)
|
||||
@@ -1691,7 +1691,7 @@ function GameMode.prototype.saveSoundsWheelToServer(self, playerId, soundsWheel)
|
||||
if not steamId then
|
||||
return
|
||||
end
|
||||
local request = CreateHTTPRequest(
|
||||
local request = CreateHTTPRequestScriptVM(
|
||||
"PUT",
|
||||
((SERVER_CONFIG.API_URL .. "/player/") .. tostring(steamId)) .. "/sounds_wheel"
|
||||
)
|
||||
@@ -1720,7 +1720,7 @@ function GameMode.prototype.loadChatWheelSoundsFromServer(self, playerId)
|
||||
if not steamId then
|
||||
return
|
||||
end
|
||||
local chatWheelRequest = CreateHTTPRequest(
|
||||
local chatWheelRequest = CreateHTTPRequestScriptVM(
|
||||
"GET",
|
||||
((SERVER_CONFIG.API_URL .. "/player/") .. tostring(steamId)) .. "/chat_wheel"
|
||||
)
|
||||
@@ -1767,7 +1767,7 @@ function GameMode.prototype.loadChatWheelSoundsFromServer(self, playerId)
|
||||
)
|
||||
end
|
||||
end)
|
||||
local soundsWheelRequest = CreateHTTPRequest(
|
||||
local soundsWheelRequest = CreateHTTPRequestScriptVM(
|
||||
"GET",
|
||||
((SERVER_CONFIG.API_URL .. "/player/") .. tostring(steamId)) .. "/sounds_wheel"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user