code/__DEFINES/MC.dm ![code/__DEFINES/MC.dm0](git.png)
SubSystem flags (Please design any new flags so that the default is off, to make adding flags to subsystems easier) | |
MC_RUNNING | Returns true if the MC is initialized and running. Optional argument init_stage controls what stage the mc must have initializted to count as initialized. Defaults to INITSTAGE_MAX if not specified. |
---|---|
SS_NO_INIT | subsystem does not initialize. |
SS_NO_FIRE | subsystem does not fire. (like can_fire = 0, but keeps it from getting added to the processing subsystems list) (Requires a MC restart to change) |
SS_BACKGROUND | Subsystem only runs on spare cpu (after all non-background subsystems have ran that tick) SS_BACKGROUND has its own priority bracket, this overrides SS_TICKER's priority bump |
SS_NO_TICK_CHECK | subsystem does not tick check, and should not run unless there is enough time (or its running behind (unless background)) |
SS_TICKER | Treat wait as a tick count, not DS, run every wait ticks. (also forces it to run first in the tick (unless SS_BACKGROUND)) (implies all runlevels because of how it works) This is designed for basically anything that works as a mini-mc (like SStimer) |
SS_KEEP_TIMING | keep the subsystem's timing on point by firing early if it fired late last fire because of lag ie: if a 20ds subsystem fires say 5 ds late due to lag or what not, its next fire would be in 15ds, not 20ds. |
SS_POST_FIRE_TIMING | Calculate its next fire after its fired. (IE: if a 5ds wait SS takes 2ds to run, its next fire should be 5ds away, not 3ds like it normally would be) This flag overrides SS_KEEP_TIMING |
SUBSYSTEM STATES | |
SS_IDLE | ain't doing shit. |
SS_QUEUED | queued to run |
SS_RUNNING | actively running |
SS_PAUSED | paused by mc_tick_check |
SS_SLEEPING | fire() slept. |
SS_PAUSING | in the middle of pausing |
Define Details
MC_RUNNING ![code/__DEFINES/MC.dm 29](git.png)
Returns true if the MC is initialized and running. Optional argument init_stage controls what stage the mc must have initializted to count as initialized. Defaults to INITSTAGE_MAX if not specified.
SS_BACKGROUND ![code/__DEFINES/MC.dm 41](git.png)
Subsystem only runs on spare cpu (after all non-background subsystems have ran that tick) SS_BACKGROUND has its own priority bracket, this overrides SS_TICKER's priority bump
SS_IDLE ![code/__DEFINES/MC.dm 62](git.png)
ain't doing shit.
SS_KEEP_TIMING ![code/__DEFINES/MC.dm 54](git.png)
keep the subsystem's timing on point by firing early if it fired late last fire because of lag ie: if a 20ds subsystem fires say 5 ds late due to lag or what not, its next fire would be in 15ds, not 20ds.
SS_NO_FIRE ![code/__DEFINES/MC.dm 37](git.png)
subsystem does not fire. (like can_fire = 0, but keeps it from getting added to the processing subsystems list) (Requires a MC restart to change)
SS_NO_INIT ![code/__DEFINES/MC.dm 32](git.png)
subsystem does not initialize.
SS_NO_TICK_CHECK ![code/__DEFINES/MC.dm 44](git.png)
subsystem does not tick check, and should not run unless there is enough time (or its running behind (unless background))
SS_PAUSED ![code/__DEFINES/MC.dm 65](git.png)
paused by mc_tick_check
SS_PAUSING ![code/__DEFINES/MC.dm 67](git.png)
in the middle of pausing
SS_POST_FIRE_TIMING ![code/__DEFINES/MC.dm 59](git.png)
Calculate its next fire after its fired. (IE: if a 5ds wait SS takes 2ds to run, its next fire should be 5ds away, not 3ds like it normally would be) This flag overrides SS_KEEP_TIMING
SS_QUEUED ![code/__DEFINES/MC.dm 63](git.png)
queued to run
SS_RUNNING ![code/__DEFINES/MC.dm 64](git.png)
actively running
SS_SLEEPING ![code/__DEFINES/MC.dm 66](git.png)
fire() slept.
SS_TICKER ![code/__DEFINES/MC.dm 50](git.png)
Treat wait as a tick count, not DS, run every wait ticks. (also forces it to run first in the tick (unless SS_BACKGROUND)) (implies all runlevels because of how it works) This is designed for basically anything that works as a mini-mc (like SStimer)