/tg/ Station 13 - Modules - TypesDefine Details

code/__DEFINES/spaceman_dmm.dm

RETURN_TYPESets a return type expression for a proc. The return type can take the forms:
SHOULD_CALL_PARENTIf set, will enable a diagnostic on children of the proc it is set on which do not contain any ..() parent calls. This can help with finding situations where a signal or other important handling in the parent proc is being skipped. Child procs may set this setting to 0 instead to override the check.
SHOULD_NOT_OVERRIDEIf set, raise a warning for any child procs that override this one, regardless of if it calls parent or not. This functions in a similar way to the final keyword in some languages. This cannot be disabled by child overrides.
SHOULD_NOT_SLEEPIf set, raise a warning if the proc or one of the sub-procs it calls uses a blocking call, such as sleep() or input() without using set waitfor = 0 This cannot be disabled by child overrides.
SHOULD_BE_PUREIf set, ensure a proc is 'pure', such that it does not make any changes outside itself or output. This also checks to make sure anything using this proc doesn't invoke it without making use of the return value. This cannot be disabled by child overrides.
PRIVATE_PROCPrivate procs can only be called by things of exactly the same type.
PROTECTED_PROCProtected procs can only be call by things of the same type or subtypes.
UNLINTIf set, will not lint.
VAR_FINALIf set, overriding their value isn't permitted by types that inherit it.
VAR_PRIVATEPrivate vars can only be called by things of exactly the same type.
VAR_PROTECTEDProtected vars can only be called by things of the same type or subtypes.

Define Details

PRIVATE_PROC

Private procs can only be called by things of exactly the same type.

PROTECTED_PROC

Protected procs can only be call by things of the same type or subtypes.

RETURN_TYPE

Sets a return type expression for a proc. The return type can take the forms:

/typepath - a raw typepath. The return type of the proc is the type named.

param - a typepath given as a parameter, for procs which return an instance of the passed-in type.

param.type - the static type of a passed-in parameter, for procs which return their input or otherwise another value of the same type.

param[_].type - the static type of a passed-in parameter, with one level of /list stripped, for procs which select one item from a list. The [_] may be repeated to strip more levels of /list.

SHOULD_BE_PURE

If set, ensure a proc is 'pure', such that it does not make any changes outside itself or output. This also checks to make sure anything using this proc doesn't invoke it without making use of the return value. This cannot be disabled by child overrides.

SHOULD_CALL_PARENT

If set, will enable a diagnostic on children of the proc it is set on which do not contain any ..() parent calls. This can help with finding situations where a signal or other important handling in the parent proc is being skipped. Child procs may set this setting to 0 instead to override the check.

SHOULD_NOT_OVERRIDE

If set, raise a warning for any child procs that override this one, regardless of if it calls parent or not. This functions in a similar way to the final keyword in some languages. This cannot be disabled by child overrides.

SHOULD_NOT_SLEEP

If set, raise a warning if the proc or one of the sub-procs it calls uses a blocking call, such as sleep() or input() without using set waitfor = 0 This cannot be disabled by child overrides.

UNLINT

If set, will not lint.

VAR_FINAL

If set, overriding their value isn't permitted by types that inherit it.

VAR_PRIVATE

Private vars can only be called by things of exactly the same type.

VAR_PROTECTED

Protected vars can only be called by things of the same type or subtypes.