byond - Modules - TypesDefine Details

code/__DEFINES/dcs/flags.dm

COMPONENT_INCOMPATIBLEReturn this from /datum/component/Initialize or datum/component/OnTransfer to have the component be deleted if it's applied to an incorrect type. parent must not be modified if this is to be returned. This will be noted in the runtime logs
COMPONENT_NOTRANSFERReturned in PostTransfer to prevent transfer, similar to COMPONENT_INCOMPATIBLE
ELEMENT_INCOMPATIBLEReturn value to cancel attaching
ELEMENT_DETACHCauses the detach proc to be called when the host object is being deleted
ELEMENT_BESPOKEOnly elements created with the same arguments given after id_arg_index share an element instance The arguments are the same when the text and number values are the same and all other values have the same ref
COMPONENT_DUPE_HIGHLANDERold component is deleted (default)
COMPONENT_DUPE_ALLOWEDduplicates allowed
COMPONENT_DUPE_UNIQUEnew component is deleted
COMPONENT_DUPE_UNIQUE_PASSARGSold component is given the initialization args of the new
COMPONENT_DUPE_SELECTIVEeach component of the same type is consulted as to whether the duplicate should be allowed

Define Details

COMPONENT_DUPE_ALLOWED

duplicates allowed

COMPONENT_DUPE_HIGHLANDER

old component is deleted (default)

COMPONENT_DUPE_SELECTIVE

each component of the same type is consulted as to whether the duplicate should be allowed

COMPONENT_DUPE_UNIQUE

new component is deleted

COMPONENT_DUPE_UNIQUE_PASSARGS

old component is given the initialization args of the new

COMPONENT_INCOMPATIBLE

Return this from /datum/component/Initialize or datum/component/OnTransfer to have the component be deleted if it's applied to an incorrect type. parent must not be modified if this is to be returned. This will be noted in the runtime logs

COMPONENT_NOTRANSFER

Returned in PostTransfer to prevent transfer, similar to COMPONENT_INCOMPATIBLE

ELEMENT_BESPOKE

Only elements created with the same arguments given after id_arg_index share an element instance The arguments are the same when the text and number values are the same and all other values have the same ref

ELEMENT_DETACH

Causes the detach proc to be called when the host object is being deleted

ELEMENT_INCOMPATIBLE

Return value to cancel attaching