mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 20:47:10 +01:00
Fixing visible message being visible even if the mob is in the object (#18761)
* Fixing visible message being visible even if the mob is in the object * Changing visible message logic to show action if you are in the same object * Update code/modules/mob/mob.dm Co-authored-by: Sirryan2002 <80364400+Sirryan2002@users.noreply.github.com> Co-authored-by: Sirryan2002 <80364400+Sirryan2002@users.noreply.github.com>
This commit is contained in:
@@ -106,6 +106,19 @@
|
||||
// blind_message (optional) is what blind people will hear e.g. "You hear something!"
|
||||
|
||||
/mob/visible_message(message, self_message, blind_message)
|
||||
if(!isturf(loc)) // mobs inside objects (such as lockers) shouldn't have their actions visible to those outside the object
|
||||
for(var/mob/M in get_mobs_in_view(3, src))
|
||||
if(M.see_invisible < invisibility)
|
||||
continue //can't view the invisible
|
||||
var/msg = message
|
||||
if(self_message && M == src)
|
||||
msg = self_message
|
||||
if(M.loc != loc)
|
||||
if(!blind_message) // for some reason VISIBLE action has blind_message param so if we are not in the same object but next to it, lets show it
|
||||
continue
|
||||
msg = blind_message
|
||||
M.show_message(msg, EMOTE_VISIBLE, blind_message, EMOTE_AUDIBLE)
|
||||
return
|
||||
for(var/mob/M in get_mobs_in_view(7, src))
|
||||
if(M.see_invisible < invisibility)
|
||||
continue //can't view the invisible
|
||||
|
||||
Reference in New Issue
Block a user