mob 
Vars | |
LAssailant | The last mob/living/carbon to push/drag/grab this mob (mostly used by slimes friend recognition) |
---|---|
actionspeed_mod_immunities | List of action speed modifiers ignored by this mob. List -> List (id) -> List (sources) |
actionspeed_modification | List of action speed modifiers applying to this mob |
alerts | Contains /atom/movable/screen/alert only // On /mob so clientless mobs will throw alerts properly |
audio_emote_cd_status | Cooldown on audio effects from emotes. |
audio_emote_unintentional_cd_status | Cooldown on audio effects from unintentional emotes. |
blood_state | Weirdly named, effects how blood transfers onto objects |
bloody_feet | Assoc list for tracking how "bloody" a mobs feet are, used for creating bloody foot/shoeprints on turfs when moving |
buckled | movable atoms buckled to this mob |
buckling | movable atom we are buckled to |
cached_multiplicative_actions_slowdown | The calculated mob action speed slowdown based on the modifiers list, sorted by category in associvative list |
cached_multiplicative_slowdown | The calculated mob speed slowdown based on the modifiers list |
canon_client | The current client inhabiting this mob. Managed by login/logout This exists so we can do cleanup in logout for occasions where a client was transfere rather then destroyed We need to do this because the mob on logout never actually has a reference to client We also need to clear this var/do other cleanup in client/Destroy, since that happens before logout HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH |
current_nutrition_level | Current nutrition level of mob (look at /datum/nutrition_level for more info), |
default_num_hands | How many hands does this mob have by default. This shouldn't change at runtime. |
default_num_legs | How many legs does this mob have by default. This shouldn't change at runtime. |
diseases | List of active diseases in a mob |
do_afters | For storing what do_after's someone has, key = string, value = amount of interactions of that type happening. |
emote_cooldown_override | Override for cooldowns on non-audio emotes. Should be a number in deciseconds. |
emote_type | Define emote default type, EMOTE_VISIBLE for seen emotes, EMOTE_AUDIBLE for heard emotes. |
emotes_used | Tracks last uses of emotes for cooldown purposes |
feet_blood_DNA | Basically a lazy list, copies the DNA of blood you step in |
feet_blood_color | affects the blood color of your feet, color taken from the blood you step in |
focus | The datum receiving keyboard input. src by default |
hand | Currently active mob's hand. |
has_enabled_antagHUD | Whether antagHUD has been enabled previously. |
has_limbs | Whether this mob have any limbs he can move with |
hud_type | Mob hud type |
languages | For speaking/listening. |
last_typed | Last thing we typed in to the typing indicator, probably does not need to exist |
last_typed_time | Last time we typed something in to the typing popup |
mob_spell_list | Construct spells and mime spells. Spells that do not transfer from one mob to another and can not be lost in mindswap. |
movespeed_mod_immunities | List of movement speed modifiers ignored by this mob. List -> List (id) -> List (sources) |
movespeed_modification | List of movement speed modifiers applying to this mob |
next_click | This is mainly modified by click code, to modify click delays elsewhere, use next_move and changeNext_move(), Controls the click delay. Changed with |
next_move_adjust | Unused, used to adjust our next move on a linar skill world.time + (how_many_deciseconds + Next move adjust) = Next move |
next_move_modifier | Value to multiply action delays by, actually used world.time + (how_many_deciseconds * Next move Adjust) = Next move |
nightvision | Backward compatibility var for determining nightvision like it used to be see_in_dark and see_through_darkness screen-overlay |
num_hands | How many hands hands does this mob currently have. Should only be changed through set_num_hands() |
num_legs | How many legs does this mob currently have. Should only be changed through set_num_legs() |
player_logged | SSD var. When mob has SSD status it contains num value (in deciseconds), since last mob logout. Always null otherwise. |
progressbars | List of progress bars this mob is currently seeing for actions |
sound_environment_override | Override for sound_environments. If this is set the user will always hear a specific type of reverb (Instead of the area defined reverb) |
speak_emote | Verb used when speaking phrases (e.g. "states", "chirps", "beeps"). Appears before speak messages. Defaults to 'say' if speak_emote is null. |
status_flags | Bitflags defining which status effects can be inflicted (replaces canweaken, canstun, etc) |
temporary_languages | For reagents that grant language knowlege. |
tgui_open_uis | global |
thinking | Affects if you have a thinking indicator |
typing | Affects if you have a typing indicator |
usable_hands | How many usable hands does this mob currently have. Should only be changed through set_usable_hands() |
usable_legs | How many usable legs this mob currently has. Should only be changed through set_usable_legs() |
zone_selected | The zone this mob is currently targeting |
Procs | |
AltClickOn | Main proc for primary alt click |
CanContractDisease | A special checks for this type of mob |
CheckVirusProtection | Checking mob's protection against disease D by the chosen method in chosen zone Returns: |
ClickOn | Standard mob ClickOn() |
IsParalyzed | PARALYSE |
IsWeakened | WEAKEN |
Process_Spacemove | Handles mob/living movement in space (or no gravity) |
add_actionspeed_mod_immunities | Ignores specific action slowdowns. Accepts a list of slowdowns. |
add_actionspeed_modifier | Add a action speed modifier to a mob. If a variable subtype is passed in as the first argument, it will make a new datum. If ID conflicts, it will overwrite the old ID. |
add_movespeed_modifier | Add a move speed modifier to a mob. If a variable subtype is passed in as the first argument, it will make a new datum. If ID conflicts, it will overwrite the old ID. |
add_to_alive_mob_list | Adds the mob reference to the list of all mobs alive. If mob is cliented, it adds it to the list of all living player-mobs. |
add_to_current_dead_players | Adds the cliented mob reference to either the list of dead player-mobs or to the list of observers, depending on how they joined the game. |
add_to_current_living_players | Adds the cliented mob reference to the list of living player-mobs. If the mob is an antag, it adds it to the list of living antag player-mobs. |
add_to_dead_mob_list | Adds the mob reference to the list of all the dead mobs. If mob is cliented, it adds it to the list of all dead player-mobs. |
add_to_mob_list | Adds the mob reference to the list and directory of all mobs. Called on Initialize(). |
add_to_player_list | Adds the cliented mob reference to the list of all player-mobs, besides to either the of dead or alive player-mob lists, as appropriate. Called on Login(). |
adjust_nutrition | Adjust the nutrition of a mob |
attack_ui | This proc is called whenever someone clicks an inventory UI slot. |
base_click_alt | |
become_uncliented | Cleanup proc that's called when a mob loses a client, either through client destroy or logout Logout happens post client del, so we can't just copypaste this there. This keeps things clean and consistent |
buckle_mob | Buckle a living mob to this mob. Also turns you to face the other mob |
can_equip | Returns if a certain item can be equipped to a certain slot. Always call obj/item/mob_can_equip() instead of this proc. |
can_perform_action | Checks whether a mob can perform an action to interact with an object |
can_resist | Can this mob resist (default FALSE) |
can_strip | Can this mob use strip menu (defaut TRUE) |
can_unEquip | General checks for do_unEquip proc: TRAIT_NODROP, obscurity and component blocking possibility.
Set 'silent' to FALSE if you want to get warning messages. |
can_use_audio_emote | Helper proc to determine if a mob can use emotes that make sound or not. |
check_gene_block | Checks provided DNA block and activates/deactivates it depending on current block bounds. |
check_genes | Checks all mob genes and activates/deactivates them depending on current block bounds. |
check_obscured_slots | Collects flags_inv bitflags from all equipped items and returns slots considered as obscure. |
clear_important_client_contents | Clears the clients channel of this mob |
create_chat_message | Creates a message overlay at a defined location for a given speaker |
custom_emote | Perform a custom emote. |
do_unEquip | DO NOT CALL THIS PROC. Use one of the 4 helper above. You may override it, but do not modify the args. |
drop_all_held_items | Returns a list of all dropped held items. If none were dropped, returns an empty list. |
drop_from_active_hand | Drops item in active hand. |
drop_from_hands | Drops items in both hands. |
drop_from_inactive_hand | Drops item in inactive hand. |
drop_item_ground | Used to drop an item (if it exists) to the ground.
Returns TRUE if item is successfully dropped.
Returns FALSE if item can not be dropped due to TRAIT_NODROP or if item slot is obscured.
If item can be dropped, it will be forceMove()'d to the ground and the turf's Entered() will be called. |
drop_l_hand | Drops item in left hand. |
drop_r_hand | Drops item in right hand. |
drop_transfer_item_to_loc | Item will be dropped on turf below user, then forceMoved to newloc .
Returns TRUE if item is successfully transfered.
Returns FALSE if newloc is not specified or if its null .
Returns FALSE if item can not be dropped due to TRAIT_NODROP or if item slot is obscured.
Thic proc is required if you expect transfer animation to be properly played,
since item loc should be turf only to properly register image. |
emote | Send an emote. |
enable_client_mobs_in_contents | propogates ourselves through our nested contents, similar to other important_recursive_contents procs main difference is that client contents need to possibly duplicate recursive contents for the clients mob AND its eye |
equip_in_one_of_slots | Equipping passed item I in any slot of passed list by order |
equip_or_collect | Convinience proc. Collects crap that fails to equip either onto the mob's back, or drops it. Used in job equipping so shit doesn't pile up at the start loc. |
equip_to_appropriate_slot | Puts item into an appropriate inventory slot. Doesn't matter if a mob type doesn't have a slot. |
equip_to_slot | This is an UNSAFE proc. It merely handles the actual job of equipping. All the checks on whether you can or can't eqip need to be done before! Use mob_can_equip() for that task. In most cases you will want to use [equip_to_slot_if_possible()] |
equip_to_slot_if_possible | Mob tries to equip an item to a passed slot. This is a SAFE proc. Use this instead of [equip_to_slot()]! |
equip_to_slot_or_del | This is just a commonly used configuration for the equip_to_slot_if_possible() proc. Used to equip people when the rounds starts and when events happen and such. |
equipped_speed_mods | Gets the combined speed modification of all worn items Except base mob type doesnt really wear items |
force_gene_block | Helper for the most used case of activation/deactivation of the single gene.
Gene variable (/datum/dna/var/default_genes ) is NOT the same as species variable (/datum/species/var/default_genes ).
Gene variable is used to mark roundstart genes, and its function is to prevent mutadone from reseting this gene currently.
Species variable is used to prevent gene deactivation, unless MUTCHK_IGNORE_DEFAULT flag is present. |
get_actionspeed_by_category | Returns modifier value affected by passed category |
get_actionspeed_modifiers | Get the action speed modifiers list of the mob |
get_active_hand | Returns the thing in our active hand |
get_config_multiplicative_speed | Get the global config movespeed of a mob by type |
get_equipped_items | Collects all items in possibly equipped slots. |
get_equipped_slots | Same as above but we get slots, not items. |
get_inactive_hand | Returns the thing in our inactive hand |
get_mob_buckling_height | returns the height in pixel the mob should have when buckled to another mob. |
get_movespeed_modifiers | Get the move speed modifiers list of the mob |
get_organ | Returns specified external organ by zone index. |
get_telepathic_targets | Returns an assoc list which contains the mobs in range and their "visible" name. Mobs out of view but in range will be listed as unknown. Else they will have their visible name |
ghost_can_reenter | Checks if a mob's ghost can reenter their body or not. Used to check for DNR or AntagHUD. |
grant_actions_by_list | Takes in an associated list (key /datum/action typepaths, value is the AI blackboard key) and handles granting the action and adding it to the mob's AI controller blackboard.
This is only useful in instances where you don't want to store the reference to the action on a variable on the mob. |
has_actionspeed_modifier | Is there a actionspeed modifier for this mob |
has_movespeed_modifier | Is there a movespeed modifier for this mob |
has_nightvision | Can this mob see in the dark |
has_organ_for_slot | Only external organs and only for humans |
has_pain | Whether or not a mob can feel pain. |
has_status_effect | Checks if this mob has a status effect that shares the passed effect's ID |
initialize_actionspeed | Adds a default action speed modifier |
is_buckle_possible | Buckle to another mob |
is_general_slot | For wheter we want to check if mob manipulates an item in hands/backpack etc, and not actually wearing it in any REAL equipment slot. |
is_hands_free | Returns TRUE if mob's hands free |
is_in_active_hand | Returns TRUE if item is in mob's active hand |
is_in_hands | Returns item if its in mob's left or right hand |
is_in_inactive_hand | Returns TRUE if item is in mob's inactive hand |
limb_attack_self | Called by using Activate Held Object with an empty hand/limb |
manual_emote | Allows the intrepid coder to send a basic emote Takes text as input, sends it out to those who need to know after some light parsing If you need something more complex, make it into a datum emote Arguments: |
mob_negates_gravity | Does this mob ignore gravity |
playsound_local | Plays a sound with a specific point of origin for src mob Affected by pressure, distance, terrain and environment (see arguments) |
pointed | Point at an atom |
possess_by_player | Assigns a (c)key to this mob. |
post_buckle_mob | Call back post buckle to a mob to offset your visual height |
post_unbuckle_mob | Call back post unbuckle from a mob, (reset your visual height here) |
put_in_active_hand | Puts item into active hand if possible. Returns TRUE on success. |
put_in_any_hand_if_possible | Just another helper. Puts item in one of the hands if they are empty. |
put_in_hand | DO NO USE THIS PROC, there are plenty of helpers below: put_in_l_hand, put_in_active_hand, put_in_hands etc.
Puts an item into hand by hand_id (ITEM_SLOT_HAND_LEFT / ITEM_SLOT_HAND_RIGHT) and calls all necessary triggers/updates. |
put_in_hand_check | Nonliving mobs don't have hands |
put_in_hands | Put item in our active hand if possible. Failing that it tries our inactive hand. Returns TRUE on success.
If both fail it drops item on the floor and returns FALSE
Just puts stuff on the floor for most mobs, since all mobs have hands but putting stuff in the AI/corgi/ghost hand is VERY BAD. |
put_in_inactive_hand | Puts item into inactive hand if possible. Returns TRUE on success. |
put_in_l_hand | Puts item into l_hand if possible and calls all necessary triggers/updates. Returns TRUE on success. |
put_in_r_hand | Puts item into r_hand if possible and calls all necessary triggers/updates. Returns TRUE on success. |
quick_equip | This proc is called whenever mob's client presses 'equip_held_object' hotkey |
ranged_secondary_attack | Ranged secondary attack |
real_human_being | Determines if mob has and can use his hands like a human |
refresh_obscured | Recalculates the mob's obscured and covered slots based on currently equipped items |
remove_actionspeed_mod_immunities | Unignores specific action slowdowns. Accepts a list of slowdowns. |
remove_actionspeed_modifier | Remove a action speed modifier from a mob, whether static or variable. |
remove_from_alive_mob_list | Removes the mob reference from the list of all mobs alive. If mob is cliented, it removes it from the list of all living player-mobs. |
remove_from_current_dead_players | Removes the mob reference from either the list of dead player-mobs or from the list of observers, depending on how they joined the game. |
remove_from_current_living_players | Removes the mob reference from the list of living player-mobs. If the mob is an antag, it removes it from the list of living antag player-mobs. |
remove_from_dead_mob_list | Remvoes the mob reference from list of all the dead mobs. If mob is cliented, it adds it to the list of all dead player-mobs. |
remove_from_mob_list | Removes the mob reference from the list and directory of all mobs. Called on Destroy(). |
remove_from_player_list | Removes the mob reference from the list of all player-mobs, besides from either the of dead or alive player-mob lists, as appropriate. Called on Logout(). |
remove_movespeed_modifier | Remove a move speed modifier from a mob, whether static or variable. |
reset_perspective | Reset the attached clients perspective (viewpoint) |
resist_grab | Basic proc used to resist any grab state. |
run_pointed | Possibly delayed verb that finishes the pointing process starting in [/mob/verb/pointed()]. Either called immediately or in the tick after pointed() was called, as per the [DEFAULT_QUEUE_OR_CALL_VERB()] macro. |
run_quick_equip | Proc extender of /mob/verb/quick_equip used to make the verb queuable if the server is overloaded |
say_emphasis | Scans the input sentence for speech emphasis modifiers, notably |italics|, +bold+, and underline -mothblocks |
say_understands | Checks if the mob can understand the other speaker |
set_invis_see | see invisibility is the mob's capability to see things that ought to be hidden from it Can think of it as a primitive version of changing the alpha of planes We mostly use it to hide ghosts, no real reason why |
set_nutrition | Force set the mob nutrition |
set_sight | Sight here is the mob.sight var, which tells byond what to actually show to our client See code__DEFINES\sight.dm for more details |
set_thinking_indicator | Toggles the floating thought bubble above a players head. |
set_typing_indicator | Toggles the floating chat bubble above a players head. |
shared_ui_interaction | public |
shuttleRotate | Turf rotate procs |
slip | Called when this mob slips over, override as needed |
special_hands_drop_action | Specal proc for special mobs that use "hands" in weird ways. |
spin | Spin this mob around it's central axis |
start_audio_emote_cooldown | Start the cooldown for an emote that plays audio. |
temporarily_remove_item_from_inventory | Visibly unequips I but item is not moved and remains in src .
Item MUST BE FORCEMOVE'D OR QDEL'D afterwards. |
throw_alert | Proc to create or update an alert. Returns the alert if the alert is new or updated, 0 if it was thrown already. Each mob may only have one alert per category. |
transfer_item_to_loc | For when the item will be immediately placed in a loc other than the ground.
If newloc is not a turf and you expect animation to register, use [drop_transfer_item_to_loc()] instead. |
update_actionspeed | Go through the list of actionspeed modifiers and calculate a final actionspeed for every category |
update_body | Updates every part of a carbon's body. Including parts, mutant parts, lips, underwear, and socks. |
update_clothing | Updates every item slot passed into it. |
update_config_movespeed | Set or update the global movespeed config on a mob |
update_held_items | Updates the held items overlay(s) & HUD element. |
update_mouse_pointer | Update the mouse pointer of the attached client in this mob |
update_movespeed | Go through the list of movespeed modifiers and calculate a final movespeed. |
update_pockets | Updates the pocket overlay & HUD element. |
update_suit_storage | Updates the suit storage overlay & HUD element. |
update_worn_back | Updates the back overlay & HUD element. |
update_worn_belt | Updates the belt overlay & HUD element. |
update_worn_ears | Updates the headset overlay & HUD element. |
update_worn_glasses | Updates the glasses overlay & HUD element. |
update_worn_gloves | Updates the glasses overlay & HUD element. |
update_worn_handcuffs | Updates the handcuff overlay & HUD element. |
update_worn_head | Updates the on-head overlay & HUD element. |
update_worn_id | Updates the id overlay & HUD element. |
update_worn_legcuffs | Updates the legcuff overlay & HUD element. |
update_worn_mask | Updates the mask overlay & HUD element. |
update_worn_neck | Updates the neck overlay & HUD element. |
update_worn_oversuit | Updates the oversuit overlay & HUD element. |
update_worn_shoes | Updates the shoes overlay & HUD element. |
update_worn_undersuit | Updates the undersuit/uniform overlay & HUD element. |
usable_emote_keys | Get a list of all emote keys usable by the current mob. |
Var Details
LAssailant 
The last mob/living/carbon to push/drag/grab this mob (mostly used by slimes friend recognition)
actionspeed_mod_immunities 
List of action speed modifiers ignored by this mob. List -> List (id) -> List (sources)
actionspeed_modification 
List of action speed modifiers applying to this mob
alerts 
Contains /atom/movable/screen/alert only // On /mob so clientless mobs will throw alerts properly
audio_emote_cd_status 
Cooldown on audio effects from emotes.
audio_emote_unintentional_cd_status 
Cooldown on audio effects from unintentional emotes.
blood_state 
Weirdly named, effects how blood transfers onto objects
bloody_feet 
Assoc list for tracking how "bloody" a mobs feet are, used for creating bloody foot/shoeprints on turfs when moving
buckled 
movable atoms buckled to this mob
buckling 
movable atom we are buckled to
cached_multiplicative_actions_slowdown 
The calculated mob action speed slowdown based on the modifiers list, sorted by category in associvative list
cached_multiplicative_slowdown 
The calculated mob speed slowdown based on the modifiers list
canon_client 
The current client inhabiting this mob. Managed by login/logout This exists so we can do cleanup in logout for occasions where a client was transfere rather then destroyed We need to do this because the mob on logout never actually has a reference to client We also need to clear this var/do other cleanup in client/Destroy, since that happens before logout HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
current_nutrition_level 
Current nutrition level of mob (look at /datum/nutrition_level for more info),
default_num_hands 
How many hands does this mob have by default. This shouldn't change at runtime.
default_num_legs 
How many legs does this mob have by default. This shouldn't change at runtime.
diseases 
List of active diseases in a mob
do_afters 
For storing what do_after's someone has, key = string, value = amount of interactions of that type happening.
emote_cooldown_override 
Override for cooldowns on non-audio emotes. Should be a number in deciseconds.
emote_type 
Define emote default type, EMOTE_VISIBLE for seen emotes, EMOTE_AUDIBLE for heard emotes.
emotes_used 
Tracks last uses of emotes for cooldown purposes
feet_blood_DNA 
Basically a lazy list, copies the DNA of blood you step in
feet_blood_color 
affects the blood color of your feet, color taken from the blood you step in
focus 
The datum receiving keyboard input. src by default
hand 
Currently active mob's hand.
has_enabled_antagHUD 
Whether antagHUD has been enabled previously.
has_limbs 
Whether this mob have any limbs he can move with
hud_type 
Mob hud type
languages 
For speaking/listening.
last_typed 
Last thing we typed in to the typing indicator, probably does not need to exist
last_typed_time 
Last time we typed something in to the typing popup
mob_spell_list 
Construct spells and mime spells. Spells that do not transfer from one mob to another and can not be lost in mindswap.
movespeed_mod_immunities 
List of movement speed modifiers ignored by this mob. List -> List (id) -> List (sources)
movespeed_modification 
List of movement speed modifiers applying to this mob
next_click 
This is mainly modified by click code, to modify click delays elsewhere, use next_move and changeNext_move(), Controls the click delay. Changed with
next_move_adjust 
Unused, used to adjust our next move on a linar skill world.time + (how_many_deciseconds + Next move adjust) = Next move
next_move_modifier 
Value to multiply action delays by, actually used world.time + (how_many_deciseconds * Next move Adjust) = Next move
nightvision 
Backward compatibility var for determining nightvision like it used to be see_in_dark and see_through_darkness screen-overlay
num_hands 
How many hands hands does this mob currently have. Should only be changed through set_num_hands()
num_legs 
How many legs does this mob currently have. Should only be changed through set_num_legs()
player_logged 
SSD var. When mob has SSD status it contains num value (in deciseconds), since last mob logout. Always null otherwise.
progressbars 
List of progress bars this mob is currently seeing for actions
sound_environment_override 
Override for sound_environments. If this is set the user will always hear a specific type of reverb (Instead of the area defined reverb)
speak_emote 
Verb used when speaking phrases (e.g. "states", "chirps", "beeps"). Appears before speak messages. Defaults to 'say' if speak_emote is null.
status_flags 
Bitflags defining which status effects can be inflicted (replaces canweaken, canstun, etc)
temporary_languages 
For reagents that grant language knowlege.
tgui_open_uis 
global
Tracks open UIs for a user.
thinking 
Affects if you have a thinking indicator
typing 
Affects if you have a typing indicator
usable_hands 
How many usable hands does this mob currently have. Should only be changed through set_usable_hands()
usable_legs 
How many usable legs this mob currently has. Should only be changed through set_usable_legs()
zone_selected 
The zone this mob is currently targeting
Proc Details
AltClickOn
Main proc for primary alt click
CanContractDisease
A special checks for this type of mob
Returns:
- TRUE - if can contract disease
- FALSE - otherwise
CheckVirusProtection
Checking mob's protection against disease D by the chosen method in chosen zone Returns:
- TRUE - mob has protected from the virus
- FALSE - otherwise
ClickOn
Standard mob ClickOn()
After that, mostly just check your state, check whether you're holding an item, check whether you're adjacent to the target, then pass off the click to whoever is receiving it.
The most common are:
- [mob/proc/UnarmedAttack] (atom, adjacent) - used here only when adjacent, with no item in hand; in the case of humans, checks gloves
- atom/proc/attackby (item, user) - used only when adjacent
- [obj/item/proc/melee_attack_chain(user, atom, params) - used only when atom is adjacent adn was clicked byt in hand item
- [mob/proc/RangedAttack] (atom, modifiers) - used only ranged, only used for tk and laser eyes but could be changed
IsParalyzed
PARALYSE
IsWeakened
WEAKEN
Process_Spacemove
Handles mob/living movement in space (or no gravity)
Called by /client/Move()
return TRUE for movement or FALSE for none
You can move in space if you have a spacewalk ability
add_actionspeed_mod_immunities
Ignores specific action slowdowns. Accepts a list of slowdowns.
add_actionspeed_modifier
Add a action speed modifier to a mob. If a variable subtype is passed in as the first argument, it will make a new datum. If ID conflicts, it will overwrite the old ID.
add_movespeed_modifier
Add a move speed modifier to a mob. If a variable subtype is passed in as the first argument, it will make a new datum. If ID conflicts, it will overwrite the old ID.
add_to_alive_mob_list
Adds the mob reference to the list of all mobs alive. If mob is cliented, it adds it to the list of all living player-mobs.
add_to_current_dead_players
Adds the cliented mob reference to either the list of dead player-mobs or to the list of observers, depending on how they joined the game.
add_to_current_living_players
Adds the cliented mob reference to the list of living player-mobs. If the mob is an antag, it adds it to the list of living antag player-mobs.
add_to_dead_mob_list
Adds the mob reference to the list of all the dead mobs. If mob is cliented, it adds it to the list of all dead player-mobs.
add_to_mob_list
Adds the mob reference to the list and directory of all mobs. Called on Initialize().
add_to_player_list
Adds the cliented mob reference to the list of all player-mobs, besides to either the of dead or alive player-mob lists, as appropriate. Called on Login().
adjust_nutrition
Adjust the nutrition of a mob
attack_ui
This proc is called whenever someone clicks an inventory UI slot.
base_click_alt
Base proc for alt click interaction. Returns if the click was intercepted & handled
If you wish to add custom click_alt
behavior for a single type, use that proc.
become_uncliented
Cleanup proc that's called when a mob loses a client, either through client destroy or logout Logout happens post client del, so we can't just copypaste this there. This keeps things clean and consistent
buckle_mob
Buckle a living mob to this mob. Also turns you to face the other mob
You can buckle on mobs if you're next to them since most are dense
can_equip
Returns if a certain item can be equipped to a certain slot. Always call obj/item/mob_can_equip() instead of this proc.
can_perform_action
Checks whether a mob can perform an action to interact with an object
The default behavior checks if the mob is:
- Directly adjacent (1-tile radius)
- Standing up (not resting)
- Allows telekinesis to be used to skip adjacent checks (if they have DNA mutation)
action_bitflags: (see code/__DEFINES/mobs.dm)
- NEED_GRAVITY - If gravity must be present to perform action (can't use pens without gravity)
- NEED_LITERACY - If reading is required to perform action (can't read a book if you are illiterate)
- NEED_LIGHT - If lighting must be present to perform action (can't heal someone in the dark)
- NEED_DEXTERITY - If other mobs (monkeys, aliens, etc) can perform action (can't use computers if you are a monkey)
- NEED_HANDS - If hands are required to perform action (can't pickup items if you are a cyborg)
- FORBID_TELEKINESIS_REACH - If telekinesis is forbidden to perform action from a distance (ex. canisters are blacklisted from telekinesis manipulation)
- ALLOW_SILICON_REACH - If silicons are allowed to perform action from a distance (silicons can operate airlocks from far away)
- ALLOW_RESTING - If resting on the floor is allowed to perform action ()
- ALLOW_VENTCRAWL - Mobs with ventcrawl traits can alt-click this to vent
- BYPASS_ADJACENCY - The target does not have to be adjacent
- SILENT_ADJACENCY - Adjacency is required but errors are not printed
- NOT_INSIDE_TARGET - The target maybe adjacent but the mob should not be inside the target
- ALLOW_PAI - Allows pAIs to perform an action
silence_adjacency: Sometimes we want to use this proc to check interaction without allowing it to throw errors for base case adjacency Alt click uses this, as otherwise you can detect what is interactable from a distance via the error message
can_resist
Can this mob resist (default FALSE)
can_strip
Can this mob use strip menu (defaut TRUE)
can_unEquip
General checks for do_unEquip proc: TRAIT_NODROP, obscurity and component blocking possibility.
Set 'silent' to FALSE
if you want to get warning messages.
can_use_audio_emote
Helper proc to determine if a mob can use emotes that make sound or not.
check_gene_block
Checks provided DNA block and activates/deactivates it depending on current block bounds.
Arguments:
- block - block to check
- flags - flags to consider
Returns TRUE if any changes were made, FALSE otherwise
check_genes
Checks all mob genes and activates/deactivates them depending on current block bounds.
Arguments:
- flags - flags to consider
check_obscured_slots
Collects flags_inv bitflags from all equipped items and returns slots considered as obscure.
Arguments:
- check_transparent - If
TRUE
bitflags from var/flags_inv_transparent will be considered, works like a toggle (^=) for var/flags_inv. Used in overlay updates to properly cover or uncover certain zones.
clear_important_client_contents
Clears the clients channel of this mob
create_chat_message
Creates a message overlay at a defined location for a given speaker
Arguments:
- speaker - The atom who is saying this message
- raw_message - The text content of the message
- spans - Additional classes to be added to the message
- language - The language that the message is said in
custom_emote
Perform a custom emote.
- m_type: Type of message to send.
- message: Content of the message. If none is provided, the user will be prompted to choose the input.
- intentional: Whether or not the user intendeded to perform the emote.
do_unEquip
DO NOT CALL THIS PROC. Use one of the 4 helper above. You may override it, but do not modify the args.
drop_all_held_items
Returns a list of all dropped held items. If none were dropped, returns an empty list.
drop_from_active_hand
Drops item in active hand.
drop_from_hands
Drops items in both hands.
drop_from_inactive_hand
Drops item in inactive hand.
drop_item_ground
Used to drop an item (if it exists) to the ground.
Returns TRUE
if item is successfully dropped.
Returns FALSE
if item can not be dropped due to TRAIT_NODROP or if item slot is obscured.
If item can be dropped, it will be forceMove()'d to the ground and the turf's Entered() will be called.
Arguments:
- 'force' overrides TRAIT_NODROP and clothing obscuration.
- 'invdrop' prevents stuff in belt/id/pockets/PDA slots from dropping if item was in jumpsuit slot. Only set to
FALSE
if it's going to be immediately replaced. - 'silent' set to
TRUE
if you want to disable warning messages. - 'ignore_pixel_shift' set to
TRUE
if you want to prevent item's visual position randomization.
drop_l_hand
Drops item in left hand.
drop_r_hand
Drops item in right hand.
drop_transfer_item_to_loc
Item will be dropped on turf below user, then forceMoved to newloc
.
Returns TRUE
if item is successfully transfered.
Returns FALSE
if newloc
is not specified or if its null
.
Returns FALSE
if item can not be dropped due to TRAIT_NODROP or if item slot is obscured.
Thic proc is required if you expect transfer animation to be properly played,
since item loc should be turf only to properly register image.
Arguments:
- 'force' overrides TRAIT_NODROP and clothing obscuration.
- 'invdrop' prevents stuff in belt/id/pockets/PDA slots from dropping if item was in jumpsuit slot. Only set to
FALSE
if it's going to be immediately replaced. - 'silent' set to
TRUE
if you want to disable warning messages.
emote
Send an emote.
- emote_key - Key of the emote being triggered
- type_override - Type of the emote, like EMOTE_AUDIBLE. If this is not null, the default type of the emote will be overridden.
- message - Custom parameter for the emote. This should be used if you want to pass something like a target programmatically.
- intentional - Whether or not the emote was deliberately triggered by the mob. If
FALSE
, it's forced, which skips some checks when calling the emote. - force_silence - If
TRUE
, unusable/nonexistent emotes will not notify the user. - ignore_cooldowns - If
TRUE
all cooldowns will be skipped.
enable_client_mobs_in_contents
propogates ourselves through our nested contents, similar to other important_recursive_contents procs main difference is that client contents need to possibly duplicate recursive contents for the clients mob AND its eye
equip_in_one_of_slots
Equipping passed item I
in any slot of passed list by order
equip_or_collect
Convinience proc. Collects crap that fails to equip either onto the mob's back, or drops it. Used in job equipping so shit doesn't pile up at the start loc.
equip_to_appropriate_slot
Puts item into an appropriate inventory slot. Doesn't matter if a mob type doesn't have a slot.
Arguments:
- 'force' - set to
TRUE
if you want to ignore equip delay and clothing obscuration. - 'drop_on_fail' - set to
TRUE
if item should be dropped on equip fail. - 'qdel_on_fail' - set to
TRUE
if item should be deleted on equip fail. - 'silent' - to stop warning if item has 'equip_delay_self'
equip_to_slot
This is an UNSAFE proc. It merely handles the actual job of equipping. All the checks on whether you can or can't eqip need to be done before! Use mob_can_equip() for that task. In most cases you will want to use [equip_to_slot_if_possible()]
equip_to_slot_if_possible
Mob tries to equip an item to a passed slot. This is a SAFE proc. Use this instead of [equip_to_slot()]!
- 'qdel_on_fail' - set to
TRUE
to have it deleteI
if it fails to equip - 'disable_warning' - set to
TRUE
if you want to disable the 'you are unable to equip that' warning. - 'bypass_equip_delay_self' - set to
TRUE
if you want to prevent item equipment delay - 'bypass_obscured' - set
TRUE
if you want to ignore clothing obscuration - 'initial' - used to indicate whether our items is initial equipment (job datums etc) or just a player doing it
equip_to_slot_or_del
This is just a commonly used configuration for the equip_to_slot_if_possible() proc. Used to equip people when the rounds starts and when events happen and such.
equipped_speed_mods
Gets the combined speed modification of all worn items Except base mob type doesnt really wear items
force_gene_block
Helper for the most used case of activation/deactivation of the single gene.
Gene variable (/datum/dna/var/default_genes
) is NOT the same as species variable (/datum/species/var/default_genes
).
Gene variable is used to mark roundstart genes, and its function is to prevent mutadone from reseting this gene currently.
Species variable is used to prevent gene deactivation, unless MUTCHK_IGNORE_DEFAULT flag is present.
Arguments:
- block - block to manipulate with.
- activate -
TRUE
for activate,FALSE
for deactivate. - update_default_status - whether to add/remove this block in/from
gene default_genes
variable. - ignore_species_default - if
TRUE
gene will be always removed, even if it belongs tospecies default_genes
variable.
Returns TRUE
if a gene was changed, FALSE
otherwise.
get_actionspeed_by_category
Returns modifier value affected by passed category
get_actionspeed_modifiers
Get the action speed modifiers list of the mob
get_active_hand
Returns the thing in our active hand
get_config_multiplicative_speed
Get the global config movespeed of a mob by type
get_equipped_items
Collects all items in possibly equipped slots.
get_equipped_slots
Same as above but we get slots, not items.
get_inactive_hand
Returns the thing in our inactive hand
get_mob_buckling_height
returns the height in pixel the mob should have when buckled to another mob.
get_movespeed_modifiers
Get the move speed modifiers list of the mob
get_organ
Returns specified external organ by zone index.
Arguments:
- zone - bodypart index (see [combat.dm] for defines)
get_telepathic_targets
Returns an assoc list which contains the mobs in range and their "visible" name. Mobs out of view but in range will be listed as unknown. Else they will have their visible name
ghost_can_reenter
Checks if a mob's ghost can reenter their body or not. Used to check for DNR or AntagHUD.
Returns FALSE if there is a ghost, and it can't reenter the body. Returns TRUE otherwise.
grant_actions_by_list
Takes in an associated list (key /datum/action
typepaths, value is the AI blackboard key) and handles granting the action and adding it to the mob's AI controller blackboard.
This is only useful in instances where you don't want to store the reference to the action on a variable on the mob.
has_actionspeed_modifier
Is there a actionspeed modifier for this mob
has_movespeed_modifier
Is there a movespeed modifier for this mob
has_nightvision
Can this mob see in the dark
Cursed version of checking lighting_cutoffs, just making orientation on nightvision see_in_dark analog
has_organ_for_slot
Only external organs and only for humans
has_pain
Whether or not a mob can feel pain.
Returns TRUE if the mob can feel pain, FALSE otherwise
has_status_effect
Checks if this mob has a status effect that shares the passed effect's ID
checked_effect - TYPEPATH of a status effect to check for. Checks for its ID, not it's typepath
Returns an instance of a status effect, or NULL if none were found.
initialize_actionspeed
Adds a default action speed modifier
is_buckle_possible
Buckle to another mob
You can buckle on mobs if you're next to them since most are dense
Turns you to face the other mob too
is_general_slot
For wheter we want to check if mob manipulates an item in hands/backpack etc, and not actually wearing it in any REAL equipment slot.
is_hands_free
Returns TRUE
if mob's hands free
is_in_active_hand
Returns TRUE
if item is in mob's active hand
is_in_hands
Returns item if its in mob's left or right hand
is_in_inactive_hand
Returns TRUE
if item is in mob's inactive hand
limb_attack_self
Called by using Activate Held Object with an empty hand/limb
Does nothing by default. The intended use is to allow limbs to call their own attack_self procs. It is up to the individual mob to override this parent and actually use it.
manual_emote
Allows the intrepid coder to send a basic emote Takes text as input, sends it out to those who need to know after some light parsing If you need something more complex, make it into a datum emote Arguments:
- text - The text to send out
Returns TRUE if it was able to run the emote, FALSE otherwise.
mob_negates_gravity
Does this mob ignore gravity
playsound_local
Plays a sound with a specific point of origin for src mob Affected by pressure, distance, terrain and environment (see arguments)
Arguments:
- turf_source - The turf our sound originates from, if this is not a turf, the sound is played with no spatial audio
- soundin - Either a file, or a string that can be used to get an SFX.
- vol - The volume of the sound, excluding falloff and pressure affection.
- vary - bool that determines if the sound changes pitch every time it plays.
- frequency - playback speed of audio.
- falloff_exponent - Rate of falloff for the audio. Higher means quicker drop to low volume. Should generally be over 1 to indicate a quick dive to 0 rather than a slow dive.
- channel - Optional: The channel the sound is played at.
- pressure_affected - bool Whether or not difference in pressure affects the sound (E.g. if you can hear in space).
- sound_to_use - Optional: Will default to soundin when absent
- max_distance - number, determines the maximum distance of our sound
- falloff_distance - Distance at which falloff begins. Sound is at peak volume (in regards to falloff) aslong as it is in this range.
- distance_multiplier - Default 1, multiplies the maximum distance of our sound
- use_reverb - bool default TRUE, determines if our sound has reverb
pointed
Point at an atom
mob verbs are faster than object verbs. See this byond forum post for why this isn't atom/verb/pointed()
note: ghosts can point, this is intended
visible_message will handle invisibility properly
Be noted, that this verb also serves as placeholder for "Object" tab.
Removing it causes interface update lags with appearing/disappearing "Object" tab when walking nearby "Object"-verbed things
possess_by_player
Assigns a (c)key to this mob.
post_buckle_mob
Call back post buckle to a mob to offset your visual height
post_unbuckle_mob
Call back post unbuckle from a mob, (reset your visual height here)
put_in_active_hand
Puts item into active hand if possible. Returns TRUE
on success.
put_in_any_hand_if_possible
Just another helper. Puts item in one of the hands if they are empty.
put_in_hand
DO NO USE THIS PROC, there are plenty of helpers below: put_in_l_hand, put_in_active_hand, put_in_hands etc.
Puts an item into hand by hand_id
(ITEM_SLOT_HAND_LEFT / ITEM_SLOT_HAND_RIGHT) and calls all necessary triggers/updates.
Returns TRUE
on success.
put_in_hand_check
Nonliving mobs don't have hands
put_in_hands
Put item in our active hand if possible. Failing that it tries our inactive hand. Returns TRUE
on success.
If both fail it drops item on the floor and returns FALSE
Just puts stuff on the floor for most mobs, since all mobs have hands but putting stuff in the AI/corgi/ghost hand is VERY BAD.
Arguments
- 'force' overrides TRAIT_NODROP and clothing obscuration.
- 'qdel_on_fail' qdels item if failed to pick in both hands.
- 'merge_stacks' set to
TRUE
to allow stack auto-merging even when both hands are full. - 'ignore_anim' set to
TRUE
to prevent pick up animation. - 'silent' set to
TRUE
to stop pick up sounds.
put_in_inactive_hand
Puts item into inactive hand if possible. Returns TRUE
on success.
put_in_l_hand
Puts item into l_hand
if possible and calls all necessary triggers/updates. Returns TRUE
on success.
put_in_r_hand
Puts item into r_hand
if possible and calls all necessary triggers/updates. Returns TRUE
on success.
quick_equip
This proc is called whenever mob's client presses 'equip_held_object' hotkey
ranged_secondary_attack
Ranged secondary attack
If the same conditions are met to trigger RangedAttack but it is instead initialized via a right click, this will trigger instead. Useful for mobs that have their abilities mapped to right click.
real_human_being
Determines if mob has and can use his hands like a human
refresh_obscured
Recalculates the mob's obscured and covered slots based on currently equipped items
remove_actionspeed_mod_immunities
Unignores specific action slowdowns. Accepts a list of slowdowns.
remove_actionspeed_modifier
Remove a action speed modifier from a mob, whether static or variable.
remove_from_alive_mob_list
Removes the mob reference from the list of all mobs alive. If mob is cliented, it removes it from the list of all living player-mobs.
remove_from_current_dead_players
Removes the mob reference from either the list of dead player-mobs or from the list of observers, depending on how they joined the game.
remove_from_current_living_players
Removes the mob reference from the list of living player-mobs. If the mob is an antag, it removes it from the list of living antag player-mobs.
remove_from_dead_mob_list
Remvoes the mob reference from list of all the dead mobs. If mob is cliented, it adds it to the list of all dead player-mobs.
remove_from_mob_list
Removes the mob reference from the list and directory of all mobs. Called on Destroy().
remove_from_player_list
Removes the mob reference from the list of all player-mobs, besides from either the of dead or alive player-mob lists, as appropriate. Called on Logout().
remove_movespeed_modifier
Remove a move speed modifier from a mob, whether static or variable.
reset_perspective
Reset the attached clients perspective (viewpoint)
reset_perspective(null) set eye to common default : mob on turf, loc otherwise reset_perspective(thing) set the eye to the thing (if it's equal to current default reset to mob perspective)
resist_grab
Basic proc used to resist any grab state.
run_pointed
Possibly delayed verb that finishes the pointing process starting in [/mob/verb/pointed()]. Either called immediately or in the tick after pointed() was called, as per the [DEFAULT_QUEUE_OR_CALL_VERB()] macro.
run_quick_equip
Proc extender of /mob/verb/quick_equip used to make the verb queuable if the server is overloaded
say_emphasis
Scans the input sentence for speech emphasis modifiers, notably |italics|, +bold+, and underline -mothblocks
say_understands
Checks if the mob can understand the other speaker
If it return FALSE, then the message will have some letters replaced with stars from the heard message
set_invis_see
see invisibility is the mob's capability to see things that ought to be hidden from it Can think of it as a primitive version of changing the alpha of planes We mostly use it to hide ghosts, no real reason why
set_nutrition
Force set the mob nutrition
set_sight
Sight here is the mob.sight var, which tells byond what to actually show to our client See code__DEFINES\sight.dm for more details
set_thinking_indicator
Toggles the floating thought bubble above a players head.
Arguments:
- state - Should a thought bubble be shown or hidden
set_typing_indicator
Toggles the floating chat bubble above a players head.
Arguments:
- state - Should a chat bubble be shown or hidden
shared_ui_interaction
public
Standard interaction/sanity checks. Different mob types may have overrides.
return UI_state The state of the UI.
shuttleRotate
Turf rotate procs
Mob rotate procs
slip
Called when this mob slips over, override as needed
weaken_amount - time (in deciseconds) the slip leaves them on the ground slipped_on - optional, what'd we slip on? if not set, we assume they just fell over lube - bitflag of "lube flags", see [mobs.dm] for more information tilesSlipped - how many tiles will we slip through.
special_hands_drop_action
Specal proc for special mobs that use "hands" in weird ways.
spin
Spin this mob around it's central axis
start_audio_emote_cooldown
Start the cooldown for an emote that plays audio.
Arguments:
- intentional - Whether or not the user deliberately triggered this emote.
- cooldown - The amount of time that should be waited before any other audio emote can fire.
temporarily_remove_item_from_inventory
Visibly unequips I
but item is not moved and remains in src
.
Item MUST BE FORCEMOVE'D OR QDEL'D afterwards.
Arguments:
- 'force' overrides TRAIT_NODROP and clothing obscuration.
- 'invdrop' prevents stuff in belt/id/pockets/PDA slots from dropping if item was in jumpsuit slot. Only set to
FALSE
if it's going to be immediately replaced. - 'silent' set to
TRUE
if you want to disable warning messages.
throw_alert
Proc to create or update an alert. Returns the alert if the alert is new or updated, 0 if it was thrown already. Each mob may only have one alert per category.
Arguments:
- category - a text string corresponding to what type of alert it is
- type - a type path of the actual alert type to throw
- severity - is an optional number that will be placed at the end of the icon_state for this alert For example, high pressure's icon_state is "highpressure" and can be serverity 1 or 2 to get "highpressure1" or "highpressure2"
- obj/new_master - optional argument. Sets the alert's icon state to "template" in the ui_style icons with the master as an overlay. Clicks are forwarded to master
- no_anim - whether the alert should play a small sliding animation when created on the player's screen
- icon_override - makes it so the alert is not replaced until cleared by a clear_alert with clear_override, and it's used for hallucinations.
- list/alert_args - a list of arguments to pass to the alert when creating it
transfer_item_to_loc
For when the item will be immediately placed in a loc other than the ground.
If newloc
is not a turf and you expect animation to register, use [drop_transfer_item_to_loc()] instead.
Arguments:
- 'force' overrides TRAIT_NODROP and clothing obscuration.
- 'invdrop' prevents stuff in belt/id/pockets/PDA slots from dropping if item was in jumpsuit slot. Only set to
FALSE
if it's going to be immediately replaced. - 'silent' set to
TRUE
if you want to disable warning messages.
update_actionspeed
Go through the list of actionspeed modifiers and calculate a final actionspeed for every category
update_body
Updates every part of a carbon's body. Including parts, mutant parts, lips, underwear, and socks.
update_clothing
Updates every item slot passed into it.
update_config_movespeed
Set or update the global movespeed config on a mob
update_held_items
Updates the held items overlay(s) & HUD element.
update_mouse_pointer
Update the mouse pointer of the attached client in this mob
update_movespeed
Go through the list of movespeed modifiers and calculate a final movespeed.
update_pockets
Updates the pocket overlay & HUD element.
update_suit_storage
Updates the suit storage overlay & HUD element.
update_worn_back
Updates the back overlay & HUD element.
update_worn_belt
Updates the belt overlay & HUD element.
update_worn_ears
Updates the headset overlay & HUD element.
update_worn_glasses
Updates the glasses overlay & HUD element.
update_worn_gloves
Updates the glasses overlay & HUD element.
update_worn_handcuffs
Updates the handcuff overlay & HUD element.
update_worn_head
Updates the on-head overlay & HUD element.
update_worn_id
Updates the id overlay & HUD element.
update_worn_legcuffs
Updates the legcuff overlay & HUD element.
update_worn_mask
Updates the mask overlay & HUD element.
update_worn_neck
Updates the neck overlay & HUD element.
update_worn_oversuit
Updates the oversuit overlay & HUD element.
update_worn_shoes
Updates the shoes overlay & HUD element.
update_worn_undersuit
Updates the undersuit/uniform overlay & HUD element.
usable_emote_keys
Get a list of all emote keys usable by the current mob.
- intentional_use: Whether or not to check based on if the action was intentional.