mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-24 05:23:22 +01:00
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:
@@ -2,10 +2,10 @@
|
||||
|
||||
/datum/controller/subsystem
|
||||
// Metadata; you should define these.
|
||||
name = "fire coderbus" //name of the subsystem
|
||||
var/init_order = SS_INIT_MISC //order of initialization. Higher numbers are initialized first, lower numbers later. Can be decimal and negative values.
|
||||
var/wait = 20 //time to wait between each call to fire(). Must be a positive integer. In ticks if SS_TICKER, deciseconds otherwise.
|
||||
var/priority = 50 //When mutiple subsystems need to run in the same tick, higher priority subsystems will run first and be given a higher share of the tick before MC_TICK_CHECK triggers a sleep.
|
||||
name = "fire coderbus" //name of the subsystem
|
||||
var/init_order = SS_INIT_MISC //order of initialization. Higher numbers are initialized first, lower numbers later. Can be decimal and negative values.
|
||||
var/wait = 20 //time to wait between each call to fire(). Must be a positive integer. In ticks if SS_TICKER, deciseconds otherwise.
|
||||
var/priority = SS_PRIORITY_DEFAULT //When mutiple subsystems need to run in the same tick, higher priority subsystems will run first and be given a higher share of the tick before MC_TICK_CHECK triggers a sleep.
|
||||
|
||||
var/flags = 0 //see master_controller.dm in __defines. Most flags must be set on world start to take full effect. (You can also restart the mc to force them to process again)
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
..()
|
||||
@@ -63,8 +63,6 @@ var/datum/controller/subsystem/atlas/SSatlas
|
||||
|
||||
setup_multiz()
|
||||
|
||||
current_map.finalize_load()
|
||||
|
||||
QDEL_NULL(maploader)
|
||||
|
||||
..()
|
||||
|
||||
@@ -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)
|
||||
@@ -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)
|
||||
@@ -7,7 +7,7 @@ var/datum/controller/subsystem/timer/SStimer
|
||||
/datum/controller/subsystem/timer
|
||||
name = "Timer"
|
||||
wait = 1 //SS_TICKER subsystem, so wait is in ticks
|
||||
init_order = 1
|
||||
priority = SS_PRIORITY_TIMER
|
||||
|
||||
flags = SS_FIRE_IN_LOBBY|SS_TICKER|SS_NO_INIT
|
||||
|
||||
|
||||
Reference in New Issue
Block a user