diff --git a/code/__defines/subsystems.dm b/code/__defines/subsystems.dm index 3257785cc6fef..34106eb1af2da 100644 --- a/code/__defines/subsystems.dm +++ b/code/__defines/subsystems.dm @@ -8,6 +8,8 @@ #define RUNLEVELS_ALL (~EMPTY_BITFIELD) #define RUNLEVELS_DEFAULT (RUNLEVEL_SETUP | RUNLEVEL_GAME | RUNLEVEL_POSTGAME) +#define RUNLEVELS_GAME (RUNLEVEL_GAME | RUNLEVEL_POSTGAME) +#define RUNLEVELS_PREGAME (RUNLEVEL_LOBBY | RUNLEVEL_SETUP) // Subsystem init_order, from highest priority to lowest priority diff --git a/code/controllers/subsystem.dm b/code/controllers/subsystem.dm index 9c338ed231864..51a361386598c 100644 --- a/code/controllers/subsystem.dm +++ b/code/controllers/subsystem.dm @@ -39,7 +39,7 @@ var/init_start = 0 // What timeofday did we start initializing? var/init_finish // What timeofday did we finish initializing? - var/runlevels = RUNLEVELS_DEFAULT //points of the game at which the SS can fire + var/runlevels = RUNLEVELS_GAME //points of the game at which the SS can fire var/static/list/failure_strikes //How many times we suspect a subsystem type has crashed the MC, 3 strikes and you're out! diff --git a/code/controllers/subsystems/ai.dm b/code/controllers/subsystems/ai.dm index 8528e5aea13c6..b51d61cc6946a 100644 --- a/code/controllers/subsystems/ai.dm +++ b/code/controllers/subsystems/ai.dm @@ -2,7 +2,6 @@ SUBSYSTEM_DEF(ai) name = "AI" init_order = SS_INIT_AI priority = SS_PRIORITY_AI - runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME wait = 2 SECONDS var/static/list/datum/ai_holder/ai_holders = list() var/static/list/datum/ai_holder/queue = list() diff --git a/code/controllers/subsystems/aifast.dm b/code/controllers/subsystems/aifast.dm index 86f8f051c4c09..337a30ce6235d 100644 --- a/code/controllers/subsystems/aifast.dm +++ b/code/controllers/subsystems/aifast.dm @@ -2,7 +2,6 @@ SUBSYSTEM_DEF(aifast) name = "AI (Fast)" init_order = SS_INIT_AIFAST priority = SS_PRIORITY_AI - runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME wait = 0.25 SECONDS var/static/list/datum/ai_holder/ai_holders = list() var/static/list/datum/ai_holder/queue = list() diff --git a/code/controllers/subsystems/ambient_lighting.dm b/code/controllers/subsystems/ambient_lighting.dm index a234899708402..ec3487f1651b5 100644 --- a/code/controllers/subsystems/ambient_lighting.dm +++ b/code/controllers/subsystems/ambient_lighting.dm @@ -3,7 +3,7 @@ SUBSYSTEM_DEF(ambient_lighting) //A simple SS that handles updating ambient ligh wait = 1 priority = SS_PRIORITY_LIGHTING init_order = SS_INIT_AMBIENT_LIGHT - runlevels = RUNLEVEL_LOBBY | RUNLEVELS_DEFAULT + runlevels = RUNLEVELS_PREGAME | RUNLEVELS_GAME /// List of turfs queued for ambient light evaluation var/list/queued = list() diff --git a/code/controllers/subsystems/ao.dm b/code/controllers/subsystems/ao.dm index 542412fc406d6..c61a1de3317ed 100644 --- a/code/controllers/subsystems/ao.dm +++ b/code/controllers/subsystems/ao.dm @@ -2,7 +2,7 @@ SUBSYSTEM_DEF(ao) name = "Ambient Occlusion" init_order = SS_INIT_MISC_LATE wait = 1 - runlevels = RUNLEVELS_DEFAULT | RUNLEVEL_LOBBY + runlevels = RUNLEVELS_PREGAME | RUNLEVELS_GAME flags = SS_NO_INIT var/static/list/image_cache = list() var/static/list/turf/queue = list() diff --git a/code/controllers/subsystems/chat.dm b/code/controllers/subsystems/chat.dm index 8f324cff96a52..2c878f884b5d7 100644 --- a/code/controllers/subsystems/chat.dm +++ b/code/controllers/subsystems/chat.dm @@ -1,7 +1,7 @@ SUBSYSTEM_DEF(chat) name = "Chat" wait = 1 - runlevels = RUNLEVELS_DEFAULT | RUNLEVEL_LOBBY + runlevels = RUNLEVELS_PREGAME | RUNLEVELS_GAME priority = SS_PRIORITY_CHAT init_order = SS_INIT_CHAT var/static/list/payload = list() diff --git a/code/controllers/subsystems/chemistry.dm b/code/controllers/subsystems/chemistry.dm index c85b7d9bf2381..ad7a228ac1fa4 100644 --- a/code/controllers/subsystems/chemistry.dm +++ b/code/controllers/subsystems/chemistry.dm @@ -2,7 +2,6 @@ SUBSYSTEM_DEF(chemistry) name = "Chemistry" priority = SS_PRIORITY_CHEMISTRY init_order = SS_INIT_CHEMISTRY - runlevels = RUNLEVELS_DEFAULT | RUNLEVEL_LOBBY wait = 0.5 SECONDS var/static/list/reactions_by_id = list() var/static/list/reactions_by_result = list() diff --git a/code/controllers/subsystems/garbage.dm b/code/controllers/subsystems/garbage.dm index 84f9d1f408618..9cae056c008fa 100644 --- a/code/controllers/subsystems/garbage.dm +++ b/code/controllers/subsystems/garbage.dm @@ -23,7 +23,7 @@ SUBSYSTEM_DEF(garbage) priority = SS_PRIORITY_GARBAGE wait = 10 SECONDS flags = SS_POST_FIRE_TIMING | SS_BACKGROUND | SS_NEEDS_SHUTDOWN - runlevels = RUNLEVELS_DEFAULT | RUNLEVEL_LOBBY + runlevels = RUNLEVELS_PREGAME | RUNLEVELS_GAME init_order = SS_INIT_GARBAGE var/static/last_tick_enqueues = 0 diff --git a/code/controllers/subsystems/ghost_images.dm b/code/controllers/subsystems/ghost_images.dm index 71168ad4c4de7..f0f1cce15b4f3 100644 --- a/code/controllers/subsystems/ghost_images.dm +++ b/code/controllers/subsystems/ghost_images.dm @@ -3,7 +3,7 @@ SUBSYSTEM_DEF(ghost_images) flags = SS_NO_INIT priority = SS_PRIORITY_GHOST_IMAGES wait = 1 - runlevels = RUNLEVELS_DEFAULT | RUNLEVEL_LOBBY + runlevels = RUNLEVELS_PREGAME | RUNLEVELS_GAME /// When true, queues all ghosts for update. var/static/queue_all = FALSE diff --git a/code/controllers/subsystems/graphs.dm b/code/controllers/subsystems/graphs.dm index 9fe21037eb0fd..1590000e891c6 100644 --- a/code/controllers/subsystems/graphs.dm +++ b/code/controllers/subsystems/graphs.dm @@ -2,7 +2,6 @@ SUBSYSTEM_DEF(graphs) name = "Graphs" priority = SS_PRIORITY_GRAPH flags = SS_KEEP_TIMING | SS_NO_INIT - runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME wait = 1 /// A list of graphs pending update. diff --git a/code/controllers/subsystems/initialization/character_setup.dm b/code/controllers/subsystems/initialization/character_setup.dm index 6fb82774ffbc5..efe5c1c6e8311 100644 --- a/code/controllers/subsystems/initialization/character_setup.dm +++ b/code/controllers/subsystems/initialization/character_setup.dm @@ -4,7 +4,7 @@ SUBSYSTEM_DEF(character_setup) priority = SS_PRIORITY_CHAR_SETUP flags = SS_BACKGROUND wait = 1 SECOND - runlevels = RUNLEVEL_LOBBY | RUNLEVELS_DEFAULT + runlevels = RUNLEVELS_PREGAME | RUNLEVELS_GAME var/list/prefs_awaiting_setup = list() var/list/preferences_datums = list() diff --git a/code/controllers/subsystems/lighting.dm b/code/controllers/subsystems/lighting.dm index 971adfeac50b7..64fdd16109cd2 100644 --- a/code/controllers/subsystems/lighting.dm +++ b/code/controllers/subsystems/lighting.dm @@ -3,7 +3,7 @@ SUBSYSTEM_DEF(lighting) wait = LIGHTING_INTERVAL priority = SS_PRIORITY_LIGHTING init_order = SS_INIT_LIGHTING - runlevels = RUNLEVELS_DEFAULT | RUNLEVEL_LOBBY + runlevels = RUNLEVELS_PREGAME | RUNLEVELS_GAME var/total_lighting_overlays = 0 var/total_lighting_sources = 0 diff --git a/code/controllers/subsystems/machines.dm b/code/controllers/subsystems/machines.dm index 6d9faa04482af..6599dfcac54d3 100644 --- a/code/controllers/subsystems/machines.dm +++ b/code/controllers/subsystems/machines.dm @@ -39,7 +39,6 @@ SUBSYSTEM_DEF(machines) init_order = SS_INIT_MACHINES priority = SS_PRIORITY_MACHINERY flags = SS_KEEP_TIMING - runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME var/static/current_step = SSMACHINES_PIPENETS var/static/cost_pipenets = 0 var/static/cost_machinery = 0 diff --git a/code/controllers/subsystems/misc.dm b/code/controllers/subsystems/misc.dm index 80a726262baaf..0c81cd1117560 100644 --- a/code/controllers/subsystems/misc.dm +++ b/code/controllers/subsystems/misc.dm @@ -1,7 +1,6 @@ SUBSYSTEM_DEF(misc) name = "Misc Updates" wait = 30 SECONDS - runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME var/static/list/queue = list() var/static/stage = STAGE_TRADERS var/static/cost_traders = 0 diff --git a/code/controllers/subsystems/misc_slow.dm b/code/controllers/subsystems/misc_slow.dm index b80cc69d79496..f148f52bc7fad 100644 --- a/code/controllers/subsystems/misc_slow.dm +++ b/code/controllers/subsystems/misc_slow.dm @@ -1,7 +1,7 @@ SUBSYSTEM_DEF(misc_slow) name = "Misc Updates (Slow)" flags = SS_NO_INIT - runlevels = RUNLEVEL_LOBBY | RUNLEVEL_GAME | RUNLEVEL_POSTGAME + runlevels = RUNLEVEL_LOBBY | RUNLEVELS_GAME wait = 5 MINUTES /// The number of times dbcon can fail in a row before being considered dead diff --git a/code/controllers/subsystems/mobs.dm b/code/controllers/subsystems/mobs.dm index 7c6378b83a61e..c00e24635791b 100644 --- a/code/controllers/subsystems/mobs.dm +++ b/code/controllers/subsystems/mobs.dm @@ -2,7 +2,6 @@ SUBSYSTEM_DEF(mobs) name = "Mobs" priority = SS_PRIORITY_MOB flags = SS_NO_INIT | SS_KEEP_TIMING - runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME wait = 2 SECONDS var/static/list/mob/mob_list = list() var/static/list/mob/queue = list() diff --git a/code/controllers/subsystems/plants.dm b/code/controllers/subsystems/plants.dm index 55e14b431bd4b..ae6afd3cfacfb 100644 --- a/code/controllers/subsystems/plants.dm +++ b/code/controllers/subsystems/plants.dm @@ -1,7 +1,6 @@ SUBSYSTEM_DEF(plants) name = "Plants" priority = SS_PRIORITY_PLANTS - runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME flags = SS_BACKGROUND | SS_POST_FIRE_TIMING init_order = SS_INIT_PLANTS wait = 5 SECONDS diff --git a/code/controllers/subsystems/presence.dm b/code/controllers/subsystems/presence.dm index 5077464c6b004..5ed6c36052ca4 100644 --- a/code/controllers/subsystems/presence.dm +++ b/code/controllers/subsystems/presence.dm @@ -4,7 +4,6 @@ SUBSYSTEM_DEF(presence) name = "Player Presence" priority = SS_PRIORITY_PRESENCE - runlevels = RUNLEVEL_GAME wait = 2 SECONDS var/static/list/levels = list() var/static/list/queue = list() diff --git a/code/controllers/subsystems/processing/vines.dm b/code/controllers/subsystems/processing/vines.dm index 56e24d30f2778..87a1bf5cb96c6 100644 --- a/code/controllers/subsystems/processing/vines.dm +++ b/code/controllers/subsystems/processing/vines.dm @@ -2,7 +2,6 @@ PROCESSING_SUBSYSTEM_DEF(vines) name = "Vines" priority = SS_PRIORITY_VINES - runlevels = RUNLEVEL_GAME|RUNLEVEL_POSTGAME wait = 80 process_proc = /obj/effect/vine/Process diff --git a/code/controllers/subsystems/spacedrift.dm b/code/controllers/subsystems/spacedrift.dm index 3662249e66ec5..20066ef68655d 100644 --- a/code/controllers/subsystems/spacedrift.dm +++ b/code/controllers/subsystems/spacedrift.dm @@ -4,7 +4,6 @@ SUBSYSTEM_DEF(spacedrift) priority = SS_PRIORITY_SPACEDRIFT wait = 5 flags = SS_NO_INIT|SS_KEEP_TIMING - runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME var/list/currentrun = list() var/list/processing = list() diff --git a/code/controllers/subsystems/ticker.dm b/code/controllers/subsystems/ticker.dm index c0cdd6f93ab08..ef848f2e7f38e 100644 --- a/code/controllers/subsystems/ticker.dm +++ b/code/controllers/subsystems/ticker.dm @@ -4,7 +4,7 @@ SUBSYSTEM_DEF(ticker) priority = SS_PRIORITY_TICKER init_order = SS_INIT_TICKER flags = SS_NO_TICK_CHECK | SS_KEEP_TIMING - runlevels = RUNLEVEL_LOBBY | RUNLEVELS_DEFAULT + runlevels = RUNLEVELS_PREGAME | RUNLEVELS_GAME var/pregame_timeleft var/start_ASAP = FALSE //the game will start as soon as possible, bypassing all pre-game nonsense diff --git a/code/controllers/subsystems/turf_fire.dm b/code/controllers/subsystems/turf_fire.dm index daa37177d7290..771690d1f3160 100644 --- a/code/controllers/subsystems/turf_fire.dm +++ b/code/controllers/subsystems/turf_fire.dm @@ -1,6 +1,5 @@ SUBSYSTEM_DEF(turf_fire) name = "Turf Fire" - runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME wait = 2 SECONDS flags = SS_NO_INIT var/list/fires = list() diff --git a/code/controllers/subsystems/typing.dm b/code/controllers/subsystems/typing.dm index 8912b3fdf8183..ac6dcc85010cc 100644 --- a/code/controllers/subsystems/typing.dm +++ b/code/controllers/subsystems/typing.dm @@ -1,7 +1,6 @@ SUBSYSTEM_DEF(typing) name = "Typing" flags = SS_BACKGROUND | SS_NO_INIT - runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME wait = 0.5 SECONDS /// The skin control to poll for TYPING_STATE_INPUT status. diff --git a/code/controllers/subsystems/vote.dm b/code/controllers/subsystems/vote.dm index 29217fe03db90..6ec0ff5ca8ade 100644 --- a/code/controllers/subsystems/vote.dm +++ b/code/controllers/subsystems/vote.dm @@ -3,7 +3,6 @@ SUBSYSTEM_DEF(vote) wait = 1 SECOND priority = SS_PRIORITY_VOTE flags = SS_NO_TICK_CHECK | SS_KEEP_TIMING - runlevels = RUNLEVELS_DEFAULT | RUNLEVEL_LOBBY var/last_started_time //To enforce delay between votes. var/antag_added //Enforces a maximum of one added antag per round. diff --git a/code/controllers/subsystems/zcopy.dm b/code/controllers/subsystems/zcopy.dm index a5f21140f0832..4679fa0d01c44 100644 --- a/code/controllers/subsystems/zcopy.dm +++ b/code/controllers/subsystems/zcopy.dm @@ -7,7 +7,7 @@ SUBSYSTEM_DEF(zcopy) wait = 1 init_order = SS_INIT_ZCOPY priority = SS_PRIORITY_ZCOPY - runlevels = RUNLEVELS_DEFAULT | RUNLEVEL_LOBBY + runlevels = RUNLEVELS_PREGAME | RUNLEVELS_GAME var/list/queued_turfs = list() var/qt_idex = 1 diff --git a/code/unit_tests/~unit_test_subsystems.dm b/code/unit_tests/~unit_test_subsystems.dm index 97a3ad536acac..783c934efeadd 100644 --- a/code/unit_tests/~unit_test_subsystems.dm +++ b/code/unit_tests/~unit_test_subsystems.dm @@ -5,7 +5,7 @@ SUBSYSTEM_DEF(unit_tests) name = "Unit Tests" wait = 2 SECONDS init_order = SS_INIT_UNIT_TESTS - runlevels = (RUNLEVELS_DEFAULT | RUNLEVEL_LOBBY) + runlevels = RUNLEVELS_PREGAME | RUNLEVELS_GAME var/list/queue = list() var/list/async_tests = list() var/list/current_async