From 187d63ca0633af3d7cfd12eab1f7bd951b6e00bf Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Wed, 24 Oct 2018 11:00:26 -0400 Subject: [PATCH] DMAPI update --- code/modules/tgs/v3210/api.dm | 1 + code/modules/tgs/v4/api.dm | 11 ++++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/code/modules/tgs/v3210/api.dm b/code/modules/tgs/v3210/api.dm index 8afc81c100d..583c9d5a0b1 100644 --- a/code/modules/tgs/v3210/api.dm +++ b/code/modules/tgs/v3210/api.dm @@ -171,6 +171,7 @@ var/datum/tgs_revision_information/ri = new ri.commit = commit ri.origin_commit = originmastercommit + return ri /datum/tgs_api/v3210/EndProcess() sleep(world.tick_lag) //flush the buffers diff --git a/code/modules/tgs/v4/api.dm b/code/modules/tgs/v4/api.dm index 2d6faca3ce0..b3d5407fe0d 100644 --- a/code/modules/tgs/v4/api.dm +++ b/code/modules/tgs/v4/api.dm @@ -269,21 +269,26 @@ for(var/I in channels) var/datum/tgs_chat_channel/channel = I ids += channel.id - message = list("message" = message, "channels" = ids) + message = list("message" = message, "channelIds" = ids) if(intercepted_message_queue) intercepted_message_queue += list(message) else Export(TGS4_COMM_CHAT, message) /datum/tgs_api/v4/ChatTargetedBroadcast(message, admin_only) - message = list("message" = message, "channels" = admin_only ? "admin" : "game") + var/list/channels = list() + for(var/I in ChatChannelInfo()) + var/datum/tgs_chat_channel/channel = I + if (!channel.is_private_channel && ((channel.is_admin_channel && admin_only) || (!channel.is_admin_channel && !admin_only))) + channels += channel.id + message = list("message" = message, "channelIds" = channels) if(intercepted_message_queue) intercepted_message_queue += list(message) else Export(TGS4_COMM_CHAT, message) /datum/tgs_api/v4/ChatPrivateMessage(message, datum/tgs_chat_user/user) - message = list("message" = message, "user" = list("id" = user.id, "channel" = user.channel.id)) + message = list("message" = message, "channelIds" = list(user.channel.id)) if(intercepted_message_queue) intercepted_message_queue += list(message) else