mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-21 07:32:02 +00:00
changes: Atlas now logs init time per DMM. Map Finalization now separately logs finalize & asteroid generation time. Added Z_ALL_TURFS() macro to get a list of all turfs in a Z-level. Misc. performance optimizations for SSminimap init.
32 lines
918 B
Plaintext
32 lines
918 B
Plaintext
// The area list is put together here, because some things need it early on. Turrets controls, for example.
|
|
|
|
/datum/controller/subsystem/finalize
|
|
name = "Map Finalization"
|
|
flags = SS_NO_FIRE | SS_NO_DISPLAY
|
|
init_order = SS_INIT_MAPFINALIZE
|
|
|
|
/datum/controller/subsystem/finalize/Initialize(timeofday)
|
|
// Setup the global antag uplink. This needs to be done after SSatlas as it requires current_map.
|
|
global.uplink = new
|
|
|
|
var/time = world.time
|
|
current_map.finalize_load()
|
|
log_ss("map_finalization", "Finalized map in [(world.time - time)/10] seconds.")
|
|
|
|
if(config.generate_asteroid)
|
|
time = world.time
|
|
current_map.generate_asteroid()
|
|
log_ss("map_finalization", "Generated asteroid in [(world.time - time)/10] seconds.")
|
|
|
|
// Generate the area list.
|
|
resort_all_areas()
|
|
|
|
..()
|
|
|
|
/proc/resort_all_areas()
|
|
all_areas = list()
|
|
for (var/area/A in world)
|
|
all_areas += A
|
|
|
|
sortTim(all_areas, /proc/cmp_name_asc)
|