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:
@@ -36,7 +36,7 @@ function ____exports.loadEquipmentStateFromApi(self, playerId, onDone)
|
||||
onDone(nil, nil)
|
||||
return
|
||||
end
|
||||
local req = CreateHTTPRequest(
|
||||
local req = CreateHTTPRequestScriptVM(
|
||||
"GET",
|
||||
((SERVER_CONFIG.API_URL .. "/player/") .. tostring(steamId)) .. "/equipment"
|
||||
)
|
||||
@@ -63,7 +63,7 @@ function ____exports.saveEquipmentStateToApi(self, playerId, state)
|
||||
if not steamId then
|
||||
return
|
||||
end
|
||||
local req = CreateHTTPRequest(
|
||||
local req = CreateHTTPRequestScriptVM(
|
||||
"PUT",
|
||||
((SERVER_CONFIG.API_URL .. "/player/") .. tostring(steamId)) .. "/equipment"
|
||||
)
|
||||
@@ -79,7 +79,7 @@ function ____exports.postEquipmentDropToApi(self, playerId, item)
|
||||
if not steamId then
|
||||
return
|
||||
end
|
||||
local req = CreateHTTPRequest(
|
||||
local req = CreateHTTPRequestScriptVM(
|
||||
"POST",
|
||||
((SERVER_CONFIG.API_URL .. "/player/") .. tostring(steamId)) .. "/equipment/drop"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user