From 9be1b8ed193fa4c8ec262084bc9270430b2e4559 Mon Sep 17 00:00:00 2001 From: Alffd Date: Sat, 4 Aug 2018 23:21:07 -0400 Subject: [PATCH] Changes 3 --- code/__DEFINES/mobs.dm | 3 +++ code/modules/mob/emote.dm | 10 +++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/code/__DEFINES/mobs.dm b/code/__DEFINES/mobs.dm index 1d47ae409b3..056bc25be5d 100644 --- a/code/__DEFINES/mobs.dm +++ b/code/__DEFINES/mobs.dm @@ -129,6 +129,9 @@ #define TINT_BLIND 3 //Threshold of tint level to obscure vision fully #define EYE_SHINE_THRESHOLD 6 //dark_view threshold past which a humanoid's eyes will 'shine' in the dark. +#define EMOTE_VISUAL 1 //A mob emote is visual +#define EMOTE_SOUND 2 //A mob emote is sound + //Human sub-species #define isshadowling(A) (is_species(A, /datum/species/shadow/ling)) #define isshadowlinglesser(A) (is_species(A, /datum/species/shadow/ling/lesser)) diff --git a/code/modules/mob/emote.dm b/code/modules/mob/emote.dm index f8b8683e930..080796a81bc 100644 --- a/code/modules/mob/emote.dm +++ b/code/modules/mob/emote.dm @@ -24,7 +24,7 @@ return target // All mobs should have custom emote, really.. -/mob/proc/custom_emote(var/m_type=1,var/message = null) +/mob/proc/custom_emote(var/m_type=EMOTE_VISUAL,var/message = null) if(stat || !use_me && usr == src) if(usr) @@ -34,9 +34,9 @@ var/muzzled = is_muzzled() if(muzzled) var/obj/item/clothing/mask/muzzle/M = wear_mask - if(m_type == 2 && M.mute) + if(m_type == EMOTE_SOUND && M.mute) return //Not all muzzles block sound - if(m_type == 2 && !can_speak()) + if(!can_speak()) return var/input @@ -68,7 +68,7 @@ // Type 1 (Visual) emotes are sent to anyone in view of the item - if(m_type & 1) + if(m_type & EMOTE_VISUAL) var/list/can_see = get_mobs_in_view(1,src) //Allows silicon & mmi mobs carried around to see the emotes of the person carrying them around. can_see |= viewers(src,null) for(var/mob/O in can_see) @@ -85,7 +85,7 @@ // Type 2 (Audible) emotes are sent to anyone in hear range // of the *LOCATION* -- this is important for pAIs to be heard - else if(m_type & 2) + else if(m_type & EMOTE_SOUND) for(var/mob/O in get_mobs_in_view(7,src)) if(O.status_flags & PASSEMOTES)