Replace global all_areas list with world.

It ends up having similar performance, so might as well not bother with all_areas.
This commit is contained in:
Leshana
2020-04-12 18:04:54 -04:00
parent 859036b7cd
commit 262faa38e4
17 changed files with 23 additions and 26 deletions
+2 -4
View File
@@ -46,8 +46,6 @@
/area/New()
uid = ++global_uid
all_areas += src //Replace with /area in world? Byond optimizes X in world loops.
..()
/area/Initialize()
@@ -401,7 +399,7 @@ var/list/mob/living/forced_ambiance_list = new
var/list/teleportlocs = list()
/hook/startup/proc/setupTeleportLocs()
for(var/area/AR in all_areas)
for(var/area/AR in world)
if(istype(AR, /area/shuttle) || istype(AR, /area/syndicate_station) || istype(AR, /area/wizard_station)) continue
if(teleportlocs.Find(AR.name)) continue
var/turf/picked = pick(get_area_turfs(AR.type))
@@ -416,7 +414,7 @@ var/list/teleportlocs = list()
var/list/ghostteleportlocs = list()
/hook/startup/proc/setupGhostTeleportLocs()
for(var/area/AR in all_areas)
for(var/area/AR in world)
if(ghostteleportlocs.Find(AR.name)) continue
if(istype(AR, /area/aisat) || istype(AR, /area/derelict) || istype(AR, /area/tdome) || istype(AR, /area/shuttle/specops/centcom))
ghostteleportlocs += AR.name