AI eyes see emotes. (#28247)

This commit is contained in:
Charlie Nolan
2025-02-26 10:18:20 +00:00
committed by GitHub
parent 56a29c4649
commit 43d48e5f3d
9 changed files with 34 additions and 16 deletions
+5 -1
View File
@@ -292,7 +292,7 @@
var/runechat_text = text
if(length(text) > 100)
runechat_text = "[copytext(text, 1, 101)]..."
var/list/can_see = get_mobs_in_view(1, user) //Allows silicon & mmi mobs carried around to see the emotes of the person carrying them around.
var/list/can_see = get_mobs_in_view(1, user, ai_eyes=AI_EYE_INCLUDE) //Allows silicon & mmi mobs carried around to see the emotes of the person carrying them around.
can_see |= viewers(user, null)
for(var/mob/O as anything in can_see)
if(O.status_flags & PASSEMOTES)
@@ -304,6 +304,10 @@
if(O.client?.prefs.toggles2 & PREFTOGGLE_2_RUNECHAT)
O.create_chat_message(user, runechat_text, symbol = RUNECHAT_SYMBOL_EMOTE)
if(is_ai_eye(O))
var/mob/camera/eye/ai/eye = O
if(!(eye.ai in can_see) && eye.ai?.client?.prefs.toggles2 & PREFTOGGLE_2_RUNECHAT)
eye.ai.create_chat_message(user, runechat_text, symbol = RUNECHAT_SYMBOL_EMOTE)
/**
* Check whether or not an emote can be used due to a cooldown.