Edge cases broadcast examine (#28529)

* Adreses some edge cases for broadcast_examine

* Adds an AI examine and prevent messages if no one around

* Better len

Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
Signed-off-by: Drsmail <60036448+Drsmail@users.noreply.github.com>

* Remove excessive comments

Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
Signed-off-by: Drsmail <60036448+Drsmail@users.noreply.github.com>

* Back to ..()

Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
Signed-off-by: Drsmail <60036448+Drsmail@users.noreply.github.com>

* Update code/modules/mob/mob.dm

Signed-off-by: Drsmail <60036448+Drsmail@users.noreply.github.com>

---------

Signed-off-by: Drsmail <60036448+Drsmail@users.noreply.github.com>
Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
This commit is contained in:
Drsmail
2025-03-23 10:19:02 +00:00
committed by GitHub
co-authored by Contrabang
parent c51574aaec
commit f0f0844586
+12 -3
View File
@@ -672,6 +672,9 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
if(examined == src)
return
// Only ones who can see both examining mob and examined item
var/list/can_see_examine = viewers(examined) & viewers(2, src)
// If TRUE, the usr's view() for the examined object too
var/examining_worn_item = FALSE
var/loc_str = "at something off in the distance."
@@ -699,12 +702,11 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
var/cannot_see_str = "<span class='subtle'>\The [src] looks [loc_str]</span>"
var/list/can_see_target = viewers(examined)
for(var/mob/M as anything in viewers(2, src))
for(var/mob/M as anything in can_see_examine)
if(!M.client || M.stat != CONSCIOUS ||HAS_TRAIT(M, TRAIT_BLIND))
continue
if(examining_worn_item || (M == src) || (M in can_see_target))
if(examining_worn_item || (M == src))
to_chat(M, can_see_str)
else
to_chat(M, cannot_see_str)
@@ -736,6 +738,13 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
/mob/dead/broadcast_examine(atom/examined)
return //Observers arent real the government is lying to you
/mob/living/silicon/ai/broadcast_examine(atom/examined)
var/mob/living/silicon/ai/ai = src
// Only show the AI's examines if they're in a holopad
if(istype(ai.current, /obj/machinery/hologram/holopad))
return ..()
/mob/proc/ret_grab(obj/effect/list_container/mobl/L as obj, flag)
if((!istype(l_hand, /obj/item/grab) && !istype(r_hand, /obj/item/grab)))
if(!L)