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:
Neerti
2018-04-29 17:55:04 -04:00
parent 81c19c62a3
commit be73b8c36a
103 changed files with 274 additions and 403 deletions
@@ -6,5 +6,5 @@
if(!.)
return
for(var/obj/machinery/light/L in world)
for(var/obj/machinery/light/L in machines)
L.fix()
@@ -6,5 +6,5 @@
if(!.)
return
for(var/obj/item/clothing/O in world)
for(var/obj/item/clothing/O in all_clothing)
qdel(O)
@@ -6,5 +6,5 @@
if(!.)
return
for(var/obj/item/clothing/under/O in world)
for(var/obj/item/clothing/under/O in all_clothing)
qdel(O)
@@ -16,7 +16,7 @@
return
gravity_is_on = !gravity_is_on
for(var/area/A in world)
for(var/area/A in all_areas)
A.gravitychange(gravity_is_on,A)
feedback_inc("admin_secrets_fun_used",1)