From 749944fbc6502a5e2b1e59cbc7abfcc293fce0b1 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Sat, 29 Aug 2020 21:35:09 +0200 Subject: [PATCH] [MIRROR] Bump DMAPI to 5.2.4 (#564) * Bump DMAPI to 5.2.4 (#53222) Runtime patches * Bump DMAPI to 5.2.4 Co-authored-by: Jordan Brown --- code/__DEFINES/tgs.dm | 2 +- code/modules/tgs/v5/api.dm | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/code/__DEFINES/tgs.dm b/code/__DEFINES/tgs.dm index 35d9dbefbdf..5a143b391ab 100644 --- a/code/__DEFINES/tgs.dm +++ b/code/__DEFINES/tgs.dm @@ -1,6 +1,6 @@ // tgstation-server DMAPI -#define TGS_DMAPI_VERSION "5.2.3" +#define TGS_DMAPI_VERSION "5.2.4" // All functions and datums outside this document are subject to change with any version and should not be relied on. diff --git a/code/modules/tgs/v5/api.dm b/code/modules/tgs/v5/api.dm index 3cd47ec1a6c..524ca1a3c3a 100644 --- a/code/modules/tgs/v5/api.dm +++ b/code/modules/tgs/v5/api.dm @@ -15,8 +15,10 @@ var/datum/tgs_revision_information/revision var/list/chat_channels + var/initialized = FALSE + /datum/tgs_api/v5/ApiVersion() - return new /datum/tgs_version("5.2.3") + return new /datum/tgs_version("5.2.4") /datum/tgs_api/v5/OnWorldNew(minimum_required_security_level) server_port = world.params[DMAPI5_PARAM_SERVER_PORT] @@ -79,6 +81,7 @@ chat_channels = list() DecodeChannels(runtime_information) + initialized = TRUE return TRUE /datum/tgs_api/v5/proc/RequireInitialBridgeResponse() @@ -95,10 +98,13 @@ return json_encode(response) /datum/tgs_api/v5/OnTopic(T) + if(!initialized) + return FALSE //continue world/Topic + var/list/params = params2list(T) var/json = params[DMAPI5_TOPIC_DATA] if(!json) - return FALSE //continue world/Topic + return FALSE var/list/topic_parameters = json_decode(json) if(!topic_parameters)