code/__HELPERS/trait_helpers.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 . |
HAS_MIND_TRAIT | A simple helper for checking traits in a mob's mind |
UNIQUE_TRAIT_SOURCE | Gives a unique trait source for any given datum |
TRAIT_DODGE_ALL_OBJECTS | Allows a mob to dodge all thrown objects |
TRAIT_SHOW_WIRE_INFO | Show what machine/door wires do when held. |
TRAIT_SUPERMATTER_IMMUNE | Immune to the SM / makes you immune to it when worn |
TRAIT_WIELDED | An item that is being wielded. |
TRAIT_OBSCURED_WIRES | Wires on this will have their titles randomized for those with SHOW_WIRES |
TRAIT_FORCES_OPEN_DOORS_ITEM | Forces open doors after a delay specific to the item |
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_TURF_COVERED | Prevent mobs on the turf from being affected by anything below that turf, such as a pulse demon going under it. Added by a /obj/structure with creates_cover set to TRUE |
TRAIT_OIL_SLICKED | An item that is oiled. If sprayed with water, it's slowdown reverts to normal. |
TRAIT_CAN_POINT_WITH | An item that can be pointed at mobs, while on non-help intent. |
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. |
STATION_TRAIT_BANANIUM_SHIPMENTS | Traits given by station traits |
TRAIT_BLUESPACE_SPEED | Removes slowdown while walking on these tiles. |
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.
HAS_MIND_TRAIT
A simple helper for checking traits in a mob's mind
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.
STATION_TRAIT_BANANIUM_SHIPMENTS
Traits given by station traits
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_BLUESPACE_SPEED
Removes slowdown while walking on these tiles.
TRAIT_CANNOT_PULL
Inability to pull things.
TRAIT_CAN_POINT_WITH
An item that can be pointed at mobs, while on non-help intent.
TRAIT_DODGE_ALL_OBJECTS
Allows a mob to dodge all thrown objects
TRAIT_FLOORED
Prevents voluntary standing or staying up on its own.
TRAIT_FORCES_OPEN_DOORS_ITEM
Forces open doors after a delay specific to the item
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_OBSCURED_WIRES
Wires on this will have their titles randomized for those with SHOW_WIRES
TRAIT_OIL_SLICKED
An item that is oiled. If sprayed with water, it's slowdown reverts to normal.
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_SUPERMATTER_IMMUNE
Immune to the SM / makes you immune to it when worn
TRAIT_SURGICAL
A surgical tool; when in hand in help intent (and with a surgery in progress) won't attack the user
TRAIT_TURF_COVERED
Prevent mobs on the turf from being affected by anything below that turf, such as a pulse demon going under it. Added by a /obj/structure with creates_cover set to TRUE
TRAIT_UI_BLOCKED
Inability to access UI hud elements.
TRAIT_WIELDED
An item that is being wielded.
UNIQUE_TRAIT_SOURCE
Gives a unique trait source for any given datum