Space Station 13 - Modules - TypesDefine Details

code/__DEFINES/MC.dm

MC_AVG_OVER_TIMEcreates a running average of "things elapsed" per time period when you need to count via a smaller time period. eg you want an average number of things happening per second but you measure the event every tick (50 milliseconds). make sure both time intervals are in the same units. doesnt work if current_duration > total_duration or if total_duration == 0
MC_RUNNINGReturns 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_BACKGROUNDSubsystem 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_TICKER(also forces it to run first in the tick (unless SS_BACKGROUND))
INITSTAGE_EARLYEarly init stuff that doesn't need to wait for mapload
INITSTAGE_MAINMain init stage
INITSTAGE_MAXHighest initstage.

Define Details

INITSTAGE_EARLY

Early init stuff that doesn't need to wait for mapload

INITSTAGE_MAIN

Main init stage

INITSTAGE_MAX

Highest initstage.

MC_AVG_OVER_TIME

creates a running average of "things elapsed" per time period when you need to count via a smaller time period. eg you want an average number of things happening per second but you measure the event every tick (50 milliseconds). make sure both time intervals are in the same units. doesnt work if current_duration > total_duration or if total_duration == 0

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_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_TICKER

(also forces it to run first in the tick (unless SS_BACKGROUND))