Skip to content

Commit

Permalink
Forward audible messages heard at mainframe to AIeye (#21807)
Browse files Browse the repository at this point in the history
  • Loading branch information
pgmzeta authored Dec 24, 2024
1 parent 890f2bf commit 64387b0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions code/procs/mobprocs/chatprocs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1051,6 +1051,12 @@
// it was about time we had this instead of just visible_message()
/atom/proc/audible_message(var/message, var/alt, var/alt_type, var/group = "", var/just_maptext, var/image/chat_maptext/assoc_maptext = null)
for (var/mob/M in all_hearers(null, src))
if (istype(M, /mob/living/silicon/ai) && !M.client && M.hearing_check(1)) //if heard, relay msg to client mob if they're in aieye form
var/mob/living/silicon/ai/mainframe = M
var/mob/message_mob = mainframe.get_message_mob()
if(isAIeye(message_mob))
message_mob.show_message(message, null, alt, alt_type, group, just_maptext, assoc_maptext) // type=null as AIeyes can't hear directly
continue
if (!M.client)
continue
M.show_message(message, 2, alt, alt_type, group, just_maptext, assoc_maptext)
Expand Down

0 comments on commit 64387b0

Please sign in to comment.