mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
* Ports /tg StonedMC Enhancement - Runlevels - Lets services more precicely define when they want to fire - in the lobby, during game, only after, etc. Includes bugfixes from: * https://github.com/tgstation/tgstation/pull/27132 * https://github.com/tgstation/tgstation/pull/27338 * https://github.com/tgstation/tgstation/pull/27576 * https://github.com/tgstation/tgstation/pull/27519 * Ports Standardizes subsystem Shutdown order - https://github.com/tgstation/tgstation/pull/26228
14 lines
816 B
Plaintext
14 lines
816 B
Plaintext
|
|
// SS runlevels
|
|
|
|
#define RUNLEVEL_INIT 0 // "Initialize Only" - Used for subsystems that should never be fired (Should also have SS_NO_FIRE set)
|
|
#define RUNLEVEL_LOBBY 1 // Initial runlevel before setup. Returns to here if setup fails.
|
|
#define RUNLEVEL_SETUP 2 // While the gamemode setup is running. I.E gameticker.setup()
|
|
#define RUNLEVEL_GAME 4 // After successful game ticker setup, while the round is running.
|
|
#define RUNLEVEL_POSTGAME 8 // When round completes but before reboot
|
|
|
|
#define RUNLEVELS_DEFAULT (RUNLEVEL_SETUP | RUNLEVEL_GAME | RUNLEVEL_POSTGAME)
|
|
|
|
var/global/list/runlevel_flags = list(RUNLEVEL_LOBBY, RUNLEVEL_SETUP, RUNLEVEL_GAME, RUNLEVEL_POSTGAME)
|
|
#define RUNLEVEL_FLAG_TO_INDEX(flag) (log(2, flag) + 1) // Convert from the runlevel bitfield constants to index in runlevel_flags list
|