mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
[MIRROR] Adds MultiZ chat filter (#8030)
Co-authored-by: Heroman3003 <31296024+Heroman3003@users.noreply.github.com> Co-authored-by: Raeschen <rycoop29@gmail.com>
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -224,6 +224,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>"
|
||||
//CHOMPEdit Start - If you are in the same tile, right next to, or being held by a person doing an emote, you should be able to see it while blind
|
||||
if(m_type != AUDIBLE_MESSAGE && (src.Adjacent(M) || (istype(src.loc, /obj/item/weapon/holder) && src.loc.loc == M)))
|
||||
M.show_message(message)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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) && (!(is_preference_enabled(/datum/client_preference/whisubtle_vis) || (isbelly(M.loc) && src == M.loc:owner)) || \
|
||||
!is_preference_enabled(/datum/client_preference/whisubtle_vis) && !M.client?.holder)) //CHOMPEdit - Added the belly check so that ghosts in bellies can still see their pred's messages.
|
||||
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,
|
||||
|
||||
Reference in New Issue
Block a user