/mob/living
Vars | |
body_position | Variable to track the body position of a mob, regardgless of the actual angle of rotation (usually matching it, but not necessarily). |
---|---|
body_position_pixel_x_offset | The x amount a mob's sprite should be offset due to the current position they're in |
body_position_pixel_y_offset | The y amount a mob's sprite should be offset due to the current position they're in or size (e.g. lying down moves your sprite down) |
body_temp_changes | List of changes to body temperature, used by desease symtoms like fever |
default_num_hands | How many hands does this mob have by default. This shouldn't change at runtime. |
gravity_state | What our current gravity state is. Used to avoid duplicate animates and such |
life_tickrate | How often biological functions tick. For example, 3 would be a 1/3 of every tick |
num_hands | How many hands hands does this mob currently have. Should only be changed through set_num_hands() |
startDead | This var, if true, kills the mob on initalize |
usable_hands | How many usable hands does this mob currently have. Should only be changed through set_usable_hands() |
Procs | |
IsDazed | DAZED |
IsFrozen | FROZEN |
IsImmobilized | IMMOBILIZED |
IsKnockdown | KNOCKDOWN |
IsParalyzed | PARALYZED |
IsSleeping | SLEEPING |
IsStun | STUN |
IsUnconscious | UNCONSCIOUS |
StakeCanKillMe | You can't go to sleep in a coffin with a stake in you. |
_cause_hallucination | Unless you need this for an explicit reason, use the cause_hallucination wrapper. |
add_body_temperature_change | add_body_temperature_change Adds modifications to the body temperature |
add_quirk | DISABILITIES |
add_stun_absorption | STUN ABSORPTION |
adjust_drunk_effect | Adjust the "drunk value" the mob is currently experiencing, or applies a drunk effect if the mob isn't currently drunk (or tipsy) |
adjust_fire_stacks | Adjust the amount of fire stacks on a mob |
adjust_status_effects_on_shake_up | CLEAR STATUS |
adjust_timed_status_effect | Adjusts a timed status effect on the mob,taking into account any existing timed status effects. This can be any status effect that takes into account "duration" with their initialize arguments. |
am_staked | Do I have a stake in my heart? |
appears_alive | Helper to check if we seem to be alive or not |
apply_prefs_job | Applies the preference options to the spawning mob, taking the job into account. Assumes the client has the proper mind. |
bleedDragAmount | Returns how much blood we're losing from being dragged a tile, from [mob/living/proc/makeTrail] |
can_be_staked | Can this target be staked? If someone stands up before this is complete, it fails. Best used on someone stationary. |
canface | Checks mobility move as well as parent checks |
cure_blind | TRAIT PROCS |
do_jitter_animation | Helper proc that causes the mob to do a jittering animation by jitter_amount. jitter_amount will only apply up to 300 (maximum jitter effect). |
dust | This is the proc for turning a mob into ash. Dusting robots does not eject the MMI, so it's a bit more powerful than gib() |
extinguish_mob | Extinguish all fire on the mob |
get_blood_dna_list | returns the mob's dna info as a list, to be inserted in an object's blood_DNA list |
get_body_temp_normal | get_body_temp_normal Returns the mobs normal body temperature with any modifications applied |
get_body_temp_normal_change | get_body_temp_normal_change Returns the aggregate change to body temperature |
get_butt_sprite | Sprite to show for photocopying mob butts |
get_drunk_amount | Helper to get the amount of drunkness the mob's currently experiencing. |
get_status_effect_examinations | Shows any and all examine text related to any status effects the user has. |
get_timed_status_effect_duration | Gets how many deciseconds are remaining in the duration of the passed status effect on this mob. |
hud_set_nanite_indicator | Diagnostic HUDs! |
is_face_visible | Only defined for carbons who can wear masks and helmets, we just assume other mobs have visible faces |
move_into_vent | Moves living mob directly into the vent as a ventcrawler |
on_deathcoma_trait_gain | Called when TRAIT_DEATHCOMA is added to the mob. |
on_deathcoma_trait_loss | Called when TRAIT_DEATHCOMA is removed from the mob. |
on_fall | Called when mob changes from a standing position into a prone while lacking the ability to stand up at the moment. |
on_fire_stack | Handles effects happening when mob is on normal fire |
on_floored_end | Proc to append behavior to the condition of being floored. Called when the condition ends. |
on_floored_start | Proc to append behavior to the condition of being floored. Called when the condition starts. |
on_floored_trait_gain | Called when TRAIT_FLOORED is added to the mob. |
on_floored_trait_loss | Called when TRAIT_FLOORED is removed from the mob. |
on_force_gravity | Called when TRAIT_FORCED_GRAVITY is gained or lost |
on_forced_standing_trait_gain | Called when TRAIT_FORCED_STANDING is added to the mob. |
on_forced_standing_trait_loss | Called when TRAIT_FORCED_STANDING is removed from the mob. |
on_handsblocked_end | Proc to append behavior to the condition of being handsblocked. Called when the condition ends. |
on_handsblocked_start | Proc to append behavior to the condition of being handsblocked. Called when the condition starts. |
on_handsblocked_trait_gain | Called when TRAIT_HANDS_BLOCKED is added to the mob. |
on_handsblocked_trait_loss | Called when TRAIT_HANDS_BLOCKED is removed from the mob. |
on_ignore_gravity | Called when TRAIT_IGNORING_GRAVITY is gained or lost |
on_immobilized_trait_gain | Called when TRAIT_IMMOBILIZED is added to the mob. |
on_immobilized_trait_loss | Called when TRAIT_IMMOBILIZED is removed from the mob. |
on_incapacitated_trait_gain | Called when [TRAIT_INCAPACITATED] is added to the mob. |
on_incapacitated_trait_loss | Called when [TRAIT_INCAPACITATED] is removed from the mob. |
on_knockedout_trait_gain | Called when TRAIT_KNOCKEDOUT is added to the mob. |
on_knockedout_trait_loss | Called when TRAIT_KNOCKEDOUT is removed from the mob. |
on_loc_force_gravity | Called when our loc's TRAIT_FORCED_GRAVITY is gained or lost |
on_movement_type_flag_disabled | From [element/movetype_handler/on_movement_type_trait_loss()] |
on_movement_type_flag_enabled | From [element/movetype_handler/on_movement_type_trait_gain()] |
on_negate_gravity | Called when TRAIT_NEGATES_GRAVITY is gained or lost |
on_pull_blocked_trait_gain | Called when TRAIT_PULL_BLOCKED is added to the mob. |
on_pull_blocked_trait_loss | Called when TRAIT_PULL_BLOCKED is removed from the mob. |
on_restrained_trait_gain | Called when TRAIT_RESTRAINED is added to the mob. |
on_restrained_trait_loss | Called when TRAIT_RESTRAINED is removed from the mob. |
on_skittish_trait_gain | Called when [TRAIT_SKITTISH] is added to the mob. |
on_skittish_trait_loss | Called when [TRAIT_SKITTISH] is removed from the mob. |
on_ui_blocked_trait_gain | Called when TRAIT_UI_BLOCKED is added to the mob. |
on_ui_blocked_trait_loss | Called when TRAIT_UI_BLOCKED is removed from the mob. |
register_init_signals | Called on /mob/living/Initialize(mapload), for the mob to register to relevant signals. |
remove_body_temperature_change | remove_body_temperature_change Removes the modifications to the body temperature |
set_drunk_effect | Directly sets the "drunk value" the mob is currently experiencing to the passed value, or applies a drunk effect with the passed value if the mob isn't currently drunk |
set_fire_stacks | Set the fire stacks on a mob |
set_health | Sets the current mob's health value. Do not call directly if you don't know what you are doing, use the damage procs, instead. |
set_timed_status_effect | Sets a timed status effect of some kind on a mob to a specific value. If only_if_higher is TRUE, it will only set the value up to the passed duration, so any pre-existing status effects of the same type won't be reduced down |
shared_living_ui_distance | public |
status_effect_examines | The first 1-FLAVOR_PREVIEW_LIMIT characters in the mob's "flavor_text" DNA feature. FLAVOR_PREVIEW_LIMIT is defined in flavor_defines.dm. |
transfer_blood_to | BLOOD TRANSFERS |
update_fire_overlay | Sets fire overlay of the mob. |
update_fullscreen | Proc used to handle the fullscreen overlay updates, realistically meant for the reset_perspective() proc. |
update_succumb_action | Called when traits that alter succumbing are added/removed. |
wear_mask_update | Handle stuff to update when a mob equips/unequips a mask. |
whisper | Living level whisper. |
zMove | We want to relay the zmovement to the buckled atom when possible and only run what we can't have on buckled.zMove() or buckled.can_z_move() here. This way we can avoid esoteric bugs, copypasta and inconsistencies. |
Var Details
body_position
Variable to track the body position of a mob, regardgless of the actual angle of rotation (usually matching it, but not necessarily).
body_position_pixel_x_offset
The x amount a mob's sprite should be offset due to the current position they're in
body_position_pixel_y_offset
The y amount a mob's sprite should be offset due to the current position they're in or size (e.g. lying down moves your sprite down)
body_temp_changes
List of changes to body temperature, used by desease symtoms like fever
default_num_hands
How many hands does this mob have by default. This shouldn't change at runtime.
gravity_state
What our current gravity state is. Used to avoid duplicate animates and such
life_tickrate
How often biological functions tick. For example, 3 would be a 1/3 of every tick
num_hands
How many hands hands does this mob currently have. Should only be changed through set_num_hands()
startDead
This var, if true, kills the mob on initalize
usable_hands
How many usable hands does this mob currently have. Should only be changed through set_usable_hands()
Proc Details
IsDazed
DAZED
IsFrozen
FROZEN
IsImmobilized
IMMOBILIZED
IsKnockdown
KNOCKDOWN
IsParalyzed
PARALYZED
IsSleeping
SLEEPING
IsStun
STUN
IsUnconscious
UNCONSCIOUS
StakeCanKillMe
You can't go to sleep in a coffin with a stake in you.
_cause_hallucination
Unless you need this for an explicit reason, use the cause_hallucination wrapper.
add_body_temperature_change
add_body_temperature_change Adds modifications to the body temperature
This collects all body temperature changes that the mob is experiencing to the list body_temp_changes the aggrogate result is used to derive the new body temperature for the mob
arguments:
- key_name (str) The unique key for this change, if it already exist it will be overridden
- amount (int) The amount of change from the base body temperature
add_quirk
DISABILITIES
add_stun_absorption
STUN ABSORPTION
adjust_drunk_effect
Adjust the "drunk value" the mob is currently experiencing, or applies a drunk effect if the mob isn't currently drunk (or tipsy)
The drunk effect doesn't have a set duration, like dizziness or drugginess, but instead relies on a value that decreases every status effect tick (2 seconds) by: 4% the current drunk_value + 0.01
A "drunk value" of 6 is the border between "tipsy" and "drunk".
amount - the amount of "drunkness" to apply to the mob. down_to - the lower end of the clamp, when adding the value up_to - the upper end of the clamp, when adding the value
adjust_fire_stacks
Adjust the amount of fire stacks on a mob
This modifies the fire stacks on a mob.
Vars:
- stacks: int The amount to modify the fire stacks
- fire_type: type Type of fire status effect that we apply, should be subtype of /datum/status_effect/fire_handler/fire_stacks
adjust_status_effects_on_shake_up
CLEAR STATUS
adjust_timed_status_effect
Adjusts a timed status effect on the mob,taking into account any existing timed status effects. This can be any status effect that takes into account "duration" with their initialize arguments.
Positive durations will add deciseconds to the duration of existing status effects or apply a new status effect of that duration to the mob.
Negative durations will remove deciseconds from the duration of an existing version of the status effect, removing the status effect entirely if the duration becomes less than zero (less than the current world time).
duration - the duration, in deciseconds, to add or remove from the effect effect - the type of status effect being adjusted on the mob max_duration - optional - if set, positive durations will only be added UP TO the passed max duration
am_staked
Do I have a stake in my heart?
appears_alive
Helper to check if we seem to be alive or not
apply_prefs_job
Applies the preference options to the spawning mob, taking the job into account. Assumes the client has the proper mind.
bleedDragAmount
Returns how much blood we're losing from being dragged a tile, from [mob/living/proc/makeTrail]
can_be_staked
Can this target be staked? If someone stands up before this is complete, it fails. Best used on someone stationary.
canface
Checks mobility move as well as parent checks
cure_blind
TRAIT PROCS
do_jitter_animation
Helper proc that causes the mob to do a jittering animation by jitter_amount. jitter_amount will only apply up to 300 (maximum jitter effect).
dust
This is the proc for turning a mob into ash. Dusting robots does not eject the MMI, so it's a bit more powerful than gib()
Arguments:
- just_ash - If TRUE, ash will spawn where the mob was, as opposed to remains
- drop_items - Should the mob drop their items before dusting?
- force - Should this mob be FORCABLY dusted?
extinguish_mob
Extinguish all fire on the mob
This removes all fire stacks, fire effects, alerts, and moods Signals the extinguishing.
get_blood_dna_list
returns the mob's dna info as a list, to be inserted in an object's blood_DNA list
get_body_temp_normal
get_body_temp_normal Returns the mobs normal body temperature with any modifications applied
This applies the result from proc/get_body_temp_normal_change() against the BODYTEMP_NORMAL and returns the result
arguments:
- apply_change (optional) Default True This applies the changes to body temperature normal
get_body_temp_normal_change
get_body_temp_normal_change Returns the aggregate change to body temperature
This aggregates all the changes in the body_temp_changes list and returns the result
get_butt_sprite
Sprite to show for photocopying mob butts
get_drunk_amount
Helper to get the amount of drunkness the mob's currently experiencing.
get_status_effect_examinations
Shows any and all examine text related to any status effects the user has.
get_timed_status_effect_duration
Gets how many deciseconds are remaining in the duration of the passed status effect on this mob.
If the mob is unaffected by the passed effect, returns 0.
hud_set_nanite_indicator
Diagnostic HUDs!
is_face_visible
Only defined for carbons who can wear masks and helmets, we just assume other mobs have visible faces
move_into_vent
Moves living mob directly into the vent as a ventcrawler
Arguments:
- ventcrawl_target - The vent into which we are moving the mob
on_deathcoma_trait_gain
Called when TRAIT_DEATHCOMA is added to the mob.
on_deathcoma_trait_loss
Called when TRAIT_DEATHCOMA is removed from the mob.
on_fall
Called when mob changes from a standing position into a prone while lacking the ability to stand up at the moment.
on_fire_stack
Handles effects happening when mob is on normal fire
Vars:
- seconds_per_tick
- times_fired
- fire_handler: Current fire status effect that called the proc
on_floored_end
Proc to append behavior to the condition of being floored. Called when the condition ends.
on_floored_start
Proc to append behavior to the condition of being floored. Called when the condition starts.
on_floored_trait_gain
Called when TRAIT_FLOORED is added to the mob.
on_floored_trait_loss
Called when TRAIT_FLOORED is removed from the mob.
on_force_gravity
Called when TRAIT_FORCED_GRAVITY is gained or lost
on_forced_standing_trait_gain
Called when TRAIT_FORCED_STANDING is added to the mob.
on_forced_standing_trait_loss
Called when TRAIT_FORCED_STANDING is removed from the mob.
on_handsblocked_end
Proc to append behavior to the condition of being handsblocked. Called when the condition ends.
on_handsblocked_start
Proc to append behavior to the condition of being handsblocked. Called when the condition starts.
on_handsblocked_trait_gain
Called when TRAIT_HANDS_BLOCKED is added to the mob.
on_handsblocked_trait_loss
Called when TRAIT_HANDS_BLOCKED is removed from the mob.
on_ignore_gravity
Called when TRAIT_IGNORING_GRAVITY is gained or lost
on_immobilized_trait_gain
Called when TRAIT_IMMOBILIZED is added to the mob.
on_immobilized_trait_loss
Called when TRAIT_IMMOBILIZED is removed from the mob.
on_incapacitated_trait_gain
Called when [TRAIT_INCAPACITATED] is added to the mob.
on_incapacitated_trait_loss
Called when [TRAIT_INCAPACITATED] is removed from the mob.
on_knockedout_trait_gain
Called when TRAIT_KNOCKEDOUT is added to the mob.
on_knockedout_trait_loss
Called when TRAIT_KNOCKEDOUT is removed from the mob.
on_loc_force_gravity
Called when our loc's TRAIT_FORCED_GRAVITY is gained or lost
on_movement_type_flag_disabled
From [element/movetype_handler/on_movement_type_trait_loss()]
on_movement_type_flag_enabled
From [element/movetype_handler/on_movement_type_trait_gain()]
on_negate_gravity
Called when TRAIT_NEGATES_GRAVITY is gained or lost
on_pull_blocked_trait_gain
Called when TRAIT_PULL_BLOCKED is added to the mob.
on_pull_blocked_trait_loss
Called when TRAIT_PULL_BLOCKED is removed from the mob.
on_restrained_trait_gain
Called when TRAIT_RESTRAINED is added to the mob.
on_restrained_trait_loss
Called when TRAIT_RESTRAINED is removed from the mob.
on_skittish_trait_gain
Called when [TRAIT_SKITTISH] is added to the mob.
on_skittish_trait_loss
Called when [TRAIT_SKITTISH] is removed from the mob.
on_ui_blocked_trait_gain
Called when TRAIT_UI_BLOCKED is added to the mob.
on_ui_blocked_trait_loss
Called when TRAIT_UI_BLOCKED is removed from the mob.
register_init_signals
Called on /mob/living/Initialize(mapload), for the mob to register to relevant signals.
remove_body_temperature_change
remove_body_temperature_change Removes the modifications to the body temperature
This removes the recorded change to body temperature from the body_temp_changes list
arguments:
- key_name (str) The unique key for this change that will be removed
set_drunk_effect
Directly sets the "drunk value" the mob is currently experiencing to the passed value, or applies a drunk effect with the passed value if the mob isn't currently drunk
set_to - the amount of "drunkness" to set on the mob.
set_fire_stacks
Set the fire stacks on a mob
This sets the fire stacks on a mob, stacks are clamped between -20 and 20. If the fire stacks are reduced to 0 then we will extinguish the mob.
Vars:
- stacks: int The amount to set fire_stacks to
- fire_type: type Type of fire status effect that we apply, should be subtype of /datum/status_effect/fire_handler/fire_stacks
- remove_wet_stacks: bool If we remove all wet stacks upon doing this
set_health
Sets the current mob's health value. Do not call directly if you don't know what you are doing, use the damage procs, instead.
set_timed_status_effect
Sets a timed status effect of some kind on a mob to a specific value. If only_if_higher is TRUE, it will only set the value up to the passed duration, so any pre-existing status effects of the same type won't be reduced down
duration - the duration, in deciseconds, of the effect. 0 or lower will either remove the current effect or do nothing if none are present effect - the type of status effect given to the mob only_if_higher - if TRUE, we will only set the effect to the new duration if the new duration is longer than any existing duration
shared_living_ui_distance
public
Distance versus interaction check.
required src_object atom/movable The object which owns the UI.
return UI_state The state of the UI.
status_effect_examines
The first 1-FLAVOR_PREVIEW_LIMIT characters in the mob's "flavor_text" DNA feature. FLAVOR_PREVIEW_LIMIT is defined in flavor_defines.dm.
transfer_blood_to
BLOOD TRANSFERS
update_fire_overlay
Sets fire overlay of the mob.
Vars:
- stacks: Current amount of fire_stacks
- on_fire: If we're lit on fire
- last_icon_state: Holds last fire overlay icon state, used for optimization
- suffix: Suffix for the fire icon state for special fire types
This should return last_icon_state for the fire status efect
update_fullscreen
Proc used to handle the fullscreen overlay updates, realistically meant for the reset_perspective() proc.
update_succumb_action
Called when traits that alter succumbing are added/removed.
Will show or hide the succumb alert prompt.
wear_mask_update
Handle stuff to update when a mob equips/unequips a mask.
whisper
Living level whisper.
Living mobs which whisper have their message only appear to people very close.
message - the message to display bubble_type - the type of speech bubble that shows up when they speak (currently does nothing) spans - a list of spans to apply around the message sanitize - whether we sanitize the message language - typepath language to force them to speak / whisper in ignore_spam - whether we ignore the spam filter forced - string source of what forced this speech to happen, also bypasses spam filter / mutes if supplied filterproof - whether we ignore the word filter
zMove
We want to relay the zmovement to the buckled atom when possible and only run what we can't have on buckled.zMove() or buckled.can_z_move() here. This way we can avoid esoteric bugs, copypasta and inconsistencies.