Space Station 13 - Baystation 12 - Modules - TypesDefine Details

code/__defines/MC.dm

NEW_SS_GLOBALSubsystem helper macros Attempt to ensure that the subsystem is a singleton. Do not use directly.
SUBSYSTEM_DEFBoilerplate for a new global subsystem object and its associated type.
PROCESSING_SUBSYSTEM_DEFBoilerplate for a new global processing subsystem object and its associated type.
START_PROCESSINGRegister a datum to be processed with a processing subsystem.
STOP_PROCESSINGUnregister a datum with a processing subsystem.
START_PROCESSING_MACHINESTART specific to SSmachines
STOP_PROCESSING_MACHINESTOP specific to SSmachines
SS_NO_INITSubsystem Flags The subsystem's Initialize() will not be called.
SS_NO_FIREThe subsystem's fire() will not be called. This is preferable to can_fire = FALSE because it will not be added to the MC's list of active systems.
SS_BACKGROUNDThe subsystem runs on spare CPU time, after all non-background subsystems have run that tick. Priority is considered against other SS_BACKGROUND subsystems.
SS_NO_TICK_CHECKThe subsystem does not tick check and should not run unless enough time can be guaranteed or it must to stay current.
SS_TICKERTreat the value of the subsystem's wait as ticks, not time. Forces it to run in the first tick. Implicitly has all runlevels. Ignores SS_BACKGROUND if set. Intended for systems that act like a mini-MC, like timers.
SS_KEEP_TIMINGAttempt to keep the subsystem's timing real-world regular by adjusting fire timing to be earlier the later it previously ran.
SS_POST_FIRE_TIMINGCalculate the subsystem's next fire time from when it finished, not when it started.
SS_NEEDS_SHUTDOWNRun Shutdown() on server shutdown so the SS can finalize state.
SS_IDLESubsystem states The subsystem is not running.
SS_QUEUEDThe subsystem is queued to be run.
SS_RUNNINGThe subsystem is currently being run.
SS_PAUSEDThe subsystem's run is paused by MC_TICK_CHECK and will resume later.
SS_SLEEPINGThe subsystem is sleeping during its run.
SS_PAUSINGThe subsystem is in the process of being paused.
SS_INITSTATE_NONESubsystem initialization states
TIMER_UNIQUESStimer Create a hash from the timer's configuration and don't run it if one already exists.
TIMER_NO_HASH_WAITFor timers with TIMER_UNIQUE, do not include the timer's delay as part of its uniquenes.
TIMER_OVERRIDEFor timers with TIMER_UNIQUE, replace the old timer instead of discarding the new one.
TIMER_CLIENT_TIMEUse real world time instead of server time. More expensive and should be reserved for client display like animations and sounds.
TIMER_STOPPABLEThe call to addtimer() will return a timer ID which may be passed to deltimer() to stop it if it still exists.
TIMER_LOOPRepeat the timer until it's deleted or the parent is destroyed.
TIMER_DELETE_MEDelete the timer on parent datum Destroy() and when deltimer'd
TIMER_ID_NULLThe default timer ID.
addtimerAutomatically adding filename and line to the timer's arguments for debugging purposes.

Define Details

NEW_SS_GLOBAL

Subsystem helper macros Attempt to ensure that the subsystem is a singleton. Do not use directly.

PROCESSING_SUBSYSTEM_DEF

Boilerplate for a new global processing subsystem object and its associated type.

SS_BACKGROUND

The subsystem runs on spare CPU time, after all non-background subsystems have run that tick. Priority is considered against other SS_BACKGROUND subsystems.

SS_IDLE

Subsystem states The subsystem is not running.

SS_INITSTATE_NONE

Subsystem initialization states

SS_KEEP_TIMING

Attempt to keep the subsystem's timing real-world regular by adjusting fire timing to be earlier the later it previously ran.

SS_NEEDS_SHUTDOWN

Run Shutdown() on server shutdown so the SS can finalize state.

SS_NO_FIRE

The subsystem's fire() will not be called. This is preferable to can_fire = FALSE because it will not be added to the MC's list of active systems.

SS_NO_INIT

Subsystem Flags The subsystem's Initialize() will not be called.

SS_NO_TICK_CHECK

The subsystem does not tick check and should not run unless enough time can be guaranteed or it must to stay current.

SS_PAUSED

The subsystem's run is paused by MC_TICK_CHECK and will resume later.

SS_PAUSING

The subsystem is in the process of being paused.

SS_POST_FIRE_TIMING

Calculate the subsystem's next fire time from when it finished, not when it started.

SS_QUEUED

The subsystem is queued to be run.

SS_RUNNING

The subsystem is currently being run.

SS_SLEEPING

The subsystem is sleeping during its run.

SS_TICKER

Treat the value of the subsystem's wait as ticks, not time. Forces it to run in the first tick. Implicitly has all runlevels. Ignores SS_BACKGROUND if set. Intended for systems that act like a mini-MC, like timers.

START_PROCESSING

Register a datum to be processed with a processing subsystem.

START_PROCESSING_MACHINE

START specific to SSmachines

STOP_PROCESSING

Unregister a datum with a processing subsystem.

STOP_PROCESSING_MACHINE

STOP specific to SSmachines

SUBSYSTEM_DEF

Boilerplate for a new global subsystem object and its associated type.

TIMER_CLIENT_TIME

Use real world time instead of server time. More expensive and should be reserved for client display like animations and sounds.

TIMER_DELETE_ME

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

TIMER_ID_NULL

The default timer ID.

TIMER_LOOP

Repeat the timer until it's deleted or the parent is destroyed.

TIMER_NO_HASH_WAIT

For timers with TIMER_UNIQUE, do not include the timer's delay as part of its uniquenes.

TIMER_OVERRIDE

For timers with TIMER_UNIQUE, replace the old timer instead of discarding the new one.

TIMER_STOPPABLE

The call to addtimer() will return a timer ID which may be passed to deltimer() to stop it if it still exists.

TIMER_UNIQUE

SStimer Create a hash from the timer's configuration and don't run it if one already exists.

addtimer

Automatically adding filename and line to the timer's arguments for debugging purposes.