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.
This commit is contained in:
Lohikar
2017-12-17 03:23:25 -06:00
committed by Erki
parent 0398b99148
commit d202b68c2e
9 changed files with 72 additions and 64 deletions

View File

@@ -1,10 +0,0 @@
/datum/controller/subsystem/asteroid
name = "Asteroid"
flags = SS_NO_FIRE | SS_NO_DISPLAY
init_order = SS_INIT_ASTEROID
/datum/controller/subsystem/asteroid/Initialize(timeofday)
if(config.generate_asteroid)
current_map.generate_asteroid()
..()

View File

@@ -63,8 +63,6 @@ var/datum/controller/subsystem/atlas/SSatlas
setup_multiz()
current_map.finalize_load()
QDEL_NULL(maploader)
..()

View File

@@ -0,0 +1,27 @@
// 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)

View File

@@ -1,6 +1,5 @@
// This is one of the first subsystems initialized by the MC.
// Stuff that should be loaded before everything else that isn't significant enough to get its own SS goes here.
// The area list is put together here, because some things need it early on. Turrets controls, for example.
/datum/controller/subsystem/misc_early
name = "Early Miscellaneous Init"
@@ -8,11 +7,6 @@
flags = SS_NO_FIRE | SS_NO_DISPLAY
/datum/controller/subsystem/misc_early/Initialize(timeofday)
uplink = new
// Generate the area list.
resort_all_areas()
// Create the data core, whatever that is.
data_core = new /datum/datacore()
@@ -48,10 +42,3 @@
discord_bot.alert_server_visibility()
..()
/proc/resort_all_areas()
all_areas = list()
for (var/area/A in world)
all_areas += A
sortTim(all_areas, /proc/cmp_name_asc)