Files
Aurora.3/code/controllers/subsystems/initialization/map_finalization.dm
Lohikar d202b68c2e Misc priority & init order tweaks (#3977)
changes:

early misc & seeds now load before atlas.
ZAS now has priority 55 down from 80.
Timer now has priority 45 down from (default) 50.
Lighting now has priority 65 up from 20.
The asteroid gen SS has been renamed to map finalization, and now does other map touch-up tasks like area sort, map datum finalization, and uplink init.
2017-12-17 11:23:25 +02:00

28 lines
705 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
current_map.finalize_load()
if(config.generate_asteroid)
current_map.generate_asteroid()
// 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)