code/__defines/MC.dm

NEW_SS_GLOBAL | Subsystem helper macros Attempt to ensure that the subsystem is a singleton. Do not use directly. |
---|---|
SUBSYSTEM_DEF | Boilerplate for a new global subsystem object and its associated type. |
PROCESSING_SUBSYSTEM_DEF | Boilerplate for a new global processing subsystem object and its associated type. |
START_PROCESSING | Register a datum to be processed with a processing subsystem. |
STOP_PROCESSING | Unregister a datum with a processing subsystem. |
START_PROCESSING_MACHINE | START specific to SSmachines |
STOP_PROCESSING_MACHINE | STOP specific to SSmachines |
SS_NO_INIT | Subsystem Flags The subsystem's Initialize() will not be called. |
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_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_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_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. |
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_POST_FIRE_TIMING | Calculate the subsystem's next fire time from when it finished, not when it started. |
SS_NEEDS_SHUTDOWN | Run Shutdown() on server shutdown so the SS can finalize state. |
SS_IDLE | Subsystem states The subsystem is not running. |
SS_QUEUED | The subsystem is queued to be run. |
SS_RUNNING | The subsystem is currently being run. |
SS_PAUSED | The subsystem's run is paused by MC_TICK_CHECK and will resume later. |
SS_SLEEPING | The subsystem is sleeping during its run. |
SS_PAUSING | The subsystem is in the process of being paused. |
SS_INITSTATE_NONE | Subsystem initialization states |
TIMER_UNIQUE | SStimer Create a hash from the timer's configuration and don't run it if one already exists. |
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_CLIENT_TIME | Use real world time instead of server time. More expensive and should be reserved for client display like animations and sounds. |
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_LOOP | Repeat the timer until it's deleted or the parent is destroyed. |
TIMER_DELETE_ME | Delete the timer on parent datum Destroy() and when deltimer'd |
TIMER_ID_NULL | The default timer ID. |
addtimer | Automatically 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.