mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 16:47:13 +01:00
[NON-MODULAR] [BOUNTY] AI Quality Of Life Improvements (#7063)
* ais can see *mes now * more stuff * muh snake_case
This commit is contained in:
@@ -127,6 +127,18 @@
|
||||
if(ghost.stat == DEAD && ghost.client && user.client && (ghost.client.prefs.chat_toggles & CHAT_GHOSTSIGHT) && !(ghost in viewers(user_turf, null)))
|
||||
ghost.show_message("<span class='emote'>[FOLLOW_LINK(ghost, user)] [dchatmsg]</span>")
|
||||
|
||||
//SKYRAT EDIT ADDITION BEGIN - AI QoL
|
||||
for(var/mob/ai in GLOB.ai_list)
|
||||
//ai.show_message("<span class='emote'>[!(ai.stat == DEAD)]</span>")
|
||||
var/aiEye_turf
|
||||
for(var/mob/camera/ai_eye/AI_eye as anything in GLOB.aiEyes)
|
||||
aiEye_turf = get_turf(AI_eye)
|
||||
if(!ai.client)
|
||||
continue
|
||||
if(!(ai.stat == DEAD) && ai.client && (get_dist(user_turf, aiEye_turf)<8))
|
||||
ai.show_message("<span class='emote'>[dchatmsg]</span>")
|
||||
//SKYRAT EDIT ADDITION END - AI QoL
|
||||
|
||||
if(emote_type == EMOTE_AUDIBLE)
|
||||
user.audible_message(msg, deaf_message = "<span class='emote'>You see how <b>[user]</b> [msg]</span>", audible_message_flags = EMOTE_MESSAGE)
|
||||
else
|
||||
|
||||
@@ -201,6 +201,38 @@ Possible to do for anyone motivated enough:
|
||||
else if(in_range(user, src) || isobserver(user))
|
||||
. += span_notice("The status display reads: Current projection range: <b>[holo_range]</b> units.")
|
||||
|
||||
//SKYRAT EDIT ADDITION BEGIN - AI QoL
|
||||
var/obj/effect/overlay/holo_pad_hologram/holo
|
||||
var/line
|
||||
var/mob/living/silicon/ai/aiPlayer
|
||||
for(var/mob/living/silicon/ai/master in masters)
|
||||
if(masters[master])
|
||||
holo = masters[master]
|
||||
if(LAZYLEN(masters))
|
||||
for(var/I in masters)
|
||||
var/mob/living/master = I
|
||||
var/mob/living/silicon/ai/AI = master
|
||||
if(!istype(AI))
|
||||
AI = null
|
||||
else
|
||||
aiPlayer = AI
|
||||
if(aiPlayer)
|
||||
if(aiPlayer.client)
|
||||
if(length(aiPlayer.client.prefs.features["silicon_flavor_text"]))
|
||||
var/message = aiPlayer.client.prefs.features["silicon_flavor_text"]
|
||||
if(length_char(message) <= 40)
|
||||
line = "<span class='notice'>[message]</span>"
|
||||
else
|
||||
line = "<span class='notice'>[copytext_char(message, 1, 37)]... <a href='?src=[REF(aiPlayer)];lookup_info=silicon_flavor_text'>More...</a></span>"
|
||||
line += " <span class='notice'><a href='?src=[REF(aiPlayer)];lookup_info=ooc_prefs'>\[OOC\]</a></span>"
|
||||
if(LAZYLEN(masters))
|
||||
if(holo.Impersonation)
|
||||
. += holo.Impersonation.examine(user)
|
||||
else
|
||||
. += "<span class='info'>*---------*\nThis is <EM>[aiPlayer.name].</EM>\n*---------*</span>"
|
||||
. += line
|
||||
//SKYRAT EDIT ADDITION END - AI QoL
|
||||
|
||||
/obj/machinery/holopad/attackby(obj/item/P, mob/user, params)
|
||||
if(default_deconstruction_screwdriver(user, "holopad_open", "holopad0", P))
|
||||
return
|
||||
|
||||
@@ -39,6 +39,24 @@
|
||||
mob.log_talk(msg,LOG_OOC, tag="LOOC")
|
||||
|
||||
var/list/heard = get_hearers_in_view(7, get_top_level_mob(src.mob))
|
||||
|
||||
//SKYRAT EDIT ADDITION BEGIN - AI QoL
|
||||
var/ai_heard_it = FALSE
|
||||
//so the ai can post looc text
|
||||
if(istype(mob,/mob/living/silicon/ai))
|
||||
for(var/mob/camera/ai_eye/eye_of_ai as anything in GLOB.aiEyes)
|
||||
heard = get_hearers_in_view(7, eye_of_ai)
|
||||
//so the ai can see looc text
|
||||
for(var/mob/camera/ai_eye/eye_of_ai as anything in GLOB.aiEyes)
|
||||
for(var/mob/creature in heard) //checks if an ai has already heard it
|
||||
if(istype(creature, /mob/living/silicon/ai))
|
||||
ai_heard_it = TRUE
|
||||
if(ai_heard_it == FALSE) //i dont wanna run an entire fuckin for loop if it turns out the ai can already see the text
|
||||
for(var/mob/creature in heard)
|
||||
if(creature == eye_of_ai)
|
||||
heard += get_top_level_mob(src.mob)
|
||||
//SKYRAT EDIT ADDITION END - AI QoL
|
||||
|
||||
var/list/admin_seen = list()
|
||||
for(var/mob/M in heard)
|
||||
if(!M.client)
|
||||
|
||||
Reference in New Issue
Block a user