code/__HELPERS/trait_helpers.dm ![code/__HELPERS/trait_helpers.dm0](git.png)
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_MENTOR_OBSERVING | used for dead mobs that are observing, but should not be afforded all the same platitudes as full ghosts. This is a mind trait because ghosts can be frequently deleted and we want to be sure this sticks. |
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_NO_THROWN_MESSAGE | Makes the item no longer spit out a visible message when thrown |
TRAIT_SILENT_INSERTION | Makes the item not display a message on storage insertion |
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_ORGAN_INSERTED_WHILE_DEAD | An organ that was inserted into a dead mob, that has not been revived yet |
TRAIT_ADJACENCY_TRANSPARENT | An /obj that should not increase the "depth" of the search for adjacency, e.g. a storage container or a modsuit. |
TRAIT_NO_BREAK_GLASS_TABLES | A trait for items that will not break glass tables if the user is buckled to them. |
TRAIT_CURRENTLY_Z_MOVING | A trait for determining if a atom/movable is currently crossing into another z-level by using of /turf/space z-level "destination-xyz" transfers |
MENTOR_OBSERVING | Mentor observing |
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 ![code/__HELPERS/trait_helpers.dm 14](git.png)
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 ![code/__HELPERS/trait_helpers.dm 130](git.png)
A simple helper for checking traits in a mob's mind
MENTOR_OBSERVING ![code/__HELPERS/trait_helpers.dm 349](git.png)
Mentor observing
REMOVE_TRAIT ![code/__HELPERS/trait_helpers.dm 36](git.png)
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 ![code/__HELPERS/trait_helpers.dm 94](git.png)
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 ![code/__HELPERS/trait_helpers.dm 62](git.png)
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 ![code/__HELPERS/trait_helpers.dm 374](git.png)
Traits given by station traits
TRAIT_ADJACENCY_TRANSPARENT ![code/__HELPERS/trait_helpers.dm 294](git.png)
An /obj that should not increase the "depth" of the search for adjacency, e.g. a storage container or a modsuit.
TRAIT_ADVANCED_SURGICAL ![code/__HELPERS/trait_helpers.dm 276](git.png)
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 ![code/__HELPERS/trait_helpers.dm 400](git.png)
Removes slowdown while walking on these tiles.
TRAIT_CANNOT_PULL ![code/__HELPERS/trait_helpers.dm 369](git.png)
Inability to pull things.
TRAIT_CAN_POINT_WITH ![code/__HELPERS/trait_helpers.dm 285](git.png)
An item that can be pointed at mobs, while on non-help intent.
TRAIT_CURRENTLY_Z_MOVING ![code/__HELPERS/trait_helpers.dm 301](git.png)
A trait for determining if a atom/movable is currently crossing into another z-level by using of /turf/space z-level "destination-xyz" transfers
TRAIT_DODGE_ALL_OBJECTS ![code/__HELPERS/trait_helpers.dm 220](git.png)
Allows a mob to dodge all thrown objects
TRAIT_FLOORED ![code/__HELPERS/trait_helpers.dm 363](git.png)
Prevents voluntary standing or staying up on its own.
TRAIT_FORCES_OPEN_DOORS_ITEM ![code/__HELPERS/trait_helpers.dm 266](git.png)
Forces open doors after a delay specific to the item
TRAIT_HANDS_BLOCKED ![code/__HELPERS/trait_helpers.dm 365](git.png)
Prevents usage of manipulation appendages (picking, holding or using items, manipulating storage).
TRAIT_IMMOBILIZED ![code/__HELPERS/trait_helpers.dm 361](git.png)
Prevents voluntary movement.
TRAIT_KNOCKEDOUT ![code/__HELPERS/trait_helpers.dm 359](git.png)
Forces the user to stay unconscious.
TRAIT_MENTOR_OBSERVING ![code/__HELPERS/trait_helpers.dm 250](git.png)
used for dead mobs that are observing, but should not be afforded all the same platitudes as full ghosts. This is a mind trait because ghosts can be frequently deleted and we want to be sure this sticks.
TRAIT_NO_BREAK_GLASS_TABLES ![code/__HELPERS/trait_helpers.dm 297](git.png)
A trait for items that will not break glass tables if the user is buckled to them.
TRAIT_NO_THROWN_MESSAGE ![code/__HELPERS/trait_helpers.dm 268](git.png)
Makes the item no longer spit out a visible message when thrown
TRAIT_OBSCURED_WIRES ![code/__HELPERS/trait_helpers.dm 264](git.png)
Wires on this will have their titles randomized for those with SHOW_WIRES
TRAIT_OIL_SLICKED ![code/__HELPERS/trait_helpers.dm 282](git.png)
An item that is oiled. If sprayed with water, it's slowdown reverts to normal.
TRAIT_ORGAN_INSERTED_WHILE_DEAD ![code/__HELPERS/trait_helpers.dm 288](git.png)
An organ that was inserted into a dead mob, that has not been revived yet
TRAIT_RESTRAINED ![code/__HELPERS/trait_helpers.dm 371](git.png)
Abstract condition that prevents movement if being pulled and might be resisted against. Handcuffs and straight jackets, basically.
TRAIT_SHOW_WIRE_INFO ![code/__HELPERS/trait_helpers.dm 254](git.png)
Show what machine/door wires do when held.
TRAIT_SILENT_INSERTION ![code/__HELPERS/trait_helpers.dm 270](git.png)
Makes the item not display a message on storage insertion
TRAIT_SUPERMATTER_IMMUNE ![code/__HELPERS/trait_helpers.dm 256](git.png)
Immune to the SM / makes you immune to it when worn
TRAIT_SURGICAL ![code/__HELPERS/trait_helpers.dm 273](git.png)
A surgical tool; when in hand in help intent (and with a surgery in progress) won't attack the user
TRAIT_TURF_COVERED ![code/__HELPERS/trait_helpers.dm 279](git.png)
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 ![code/__HELPERS/trait_helpers.dm 367](git.png)
Inability to access UI hud elements.
TRAIT_WIELDED ![code/__HELPERS/trait_helpers.dm 262](git.png)
An item that is being wielded.
UNIQUE_TRAIT_SOURCE ![code/__HELPERS/trait_helpers.dm 132](git.png)
Gives a unique trait source for any given datum