Shiptest 13 - Modules - TypesDefine Details

code/__DEFINES/subsystems.dm

Defines for subsystems and overlays

Lots of important stuff in here, make sure you have your brain switched on when editing this file

DB defines
DB_MAJOR_VERSIONDB major schema version
DB_MINOR_VERSIONDB minor schema version
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
TIMER_LOOPLoops the timer repeatedly until qdeleted
TIMER_DELETE_MEDelete the timer on parent datum Destroy() and when deltimer'd
TIMER_ID_NULLEmpty ID define
Initialization subsystem
INITIALIZATION_INSSATOMSNew should not call Initialize
INITIALIZATION_INNEW_MAPLOADNew should call Initialize(TRUE)
INITIALIZATION_INNEW_REGULARNew should call Initialize(FALSE)
Initialization hints
INITIALIZE_HINT_NORMALNothing happens
INITIALIZE_HINT_LATELOADcall LateInitialize at the end of all atom Initalization
INITIALIZE_HINT_QDELCall qdel on the atom after intialization
INITIALIZE_HINT_QDEL_FORCECall qdel with a force of TRUE after initialization
INITIALIZE_IMMEDIATEtype and all subtypes should always immediately call Initialize in New()
addtimerCreate a new timer and add it to the queue.
Overlays subsystem
COMPILE_OVERLAYSCompile all the overlays for an atom from the cache lists
VOTE_COUNT_METHOD_SINGLEFirst past the post. One selection per person, and the selection with the most votes wins.
VOTE_COUNT_METHOD_MULTIApproval voting. Any number of selections per person, and the selection with the most votes wins.
VOTE_WINNER_METHOD_SIMPLEThe choice with the most votes wins. Ties are broken by the first choice to reach that number of votes.
VOTE_WINNER_METHOD_WEIGHTED_RANDOMThe winning choice is selected randomly based on the number of votes each choice has.
VOTE_WINNER_METHOD_NONEThere is no winner for this vote.

Define Details

COMPILE_OVERLAYS

Compile all the overlays for an atom from the cache lists

DB_MAJOR_VERSION

DB major schema version

Update this whenever the db schema changes

make sure you add an update to the schema_version stable in the db changelog

DB_MINOR_VERSION

DB minor schema version

Update this whenever the db schema changes

make sure you add an update to the schema_version stable in the db changelog

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 Initalization

The item will be added to the late_loaders list, this is iterated over after initalization 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 intialization

INITIALIZE_HINT_QDEL_FORCE

Call qdel with a force of TRUE after initialization

INITIALIZE_IMMEDIATE

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

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 conjuction 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

VOTE_COUNT_METHOD_MULTI

Approval voting. Any number of selections per person, and the selection with the most votes wins.

VOTE_COUNT_METHOD_SINGLE

First past the post. One selection per person, and the selection with the most votes wins.

VOTE_WINNER_METHOD_NONE

There is no winner for this vote.

VOTE_WINNER_METHOD_SIMPLE

The choice with the most votes wins. Ties are broken by the first choice to reach that number of votes.

VOTE_WINNER_METHOD_WEIGHTED_RANDOM

The winning choice is selected randomly based on the number of votes each choice has.

addtimer

Create a new timer and add it to the queue.