mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-20 19:44:46 +01: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:
@@ -22,6 +22,8 @@
|
||||
var/camera_range_display_status = 0
|
||||
var/intercom_range_display_status = 0
|
||||
|
||||
GLOBAL_LIST_BOILERPLATE(all_debugging_effects, /obj/effect/debugging)
|
||||
|
||||
/obj/effect/debugging/camera_range
|
||||
icon = 'icons/480x480.dmi'
|
||||
icon_state = "25percent"
|
||||
@@ -54,7 +56,7 @@ var/intercom_range_display_status = 0
|
||||
|
||||
|
||||
|
||||
for(var/obj/effect/debugging/camera_range/C in world)
|
||||
for(var/obj/effect/debugging/camera_range/C in all_debugging_effects)
|
||||
qdel(C)
|
||||
|
||||
if(camera_range_display_status)
|
||||
@@ -113,11 +115,11 @@ var/intercom_range_display_status = 0
|
||||
else
|
||||
intercom_range_display_status = 1
|
||||
|
||||
for(var/obj/effect/debugging/marker/M in world)
|
||||
for(var/obj/effect/debugging/marker/M in all_debugging_effects)
|
||||
qdel(M)
|
||||
|
||||
if(intercom_range_display_status)
|
||||
for(var/obj/item/device/radio/intercom/I in world)
|
||||
for(var/obj/item/device/radio/intercom/I in machines)
|
||||
for(var/turf/T in orange(7,I))
|
||||
var/obj/effect/debugging/marker/F = new/obj/effect/debugging/marker(T)
|
||||
if (!(F in view(7,I.loc)))
|
||||
@@ -294,7 +296,7 @@ var/list/debug_verbs = list (
|
||||
|
||||
var/list/atom/atom_list = list()
|
||||
|
||||
for(var/atom/A in world)
|
||||
for(var/atom/A in all_atoms)
|
||||
if(istype(A,type_path))
|
||||
var/atom/B = A
|
||||
while(!(isturf(B.loc)))
|
||||
@@ -330,7 +332,7 @@ var/list/debug_verbs = list (
|
||||
|
||||
var/count = 0
|
||||
|
||||
for(var/atom/A in world)
|
||||
for(var/atom/A in all_atoms)
|
||||
if(istype(A,type_path))
|
||||
count++
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user