[MIRROR] Save 0.1s in generate_station_area_list [MDB IGNORE] (#17294)

This commit is contained in:
SkyratBot
2022-11-01 02:43:55 +01:00
committed by GitHub
parent 6c0c915453
commit 3a3c9d9e11

View File

@@ -433,12 +433,11 @@ Used by the AI doomsday and the self-destruct nuke.
GLOBAL_LIST_EMPTY(the_station_areas) GLOBAL_LIST_EMPTY(the_station_areas)
/datum/controller/subsystem/mapping/proc/generate_station_area_list() /datum/controller/subsystem/mapping/proc/generate_station_area_list()
for(var/area/station/A in world) for(var/area/station/station_area in world)
if (!A.contents.len || !(A.area_flags & UNIQUE_AREA)) if (!(station_area.area_flags & UNIQUE_AREA))
continue continue
var/turf/picked = A.contents[1] if (is_station_level(station_area.z))
if (is_station_level(picked.z)) GLOB.the_station_areas += station_area.type
GLOB.the_station_areas += A.type
if(!GLOB.the_station_areas.len) if(!GLOB.the_station_areas.len)
log_world("ERROR: Station areas list failed to generate!") log_world("ERROR: Station areas list failed to generate!")