diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm index 7bdca42c3b3..af087eb6082 100644 --- a/code/__DEFINES/misc.dm +++ b/code/__DEFINES/misc.dm @@ -262,8 +262,6 @@ #define TRIGGER_GUARD_NONE 0 #define TRIGGER_GUARD_NORMAL 1 -#define CLIENT_FROM_VAR(I) (ismob(I) ? I:client : (istype(I, /client) ? I : (istype(I, /datum/mind) ? I:current?:client : null))) - // Macro to get the current elapsed round time, rather than total world runtime #define ROUND_TIME (SSticker.round_start_time ? (world.time - SSticker.round_start_time) : 0) diff --git a/code/__DEFINES/subsystems.dm b/code/__DEFINES/subsystems.dm index 153eca7f373..3201e522b57 100644 --- a/code/__DEFINES/subsystems.dm +++ b/code/__DEFINES/subsystems.dm @@ -80,8 +80,6 @@ #define INIT_ORDER_NANOMOB -23 #define INIT_ORDER_SQUEAK -40 #define INIT_ORDER_PATH -50 -#define INIT_ORDER_PERSISTENCE -95 -#define INIT_ORDER_CHAT -100 //Should be last to ensure chat remains smooth during init. // Subsystem fire priority, from lowest to highest priority // If the subsystem isn't listed here it's either DEFAULT or PROCESS (if it's a processing subsystem child) @@ -113,7 +111,6 @@ #define FIRE_PRIORITY_MOBS 100 #define FIRE_PRIORITY_NANOUI 110 #define FIRE_PRIORITY_TICKER 200 -#define FIRE_PRIORITY_CHAT 400 #define FIRE_PRIORITY_OVERLAYS 500 #define FIRE_PRIORITY_INPUT 1000 // This must always always be the max highest priority. Player input must never be lost. diff --git a/code/controllers/subsystem/chat.dm b/code/controllers/subsystem/chat.dm deleted file mode 100644 index 4eb468a0952..00000000000 --- a/code/controllers/subsystem/chat.dm +++ /dev/null @@ -1,67 +0,0 @@ -SUBSYSTEM_DEF(chat) - name = "Chat" - flags = SS_TICKER|SS_NO_INIT - wait = 1 - priority = FIRE_PRIORITY_CHAT - init_order = INIT_ORDER_CHAT - offline_implications = "Chat messages will no longer be cleanly queued. No immediate action is needed." - - var/list/payload = list() - - -/datum/controller/subsystem/chat/fire() - for(var/i in payload) - var/client/C = i - if(C) - C << output(payload[C], "browseroutput:output") - payload -= C - - if(MC_TICK_CHECK) - return - - -/datum/controller/subsystem/chat/proc/queue(target, message, flag) - if(!target || !message) - return - - if(!istext(message)) - stack_trace("to_chat called with invalid input type") - return - - if(target == world) - target = GLOB.clients - - //Some macros remain in the string even after parsing and fuck up the eventual output - message = replacetext(message, "\improper", "") - message = replacetext(message, "\proper", "") - message += "
" - - - //url_encode it TWICE, this way any UTF-8 characters are able to be decoded by the Javascript. - //Do the double-encoding here to save nanoseconds - var/twiceEncoded = url_encode(url_encode(message)) - - if(islist(target)) - for(var/I in target) - var/client/C = CLIENT_FROM_VAR(I) //Grab us a client if possible - - if(!C?.chatOutput || C.chatOutput.broken) //A player who hasn't updated his skin file. - continue - - if(!C.chatOutput.loaded) //Client still loading, put their messages in a queue - C.chatOutput.messageQueue += message - continue - - payload[C] += twiceEncoded - - else - var/client/C = CLIENT_FROM_VAR(target) //Grab us a client if possible - - if(!C?.chatOutput || C.chatOutput.broken) //A player who hasn't updated his skin file. - return - - if(!C.chatOutput.loaded) //Client still loading, put their messages in a queue - C.chatOutput.messageQueue += message - return - - payload[C] += twiceEncoded diff --git a/goon/code/datums/browserOutput.dm b/goon/code/datums/browserOutput.dm index 74c9d844728..bb6795b80c5 100644 --- a/goon/code/datums/browserOutput.dm +++ b/goon/code/datums/browserOutput.dm @@ -245,8 +245,8 @@ var/list/chatResources = list( var/to_chat_filename var/to_chat_line var/to_chat_src -// Call using macro: to_chat(target, message, flag) -/proc/to_chat_immediate(target, message, flag) + +/proc/to_chat(target, message, flag) if(!is_valid_tochat_message(message) || !is_valid_tochat_target(target)) target << message @@ -304,17 +304,4 @@ var/to_chat_src target << output(output_message, "browseroutput:output") -/proc/to_chat(target, message, flag) - /* - If any of the following conditions are met, do NOT use SSchat. These conditions include: - - Is the MC still initializing? - - Has SSchat initialized? - - Has SSchat been offlined due to MC crashes? - If any of these are met, use the old chat system, otherwise people wont see messages - */ - if(Master.current_runlevel == RUNLEVEL_INIT || !SSchat?.initialized || SSchat?.flags & SS_NO_FIRE) - to_chat_immediate(target, message, flag) - return - SSchat.queue(target, message, flag) - #undef MAX_COOKIE_LENGTH diff --git a/paradise.dme b/paradise.dme index 5e88b673231..0f53fc613ba 100644 --- a/paradise.dme +++ b/paradise.dme @@ -215,7 +215,6 @@ #include "code\controllers\subsystem\assets.dm" #include "code\controllers\subsystem\atoms.dm" #include "code\controllers\subsystem\changelog.dm" -#include "code\controllers\subsystem\chat.dm" #include "code\controllers\subsystem\events.dm" #include "code\controllers\subsystem\fires.dm" #include "code\controllers\subsystem\garbage.dm"