adds EMOTE_BOTH and EMOTE_OMNI which is both audible/visible and ignores checks entirely. subtler/subtle is omni and regular emotes are both. (#13584)

* Update say.dm

* Update mob.dm

* Update emotes.dm

* Update say_vr.dm

* Update emote.dm

* Update emotes.dm

* Update mob.dm

* Update say_vr.dm

* Update drake.dm
This commit is contained in:
silicons
2020-11-01 14:09:38 -07:00
committed by GitHub
parent 4017618744
commit d500a12b70
6 changed files with 38 additions and 45 deletions
+22 -12
View File
@@ -127,8 +127,9 @@
* * ignored_mobs (optional) doesn't show any message to any given mob in the list.
* * target (optional) is the other mob involved with the visible message. For example, the attacker in many combat messages.
* * target_message (optional) is what the target mob will see e.g. "[src] does something to you!"
* * omni (optional) if TRUE, will show to users no matter what.
*/
/atom/proc/visible_message(message, self_message, blind_message, vision_distance = DEFAULT_MESSAGE_RANGE, ignored_mobs, mob/target, target_message)
/atom/proc/visible_message(message, self_message, blind_message, vision_distance = DEFAULT_MESSAGE_RANGE, ignored_mobs, mob/target, target_message, omni = FALSE)
var/turf/T = get_turf(src)
if(!T)
return
@@ -139,20 +140,26 @@
if(target_message && target && istype(target) && target.client)
hearers -= target
//This entire if/else chain could be in two lines but isn't for readibilties sake.
var/msg = target_message
if(target.see_invisible<invisibility) //if src is invisible to us,
msg = blind_message
//the light object is dark and not invisible to us, darkness does not matter if you're directly next to the target
else if(T.lighting_object && T.lighting_object.invisibility <= target.see_invisible && T.is_softly_lit() && !in_range(T,target))
msg = blind_message
if(msg)
target.show_message(msg, MSG_VISUAL,blind_message, MSG_AUDIBLE)
if(omni)
target.show_message(target_message)
else
//This entire if/else chain could be in two lines but isn't for readibilties sake.
var/msg = target_message
if(target.see_invisible<invisibility) //if src is invisible to us,
msg = blind_message
//the light object is dark and not invisible to us, darkness does not matter if you're directly next to the target
else if(T.lighting_object && T.lighting_object.invisibility <= target.see_invisible && T.is_softly_lit() && !in_range(T,target))
msg = blind_message
if(msg)
target.show_message(msg, MSG_VISUAL,blind_message, MSG_AUDIBLE)
if(self_message)
hearers -= src
for(var/mob/M in hearers)
if(!M.client)
continue
if(omni)
M.show_message(message)
continue
//This entire if/else chain could be in two lines but isn't for readibilties sake.
var/msg = message
//CITADEL EDIT, required for vore code to remove (T != loc && T != src)) as a check
@@ -167,10 +174,13 @@
M.show_message(msg, MSG_VISUAL,blind_message, MSG_AUDIBLE)
///Adds the functionality to self_message.
mob/visible_message(message, self_message, blind_message, vision_distance = DEFAULT_MESSAGE_RANGE, list/ignored_mobs, mob/target, target_message)
/mob/visible_message(message, self_message, blind_message, vision_distance = DEFAULT_MESSAGE_RANGE, list/ignored_mobs, mob/target, target_message, omni = FALSE)
. = ..()
if(self_message && target != src)
show_message(self_message, MSG_VISUAL, blind_message, MSG_AUDIBLE)
if(!omni)
show_message(self_message, MSG_VISUAL, blind_message, MSG_AUDIBLE)
else
show_message(self_message)
/**
* Show a message to all mobs in earshot of this atom