Adds MultiZ chat filter (#15849)

* Attempt at making a multi-z chat filter

* Adds MultiZ chat filter

* Runtime fix
This commit is contained in:
Heroman3003
2024-03-22 03:30:40 +10:00
committed by GitHub
parent 606107927e
commit d0ccf27f34
11 changed files with 26 additions and 4 deletions
+1
View File
@@ -11,6 +11,7 @@
#define MESSAGE_TYPE_SYSTEM "system"
#define MESSAGE_TYPE_LOCALCHAT "localchat"
#define MESSAGE_TYPE_NPCEMOTE "npcemote"
#define MESSAGE_TYPE_MULTIZCHAT "multizsay"
#define MESSAGE_TYPE_PLOCALCHAT "plocalchat"
#define MESSAGE_TYPE_HIVEMIND "hivemind"
#define MESSAGE_TYPE_RADIO "radio"
+2
View File
@@ -222,6 +222,8 @@
if(M)
if(isobserver(M))
message = "<span class='emote'><B>[src]</B> ([ghost_follow_link(src, M)]) [input]</span>"
if(usr && usr.client && M && !(get_z(usr) == get_z(M)))
message = "<span class='multizsay'>[message]</span>"
M.show_message(message, m_type)
M.create_chat_message(src, "[runemessage]", FALSE, list("emote"), (m_type == AUDIBLE_MESSAGE))
+6
View File
@@ -145,6 +145,8 @@
message = "<span class='game say'>[message]</span>"
if(speaker && !speaker.client)
message = "<span class='npcsay'>[message]</span>"
else if(speaker && !(get_z(src) == get_z(speaker)))
message = "<span class='multizsay'>[message]</span>"
to_chat(src, message)
else if(teleop)
to_chat(teleop, "<span class='game say'>[create_text_tag("body", "BODY:", teleop.client)][message]</span>")
@@ -159,6 +161,8 @@
message = "<span class='game say'>[message]</span>"
if(speaker && !speaker.client)
message = "<span class='npcsay'>[message]</span>"
else if(speaker && !(get_z(src) == get_z(speaker)))
message = "<span class='multizsay'>[message]</span>"
to_chat(src, message)
else if(teleop)
to_chat(teleop, "<span class='game say'>[create_text_tag("body", "BODY:", teleop.client)][message]</span>")
@@ -333,4 +337,6 @@
var/rendered = "<span class='game say'><span class='name'>[name]</span> [message]</span>"
if(!speaker.client)
rendered = "<span class='npcsay'>[rendered]</span>"
else if(speaker && !(get_z(src) == get_z(speaker)))
rendered = "<span class='multizsay'>[message]</span>"
to_chat(src, rendered)
+2
View File
@@ -200,6 +200,8 @@
for(var/mob/M as anything in vis_mobs)
if(isnewplayer(M))
continue
if(src.client && M && !(get_z(src) == get_z(M)))
message = "<span class='multizsay'>[message]</span>"
if(isobserver(M) && (!M.is_preference_enabled(/datum/client_preference/ghost_see_whisubtle) || \
!is_preference_enabled(/datum/client_preference/whisubtle_vis) && !M.client?.holder))
spawn(0)
@@ -24,6 +24,7 @@ export const MESSAGE_TYPE_INTERNAL = 'internal';
export const MESSAGE_TYPE_SYSTEM = 'system';
export const MESSAGE_TYPE_LOCALCHAT = 'localchat';
export const MESSAGE_TYPE_NPCEMOTE = 'npcemote';
export const MESSAGE_TYPE_MULTIZCHAT = 'multizsay';
export const MESSAGE_TYPE_PLOCALCHAT = 'plocalchat';
export const MESSAGE_TYPE_VORE = 'vore';
export const MESSAGE_TYPE_HIVEMIND = 'hivemind';
@@ -64,6 +65,12 @@ export const MESSAGE_TYPES = [
description: 'In-character emotes and says from NPCs',
selector: '.npcemote, .npcsay',
},
{
type: MESSAGE_TYPE_MULTIZCHAT,
name: 'MultiZ Emotes / Says',
description: 'In-character emotes and says from levels above/below',
selector: '.multizsay',
},
{
type: MESSAGE_TYPE_LOCALCHAT,
name: 'Local',
@@ -370,6 +370,7 @@ img.icon.bigicon {
.say,
.emote,
.emotesubtle,
.multizsay,
.npcemote,
.npcsay,
.infoplain,
@@ -388,6 +388,7 @@ img.icon.bigicon {
.say,
.emote,
.emotesubtle,
.multizsay,
.npcemote,
.npcsay,
.infoplain,
@@ -370,6 +370,7 @@ img.icon.bigicon {
.say,
.emote,
.emotesubtle,
.multizsay,
.npcemote,
.npcsay,
.infoplain,
@@ -388,6 +388,7 @@ img.icon.bigicon {
.say,
.emote,
.emotesubtle,
.multizsay,
.npcemote,
.npcsay,
.infoplain,
+2 -2
View File
@@ -126,11 +126,11 @@
* @file
* @copyright 2020 Aleksej Komarov
* @license MIT
*/var i=(0,r.VP)("chat/load"),l=(0,r.VP)("chat/rebuild"),s=(0,r.VP)("chat/updateMessageCount"),d=(0,r.VP)("chat/addPage",function(){return{payload:(0,a.a3)()}}),g=(0,r.VP)("chat/changePage"),p=(0,r.VP)("chat/updatePage"),y=(0,r.VP)("chat/toggleAcceptedType"),x=(0,r.VP)("chat/removePage"),E=(0,r.VP)("chat/changeScrollTracking"),I=(0,r.VP)("chat/saveToDisk"),T=(0,r.VP)("chat/purgeMessageArchive"),O=(0,r.VP)("chat/movePageLeft"),P=(0,r.VP)("chat/movePageRight")},95944:function(v,h,t){"use strict";t.d(h,{C_:function(){return s},HC:function(){return i},HL:function(){return r},Ol:function(){return st},PM:function(){return d},bS:function(){return l},xr:function(){return a}});/**
*/var i=(0,r.VP)("chat/load"),l=(0,r.VP)("chat/rebuild"),s=(0,r.VP)("chat/updateMessageCount"),d=(0,r.VP)("chat/addPage",function(){return{payload:(0,a.a3)()}}),g=(0,r.VP)("chat/changePage"),p=(0,r.VP)("chat/updatePage"),y=(0,r.VP)("chat/toggleAcceptedType"),x=(0,r.VP)("chat/removePage"),E=(0,r.VP)("chat/changeScrollTracking"),I=(0,r.VP)("chat/saveToDisk"),T=(0,r.VP)("chat/purgeMessageArchive"),O=(0,r.VP)("chat/movePageLeft"),P=(0,r.VP)("chat/movePageRight")},95944:function(v,h,t){"use strict";t.d(h,{C_:function(){return s},HC:function(){return i},HL:function(){return r},Ol:function(){return Y},PM:function(){return d},bS:function(){return l},xr:function(){return a}});/**
* @file
* @copyright 2020 Aleksej Komarov
* @license MIT
*/var r=6e4,a=250,i=10,l=6e4,s="unknown",d="internal",g="system",p="localchat",y="npcemote",x="plocalchat",E="vore",I="hivemind",T="radio",O="nif",P="info",R="warning",D="deadchat",w="ooc",F="looc",U="adminpm",M="mentorpm",B="combat",j="chatprint",N="adminchat",$="modchat",H="rlooc",k="prayer",tt="eventchat",G="adminlog",_="attacklog",q="debug",st=[{type:g,name:"System Messages",description:"Messages from your client, always enabled",selector:".boldannounce",important:!0},{type:y,name:"NPC Emotes / Says",description:"In-character emotes and says from NPCs",selector:".npcemote, .npcsay"},{type:p,name:"Local",description:"In-character local messages (say, emote, etc)",selector:".say, .emote, .emotesubtle"},{type:x,name:"Local (Pred/Prey)",description:"Messages from / to absorbed or dominated prey",selector:".psay, .pemote"},{type:E,name:"Vorgan Messages",description:"Messages regarding vore interactions",selector:".valert, .vwarning, .vnotice, .vdanger"},{type:I,name:"Global Say",description:"All global languages (Hivemind / Binary)",selector:".hivemind, .binarysay"},{type:T,name:"Radio",description:"All departments of radio messages",selector:".alert, .minorannounce, .syndradio, .centradio, .airadio, .comradio, .secradio, .gangradio, .engradio, .medradio, .sciradio, .supradio, .srvradio, .expradio, .radio, .deptradio, .newscaster, .resonate, .abductor, .alien, .changeling"},{type:O,name:"NIF",description:"Messages from the NIF itself and people inside",selector:".nif"},{type:P,name:"Info",description:"Non-urgent messages from the game and items",selector:".notice:not(.pm), .adminnotice:not(.pm), .info, .sinister, .cult, .infoplain, .announce, .hear, .smallnotice, .holoparasite, .boldnotice"},{type:R,name:"Warnings",description:"Urgent messages from the game and items",selector:".warning:not(.pm), .critical, .userdanger, .italics, .alertsyndie, .warningplain"},{type:D,name:"Deadchat",description:"All of deadchat",selector:".deadsay, .ghostalert"},{type:w,name:"OOC",description:"The bluewall of global OOC messages",selector:".ooc, .adminooc, .adminobserverooc, .oocplain"},{type:F,name:"Local OOC",description:"Local OOC messages, always enabled",selector:".looc",important:!0},{type:U,name:"Admin PMs",description:"Messages to/from admins (adminhelp)",selector:".pm, .adminhelp"},{type:M,name:"Mentor PMs",description:"Mentorchat and mentor pms",selector:".mentor_channel, .mentor"},{type:B,name:"Combat Log",description:"Urist McTraitor has stabbed you with a knife!",selector:".danger"},{type:j,name:"Chat prints",description:"Chat outputs of ooc notes or vorebelly exports",selector:".chatexport"},{type:s,name:"Unsorted",description:"Everything we could not sort, always enabled"},{type:N,name:"Admin Chat",description:"ASAY messages",selector:".admin_channel, .adminsay",admin:!0},{type:$,name:"Mod Chat",description:"MSAY messages",selector:".mod_channel",admin:!0},{type:tt,name:"Event Chat",description:"ESAY messages",selector:".event_channel",admin:!0},{type:H,name:"Remote LOOC",description:"Remote LOOC messages",selector:".rlooc",admin:!0},{type:k,name:"Prayers",description:"Prayers from players",admin:!0},{type:G,name:"Admin Log",description:"ADMIN LOG: Urist McAdmin has jumped to coordinates X, Y, Z",selector:".log_message",admin:!0},{type:_,name:"Attack Log",description:"Urist McTraitor has shot John Doe",admin:!0},{type:q,name:"Debug Log",description:"DEBUG: SSPlanets subsystem Recover().",admin:!0}]},23152:function(v,h,t){"use strict";t.d(h,{Vu:function(){return E},Xe:function(){return Qt},dH:function(){return ce},X4:function(){return me},v7:function(){return Kn}});var r=t(88095),a=t(4413),i=t(92514),l=t(43488),s=t(95944),d=t(11358);/**
*/var r=6e4,a=250,i=10,l=6e4,s="unknown",d="internal",g="system",p="localchat",y="npcemote",x="multizsay",E="plocalchat",I="vore",T="hivemind",O="radio",P="nif",R="info",D="warning",w="deadchat",F="ooc",U="looc",M="adminpm",B="mentorpm",j="combat",N="chatprint",$="adminchat",H="modchat",k="rlooc",tt="prayer",G="eventchat",_="adminlog",q="attacklog",st="debug",Y=[{type:g,name:"System Messages",description:"Messages from your client, always enabled",selector:".boldannounce",important:!0},{type:y,name:"NPC Emotes / Says",description:"In-character emotes and says from NPCs",selector:".npcemote, .npcsay"},{type:x,name:"MultiZ Emotes / Says",description:"In-character emotes and says from levels above/below",selector:".multizsay"},{type:p,name:"Local",description:"In-character local messages (say, emote, etc)",selector:".say, .emote, .emotesubtle"},{type:E,name:"Local (Pred/Prey)",description:"Messages from / to absorbed or dominated prey",selector:".psay, .pemote"},{type:I,name:"Vorgan Messages",description:"Messages regarding vore interactions",selector:".valert, .vwarning, .vnotice, .vdanger"},{type:T,name:"Global Say",description:"All global languages (Hivemind / Binary)",selector:".hivemind, .binarysay"},{type:O,name:"Radio",description:"All departments of radio messages",selector:".alert, .minorannounce, .syndradio, .centradio, .airadio, .comradio, .secradio, .gangradio, .engradio, .medradio, .sciradio, .supradio, .srvradio, .expradio, .radio, .deptradio, .newscaster, .resonate, .abductor, .alien, .changeling"},{type:P,name:"NIF",description:"Messages from the NIF itself and people inside",selector:".nif"},{type:R,name:"Info",description:"Non-urgent messages from the game and items",selector:".notice:not(.pm), .adminnotice:not(.pm), .info, .sinister, .cult, .infoplain, .announce, .hear, .smallnotice, .holoparasite, .boldnotice"},{type:D,name:"Warnings",description:"Urgent messages from the game and items",selector:".warning:not(.pm), .critical, .userdanger, .italics, .alertsyndie, .warningplain"},{type:w,name:"Deadchat",description:"All of deadchat",selector:".deadsay, .ghostalert"},{type:F,name:"OOC",description:"The bluewall of global OOC messages",selector:".ooc, .adminooc, .adminobserverooc, .oocplain"},{type:U,name:"Local OOC",description:"Local OOC messages, always enabled",selector:".looc",important:!0},{type:M,name:"Admin PMs",description:"Messages to/from admins (adminhelp)",selector:".pm, .adminhelp"},{type:B,name:"Mentor PMs",description:"Mentorchat and mentor pms",selector:".mentor_channel, .mentor"},{type:j,name:"Combat Log",description:"Urist McTraitor has stabbed you with a knife!",selector:".danger"},{type:N,name:"Chat prints",description:"Chat outputs of ooc notes or vorebelly exports",selector:".chatexport"},{type:s,name:"Unsorted",description:"Everything we could not sort, always enabled"},{type:$,name:"Admin Chat",description:"ASAY messages",selector:".admin_channel, .adminsay",admin:!0},{type:H,name:"Mod Chat",description:"MSAY messages",selector:".mod_channel",admin:!0},{type:G,name:"Event Chat",description:"ESAY messages",selector:".event_channel",admin:!0},{type:k,name:"Remote LOOC",description:"Remote LOOC messages",selector:".rlooc",admin:!0},{type:tt,name:"Prayers",description:"Prayers from players",admin:!0},{type:_,name:"Admin Log",description:"ADMIN LOG: Urist McAdmin has jumped to coordinates X, Y, Z",selector:".log_message",admin:!0},{type:q,name:"Attack Log",description:"Urist McTraitor has shot John Doe",admin:!0},{type:st,name:"Debug Log",description:"DEBUG: SSPlanets subsystem Recover().",admin:!0}]},23152:function(v,h,t){"use strict";t.d(h,{Vu:function(){return E},Xe:function(){return Qt},dH:function(){return ce},X4:function(){return me},v7:function(){return Kn}});var r=t(88095),a=t(4413),i=t(92514),l=t(43488),s=t(95944),d=t(11358);/**
* @file
* @copyright 2020 Aleksej Komarov
* @license MIT
File diff suppressed because one or more lines are too long