forked from Sandstorm-Station/Sandstorm-Station-13
-
-
Notifications
You must be signed in to change notification settings - Fork 283
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'Sandstorm-Station:master' into master
- Loading branch information
Showing
8 changed files
with
116 additions
and
44 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
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
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