mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Co-authored-by: Changelogs <action@github.com> Co-authored-by: Heroman3003 <31296024+Heroman3003@users.noreply.github.com> Co-authored-by: Guti <32563288+TheCaramelion@users.noreply.github.com> Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com> Co-authored-by: Kashargul <KashL@t-online.de>
15 lines
420 B
Plaintext
15 lines
420 B
Plaintext
/atom/proc/living_mobs_in_view(var/range = world.view, var/count_held = FALSE)
|
|
var/list/viewers = oviewers(src, range)
|
|
if(count_held)
|
|
viewers = viewers(src,range)
|
|
var/list/living = list()
|
|
for(var/mob/living/L in viewers)
|
|
if(L.is_incorporeal())
|
|
continue
|
|
living += L
|
|
if(count_held)
|
|
for(var/obj/item/holder/H in L.contents)
|
|
if(istype(H.held_mob, /mob/living))
|
|
living += H.held_mob
|
|
return living
|