From 13f6c8deb87ed3241b771f63bb50840506997331 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Sun, 6 May 2018 09:12:26 -0400 Subject: [PATCH 1/2] Add missing TRUE return to v3202 API --- DMAPI/tgs/v3210/api.dm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/DMAPI/tgs/v3210/api.dm b/DMAPI/tgs/v3210/api.dm index 5f69889f07..2302249763 100644 --- a/DMAPI/tgs/v3210/api.dm +++ b/DMAPI/tgs/v3210/api.dm @@ -57,6 +57,8 @@ return splittext(trim_left(trim_right(file2text(filename))), "\n") /datum/tgs_api/v3210/OnWorldNew(datum/tgs_event_handler/event_handler) //don't use event handling in this version + . = FALSE + comms_key = world.params[SERVICE_WORLD_PARAM] instance_name = world.params[SERVICE_INSTANCE_PARAM] if(!instance_name) @@ -72,9 +74,10 @@ if(world.system_type != MS_WINDOWS) TGS_ERROR_LOG("This API version is only supported on Windows. Not running on Windows. Aborting initialization!") - return FALSE + return ListServiceCustomCommands(TRUE) ExportService("[SERVICE_REQUEST_API_VERSION] [ApiVersion()]", TRUE) + return TRUE //nothing to do for v3 /datum/tgs_api/v3210/OnInitializationComplete() From bf57f9193a050c9a44dc67ff56d44442e0d52a79 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Sun, 6 May 2018 09:13:53 -0400 Subject: [PATCH 2/2] Fix activation message occuring for failed instatiations --- DMAPI/tgs/core/core.dm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/DMAPI/tgs/core/core.dm b/DMAPI/tgs/core/core.dm index b15fd2c261..d24bc2c9ae 100644 --- a/DMAPI/tgs/core/core.dm +++ b/DMAPI/tgs/core/core.dm @@ -8,12 +8,14 @@ TGS_ERROR_LOG("Found unsupported API version: [tgs_version]. If this is a valid version please report this, backporting is done on demand.") return + TGS_INFO_LOG("Activating API for version [tgs_version]") var/datum/tgs_api/new_api = new path - TGS_INFO_LOG("Activated tgstation-server API for version [tgs_version]") var/result = new_api.OnWorldNew(event_handler ? event_handler : new /datum/tgs_event_handler/tgs_default) if(result && result != TGS_UNIMPLEMENTED) TGS_WRITE_GLOBAL(tgs, new_api) + else + TGS_ERROR_LOG("Failed to activate API!") /world/proc/SelectTgsApi(tgs_version) //remove the old 3.0 header