code/__HELPERS/traits.dm

ADD_TRAIT | Adds a status trait to the target datum. |
---|---|
REMOVE_TRAIT | Removes a status trait from a target datum. |
REMOVE_TRAITS_NOT_IN | Removes all status traits from a target datum which were NOT added by sources . |
REMOVE_TRAITS_IN | Removes all status traits from a target datum which were added by sources . |
TRAIT_SHOW_WIRE_INFO | Show what machine/door wires do when held. |
TRAIT_SURGICAL | A surgical tool; when in hand in help intent (and with a surgery in progress) won't attack the user |
TRAIT_ADVANCED_SURGICAL | An advanced surgical tool. If a surgical tool has this flag, it will be able to automatically repeat steps until they succeed. |
TRAIT_KNOCKEDOUT | Forces the user to stay unconscious. |
TRAIT_IMMOBILIZED | Prevents voluntary movement. |
TRAIT_FLOORED | Prevents voluntary standing or staying up on its own. |
TRAIT_HANDS_BLOCKED | Prevents usage of manipulation appendages (picking, holding or using items, manipulating storage). |
TRAIT_UI_BLOCKED | Inability to access UI hud elements. |
TRAIT_CANNOT_PULL | Inability to pull things. |
TRAIT_RESTRAINED | Abstract condition that prevents movement if being pulled and might be resisted against. Handcuffs and straight jackets, basically. |
Define Details
ADD_TRAIT
Adds a status trait to the target datum.
Arguments: (All Required)
- target - The datum to add the trait to.
- trait - The trait which is being added.
- source - The source of the trait which is being added.
REMOVE_TRAIT
Removes a status trait from a target datum.
ROUNDSTART_TRAIT
traits can't be removed without being specified in sources
.
Arguments:
- target - The datum to remove the trait from.
- trait - The trait which is being removed.
- sources - If specified, only remove the trait if it is from this source. (Lists Supported)
REMOVE_TRAITS_IN
Removes all status traits from a target datum which were added by sources
.
Arguments:
- target - The datum to remove the traits from.
- sources - The trait source which is being searched for.
REMOVE_TRAITS_NOT_IN
Removes all status traits from a target datum which were NOT added by sources
.
Arguments:
- target - The datum to remove the traits from.
- sources - The trait source which is being searched for.
TRAIT_ADVANCED_SURGICAL
An advanced surgical tool. If a surgical tool has this flag, it will be able to automatically repeat steps until they succeed.
TRAIT_CANNOT_PULL
Inability to pull things.
TRAIT_FLOORED
Prevents voluntary standing or staying up on its own.
TRAIT_HANDS_BLOCKED
Prevents usage of manipulation appendages (picking, holding or using items, manipulating storage).
TRAIT_IMMOBILIZED
Prevents voluntary movement.
TRAIT_KNOCKEDOUT
Forces the user to stay unconscious.
TRAIT_RESTRAINED
Abstract condition that prevents movement if being pulled and might be resisted against. Handcuffs and straight jackets, basically.
TRAIT_SHOW_WIRE_INFO
Show what machine/door wires do when held.
TRAIT_SURGICAL
A surgical tool; when in hand in help intent (and with a surgery in progress) won't attack the user
TRAIT_UI_BLOCKED
Inability to access UI hud elements.