Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MIRROR] Update default subsystem runlevels to game and postgame #1106

Merged
merged 1 commit into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions code/__defines/subsystems.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion code/controllers/subsystem.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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!

Expand Down
1 change: 0 additions & 1 deletion code/controllers/subsystems/ai.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
1 change: 0 additions & 1 deletion code/controllers/subsystems/aifast.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion code/controllers/subsystems/ambient_lighting.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion code/controllers/subsystems/ao.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion code/controllers/subsystems/chat.dm
Original file line number Diff line number Diff line change
@@ -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()
Expand Down
1 change: 0 additions & 1 deletion code/controllers/subsystems/chemistry.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion code/controllers/subsystems/garbage.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion code/controllers/subsystems/ghost_images.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion code/controllers/subsystems/graphs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion code/controllers/subsystems/lighting.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion code/controllers/subsystems/machines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion code/controllers/subsystems/misc.dm
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion code/controllers/subsystems/misc_slow.dm
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 0 additions & 1 deletion code/controllers/subsystems/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
1 change: 0 additions & 1 deletion code/controllers/subsystems/plants.dm
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 0 additions & 1 deletion code/controllers/subsystems/presence.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
1 change: 0 additions & 1 deletion code/controllers/subsystems/processing/vines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion code/controllers/subsystems/spacedrift.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion code/controllers/subsystems/ticker.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion code/controllers/subsystems/turf_fire.dm
Original file line number Diff line number Diff line change
@@ -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()
Expand Down
1 change: 0 additions & 1 deletion code/controllers/subsystems/typing.dm
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
1 change: 0 additions & 1 deletion code/controllers/subsystems/vote.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion code/controllers/subsystems/zcopy.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion code/unit_tests/~unit_test_subsystems.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading