mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
for(var/bad_code in world)
Removes a very large amount of world loops. Adds a macro to painlessly generate a global list, and the needed code to modify the list when an object is made or deleted automatically. Cleans up some commented out code.
This commit is contained in:
@@ -57,7 +57,7 @@
|
||||
|
||||
|
||||
proc/scan()
|
||||
for(var/obj/item/clothing/under/C in world)
|
||||
for(var/obj/item/clothing/under/C in all_clothing)
|
||||
if((C.has_sensor) && (istype(C.loc, /mob/living/carbon/human)))
|
||||
tracked |= C
|
||||
return 1
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
dat += "<a href='?src=\ref[src];screen=1'>Back</a>"
|
||||
dat += "<br><b>Medical Robots:</b>"
|
||||
var/bdat = null
|
||||
for(var/mob/living/bot/medbot/M in world)
|
||||
for(var/mob/living/bot/medbot/M in mob_list)
|
||||
|
||||
if(M.z != computer.z) continue //only find medibots on the same z-level as the computer
|
||||
var/turf/bl = get_turf(M)
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
else if(screen == 1)
|
||||
dat += "<HR>Chemical Implants<BR>"
|
||||
var/turf/Tr = null
|
||||
for(var/obj/item/weapon/implant/chem/C in world)
|
||||
for(var/obj/item/weapon/implant/chem/C in all_chem_implants)
|
||||
Tr = get_turf(C)
|
||||
if((Tr) && (Tr.z != computer.z)) continue//Out of range
|
||||
if(!C.implanted) continue
|
||||
@@ -37,7 +37,7 @@
|
||||
dat += "<A href='?src=\ref[src];inject10=\ref[C]'>(<font color=red>(10)</font>)</A><BR>"
|
||||
dat += "********************************<BR>"
|
||||
dat += "<HR>Tracking Implants<BR>"
|
||||
for(var/obj/item/weapon/implant/tracking/T in world)
|
||||
for(var/obj/item/weapon/implant/tracking/T in all_tracking_implants)
|
||||
Tr = get_turf(T)
|
||||
if((Tr) && (Tr.z != computer.z)) continue//Out of range
|
||||
if(!T.implanted) continue
|
||||
|
||||
Reference in New Issue
Block a user