mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Merge branch 'master' of https://github.com/Baystation12/Baystation12
Merge branch 'master' of https://github.com/Baystation12/Baystation12 Optimizes crew console scanning to only look for mobs instead of ALL clothing items in the world.
This commit is contained in:
@@ -107,13 +107,9 @@
|
||||
|
||||
|
||||
/obj/machinery/computer/crew/proc/scan()
|
||||
for(var/obj/item/clothing/under/C in world)
|
||||
if((C.has_sensor) && (istype(C.loc, /mob/living/carbon/human)))
|
||||
var/check = 0
|
||||
for(var/O in src.tracked)
|
||||
if(O == C)
|
||||
check = 1
|
||||
break
|
||||
if(!check)
|
||||
src.tracked.Add(C)
|
||||
for(var/mob/living/carbon/human/H in mob_list)
|
||||
if(istype(H.w_uniform, /obj/item/clothing/under))
|
||||
var/obj/item/clothing/under/C = H.w_uniform
|
||||
if (C.has_sensor)
|
||||
tracked |= C
|
||||
return 1
|
||||
Reference in New Issue
Block a user