-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #288 from DS-13-Dev-Team/tgs-dmapi-update
Automatic TGS DMAPI Update
- Loading branch information
Showing
9 changed files
with
119 additions
and
45 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
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