Space Station 13 - Modules - TypesDefine Details

code/__DEFINES/subsystems.dm

Timing subsystem

TIMER_UNIQUEDon't run if there is an identical unique timer active
TIMER_OVERRIDEFor unique timers: Replace the old timer rather then not start this one
TIMER_CLIENT_TIMETiming should be based on how timing progresses on clients, not the server.
TIMER_STOPPABLETimer can be stopped using deltimer()
TIMER_NO_HASH_WAITPrevents distinguishing identical timers with the wait variable. To be used with TIMER_UNIQUE
TIMER_LOOPLoops the timer repeatedly until qdeleted. In most cases you want a subsystem instead, so don't use this unless you have a good reason.
TIMER_DELETE_MEDelete the timer on parent datum Destroy() and when deltimer'd
TIMER_ID_NULLEmpty ID define
INITIALIZATION_INSSATOMSNew should not call Initialize
INITIALIZATION_INNEW_MAPLOADNew should call Initialize(TRUE)
INITIALIZATION_INNEW_REGULARNew should call Initialize(FALSE)
INITIALIZE_HINT_NORMALNothing happens
INITIALIZE_HINT_LATELOADcall LateInitialize at the end of all atom Initialization
INITIALIZE_HINT_QDELCall qdel on the atom after initialization
INITIALIZE_IMMEDIATEtype and all subtypes should always immediately call Initialize in New()

SS initialization hints

SS_INIT_FAILURENegative values incidate a failure or warning of some kind, positive are good. 0 and 1 are unused so that TRUE and FALSE are guarenteed to be invalid values. Subsystem failed to initialize entirely. Print a warning, log, and disable firing.
SS_INIT_NONEThe default return value which must be overriden. Will succeed with a warning.
SS_INIT_SUCCESSSubsystem initialized sucessfully.
SS_INIT_NO_NEEDIf your system doesn't need to be initialized (by being disabled or something)
SS_INIT_NO_MESSAGESuccesfully initialized, BUT do not announce it to players (generally to hide game mechanics it would otherwise spoil)
SS_INIT_TIMER_KEYThe timer key used to know how long subsystem initialization takes

Overlays subsystem

GAME_STATE_STARTUPGame is loading
GAME_STATE_PREGAMEGame is loaded and in pregame lobby
GAME_STATE_SETTING_UPGame is attempting to start the round
GAME_STATE_PLAYINGGame has round in progress
GAME_STATE_FINISHEDGame has round finished

Define Details

GAME_STATE_FINISHED

Game has round finished

GAME_STATE_PLAYING

Game has round in progress

GAME_STATE_PREGAME

Game is loaded and in pregame lobby

GAME_STATE_SETTING_UP

Game is attempting to start the round

GAME_STATE_STARTUP

Game is loading

INITIALIZATION_INNEW_MAPLOAD

New should call Initialize(TRUE)

INITIALIZATION_INNEW_REGULAR

New should call Initialize(FALSE)

INITIALIZATION_INSSATOMS

New should not call Initialize

INITIALIZE_HINT_LATELOAD

call LateInitialize at the end of all atom Initialization

The item will be added to the late_loaders list, this is iterated over after initialization of subsystems is complete and calls LateInitalize on the atom see this file for the LateIntialize proc

INITIALIZE_HINT_NORMAL

Nothing happens

INITIALIZE_HINT_QDEL

Call qdel on the atom after initialization

INITIALIZE_IMMEDIATE

type and all subtypes should always immediately call Initialize in New()

SS_INIT_FAILURE

Negative values incidate a failure or warning of some kind, positive are good. 0 and 1 are unused so that TRUE and FALSE are guarenteed to be invalid values. Subsystem failed to initialize entirely. Print a warning, log, and disable firing.

SS_INIT_NONE

The default return value which must be overriden. Will succeed with a warning.

SS_INIT_NO_MESSAGE

Succesfully initialized, BUT do not announce it to players (generally to hide game mechanics it would otherwise spoil)

SS_INIT_NO_NEED

If your system doesn't need to be initialized (by being disabled or something)

SS_INIT_SUCCESS

Subsystem initialized sucessfully.

SS_INIT_TIMER_KEY

The timer key used to know how long subsystem initialization takes

TIMER_CLIENT_TIME

Timing should be based on how timing progresses on clients, not the server.

Tracking this is more expensive, should only be used in conjunction with things that have to progress client side, such as animate() or sound()

TIMER_DELETE_ME

Delete the timer on parent datum Destroy() and when deltimer'd

TIMER_ID_NULL

Empty ID define

TIMER_LOOP

Loops the timer repeatedly until qdeleted. In most cases you want a subsystem instead, so don't use this unless you have a good reason.

TIMER_NO_HASH_WAIT

Prevents distinguishing identical timers with the wait variable. To be used with TIMER_UNIQUE

TIMER_OVERRIDE

For unique timers: Replace the old timer rather then not start this one

TIMER_STOPPABLE

Timer can be stopped using deltimer()

TIMER_UNIQUE

Don't run if there is an identical unique timer active

if the arguments to addtimer are the same as an existing timer, it doesn't create a new timer, and returns the id of the existing timer