forked from vgstation-coders/vgstation13
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6a41afd
commit 18b7626
Showing
16 changed files
with
276 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/datum/tgs_http_handler/byond_world_export | ||
|
||
/datum/tgs_http_handler/byond_world_export/PerformGet(url) | ||
// This is an infinite sleep until we get a response | ||
var/export_response = world.Export(url) | ||
TGS_DEBUG_LOG("byond_world_export: Export complete") | ||
|
||
if(!export_response) | ||
TGS_ERROR_LOG("byond_world_export: Failed request: [url]") | ||
return new /datum/tgs_http_result(null, FALSE) | ||
|
||
var/content = export_response["CONTENT"] | ||
if(!content) | ||
TGS_ERROR_LOG("byond_world_export: Failed request, missing content!") | ||
return new /datum/tgs_http_result(null, FALSE) | ||
|
||
var/response_json = TGS_FILE2TEXT_NATIVE(content) | ||
if(!response_json) | ||
TGS_ERROR_LOG("byond_world_export: Failed request, failed to load content!") | ||
return new /datum/tgs_http_result(null, FALSE) | ||
|
||
return new /datum/tgs_http_result(response_json, TRUE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.