Space Station 13 - Modules - TypesVar Details - Proc Details

mob

Vars

client_colorsThe set of /datum/client_color currently applied to the mob, if any.
confusedPositive Integer. The mob's current confusion level. Ticks down every Fire() in SSMobs. See set_confused(), mod_confused(), clear_confused(), and is_confused().
do_unique_user_handleInteger. Unique sequential ID from the do_after proc used to validate DO_USER_UNIQUE_ACT flag checks.
logout_timeInteger or null. Stores the world.time value at the time of Logout(). If null, the mob is either considered logged in or has never logged out.
renderersRenderers on /mob We attach renderers to mobs for their lifespan. Only mobs with clients get renderers, and they are removed again when the mob loses its client. Mobs get their own unique renderer instances but it would not be inconceivable to share them globally. The list of renderers associated with this mob.
see_blackSight Set Handling

Procs

AltClickOnCalled when the mob alt+clicks on an atom. By default, this calls the targeted atom's on_click/alt extension's on_click() proc, or the atom's AltClick() proc.
AltShiftClickOnCalled when the mob alt+shift+clicks on an atom. By default, this calls the atom's AltShiftClick() proc.
CreateRenderersCreates the mob's renderers on /Login()
CtrlAltClickOnCalled when the mob ctrl+alt+clicks on an atom. By default, this calls the atom's CtrlAltClick() proc or calls the mob's pointed() proc.
CtrlAltShiftClickOnCalled when the mob ctrl+alt+shift+clicks on an atom. By default, this calls the atom's CtrlAltShiftClick() proc.
CtrlClickOnCalled when the mob ctrl+clicks on an atom. By default, this calls the targeted atom's CtrlClick() proc.
CtrlShiftClickOnCalled when the mob ctrl+shift+clicks on an atom. By default, calls the atom's CtrlShiftClick() proc.
GetAllHeldFetches all held items of the given path.
HandsEmptyWhether or not the mob's hands or other holding slots are empty. Returns boolean.
HasFreeHandWhether or not the mob has any free hands/holding slots.
IsHoldingChecks if a given item or path is in any of the mob's hands or other holding slots.
MiddleClickOnCalled when a mob middle-clicks on an object. By default, this is used only as a hotkey to call swap_hand().
RangedAttackCalled when a mob attmepts to interact with an object that it is not adjacent to. For complex mobs, this includes interacting with an empty hand or empty module.
RemoveRenderersRemoves the mob's renderers on /Logout()
RestrainedClickOnCalled when a mob attempts to interact with an atom while handcuffed or otherwise restrained. Not currently used.
ShiftClickOnCalled when the mob shift+clicks on an atom. By default, this calls the targeted atom's ShiftClick() proc.
ShowMemoriesVerbs
UnarmedAttackCalled when the mob interacts with something it is adjacent to. For complex mobs, this includes interacting with an empty hand or empty module. Generally, this translates to attack_hand(), attack_robot(), etc.
add_client_colorAdds an instance of color_type to the mob's client_colors list if one doesn't already exist.
add_to_living_mob_listLife Handling
attack_empty_handCalled when a mob attempts to use an empty hand on itself.
blueswitchHandles applying blueswitch effects to the mob and creating the clone.
clear_client_colorsClears the mobs client_colors list.
clear_confusedSets a mob's confused value to 0.
direct_machine_interfaceWhether or not the mob can directly interact with the machine regardless of screen and input status. Checked in CanUseTopic().
do_skilledPerforms a do_after timer, with a modifier applied to the delay time based on the user's skill in the given skill path.
drop_itemDrops the item in our active hand. TODO: rename this to drop_active_hand or something Make sure you are ABSOLUTELY CERTAIN you need to drop this and ignore unequip checks (For example, grabs can be "dropped" but only willingly) Else use unequip_item
equip_to_appropriate_slotPlace I into the first slot it fits in the order of slots_by_priority, returning the slot or falsy.
equip_to_slotUNSAFELY place I into this mob's inventory at slot if existentially possible. Generally, use the _if_possible version.
equip_to_slot_if_possibleAttempt to place I into this mob's inventory at slot. See TRYEQUIP_* flags for behavior modifiers.
fetch_bansAliases to _find_bans_in_connections() with this mob's fetch_connections() result.
fetch_connectionsAliases to _fetch_connections() with this mob's client, if present, or this mob's ckey/last ckey, last IP, and last CID.
get_attack_speedUsed to get how fast a mob should attack, and influences click delay. This is just for inheritance.
has_client_colorChecks whether the mob has an instance of color_type in its client_colors list.
has_danger_grabChecks if the target has a grab from the user
isEquippedReturns truthy when item is in the mobs inventory slots, or in slot if specified.
is_confusedWhether or not the mob's confusion level is at the threshhold.
is_speciesDetermine if the mob is the supplied species by text name, species path, or species instance name
mod_confusedModifies a mob's confused value by mod_amount.
remove_client_colorRemoves an instance of color_type from the mob's client_colors list, returning TRUE if one existed.
remove_grabs_and_pullsRemove all grabs applied to target mob. Useful when mob is entering a compartment where they're not supposed to be grabbed.
set_confusedSets a mob's confused value.
set_see_in_darkSee In Dark Set Handling
set_see_invisibleSee Invisible Set Handling
show_associated_bansAliases to _show_associated_bans() using this mob's fetch_bans() result, ckey, IP address, and CID.
show_associated_connectionsAliases to _show_associated_connections() using this mob's fetch_connections() result, ckey, IP address, and CID.
update_client_colorResets the mob's client.color to null and then applies the client_colors list.
use_sanity_checkValidates the mob can perform general interactions. Primarily intended for use after inputs, sleeps, timers, etc to ensure the action can still be completed.

Var Details

client_colors

The set of /datum/client_color currently applied to the mob, if any.

confused

Positive Integer. The mob's current confusion level. Ticks down every Fire() in SSMobs. See set_confused(), mod_confused(), clear_confused(), and is_confused().

do_unique_user_handle

Integer. Unique sequential ID from the do_after proc used to validate DO_USER_UNIQUE_ACT flag checks.

logout_time

Integer or null. Stores the world.time value at the time of Logout(). If null, the mob is either considered logged in or has never logged out.

renderers

Renderers on /mob We attach renderers to mobs for their lifespan. Only mobs with clients get renderers, and they are removed again when the mob loses its client. Mobs get their own unique renderer instances but it would not be inconceivable to share them globally. The list of renderers associated with this mob.

see_black

Sight Set Handling

Proc Details

AltClickOn

Called when the mob alt+clicks on an atom. By default, this calls the targeted atom's on_click/alt extension's on_click() proc, or the atom's AltClick() proc.

Parameters:

Returns boolean. Whether or not the interaction was handled.

AltShiftClickOn

Called when the mob alt+shift+clicks on an atom. By default, this calls the atom's AltShiftClick() proc.

Parameters:

Returns boolean - Whether or not the interaction was handled.

CreateRenderers

Creates the mob's renderers on /Login()

CtrlAltClickOn

Called when the mob ctrl+alt+clicks on an atom. By default, this calls the atom's CtrlAltClick() proc or calls the mob's pointed() proc.

Parameters:

Returns boolean. Whether or not the interaction was handled.

CtrlAltShiftClickOn

Called when the mob ctrl+alt+shift+clicks on an atom. By default, this calls the atom's CtrlAltShiftClick() proc.

Parameters:

Returns boolean - Whether or not the interaction was handled.

CtrlClickOn

Called when the mob ctrl+clicks on an atom. By default, this calls the targeted atom's CtrlClick() proc.

Parameters:

Returns boolean - Whether or not the action was handled.

CtrlShiftClickOn

Called when the mob ctrl+shift+clicks on an atom. By default, calls the atom's CtrlShiftClick() proc.

Parameters:

Returns boolean. Whether or not the interaction was handled.

GetAllHeld

Fetches all held items of the given path.

If not passed any parameters, will simply fetch all held items.

Parameters:

Returns list of found instances, or null.

HandsEmpty

Whether or not the mob's hands or other holding slots are empty. Returns boolean.

HasFreeHand

Whether or not the mob has any free hands/holding slots.

IsHolding

Checks if a given item or path is in any of the mob's hands or other holding slots.

Parameters:

Returns instance of /obj/item or null. the item found in the mob's hands.

MiddleClickOn

Called when a mob middle-clicks on an object. By default, this is used only as a hotkey to call swap_hand().

Parameters:

Returns boolean. Whether or not the interaction was handled.

RangedAttack

Called when a mob attmepts to interact with an object that it is not adjacent to. For complex mobs, this includes interacting with an empty hand or empty module.

Exception: Telekinesis will call UnarmedAttack([target], 0) instead.

Parameters:

Returns boolean - Whether or not the mob was able to perform the interaction.

RemoveRenderers

Removes the mob's renderers on /Logout()

RestrainedClickOn

Called when a mob attempts to interact with an atom while handcuffed or otherwise restrained. Not currently used.

Parameters:

ShiftClickOn

Called when the mob shift+clicks on an atom. By default, this calls the targeted atom's ShiftClick() proc.

Parameters:

Returns boolean. Whether or not the interaction was handled.

ShowMemories

Verbs

UnarmedAttack

Called when the mob interacts with something it is adjacent to. For complex mobs, this includes interacting with an empty hand or empty module. Generally, this translates to attack_hand(), attack_robot(), etc.

Exception: This is also called when telekinesis is used, even if not adjacent to the target.

Parameters:

Returns boolean - Whether or not the mob was able to perform the interaction.

add_client_color

Adds an instance of color_type to the mob's client_colors list if one doesn't already exist.

add_to_living_mob_list

Life Handling

attack_empty_hand

Called when a mob attempts to use an empty hand on itself.

Parameters:

blueswitch

Handles applying blueswitch effects to the mob and creating the clone.

Parameters:

Returns instance of mob. The created bluespace clone, or null if no clone was created.

clear_client_colors

Clears the mobs client_colors list.

clear_confused

Sets a mob's confused value to 0.

Returns integer. The new value of confused.

direct_machine_interface

Whether or not the mob can directly interact with the machine regardless of screen and input status. Checked in CanUseTopic().

do_skilled

Performs a do_after timer, with a modifier applied to the delay time based on the user's skill in the given skill path.

Parameters

Returns boolean. Whether or not the do after check passed.

drop_item

Drops the item in our active hand. TODO: rename this to drop_active_hand or something Make sure you are ABSOLUTELY CERTAIN you need to drop this and ignore unequip checks (For example, grabs can be "dropped" but only willingly) Else use unequip_item

equip_to_appropriate_slot

Place I into the first slot it fits in the order of slots_by_priority, returning the slot or falsy.

equip_to_slot

UNSAFELY place I into this mob's inventory at slot if existentially possible. Generally, use the _if_possible version.

equip_to_slot_if_possible

Attempt to place I into this mob's inventory at slot. See TRYEQUIP_* flags for behavior modifiers.

fetch_bans

Aliases to _find_bans_in_connections() with this mob's fetch_connections() result.

Returns list of lists.

fetch_connections

Aliases to _fetch_connections() with this mob's client, if present, or this mob's ckey/last ckey, last IP, and last CID.

Returns list of lists.

get_attack_speed

Used to get how fast a mob should attack, and influences click delay. This is just for inheritance.

Parameters:

Returns a number indicating the determined attack cooldown/speed.

has_client_color

Checks whether the mob has an instance of color_type in its client_colors list.

has_danger_grab

Checks if the target has a grab from the user

isEquipped

Returns truthy when item is in the mobs inventory slots, or in slot if specified.

is_confused

Whether or not the mob's confusion level is at the threshhold.

Parameters:

Returns boolean.

is_species

Determine if the mob is the supplied species by text name, species path, or species instance name

mod_confused

Modifies a mob's confused value by mod_amount.

Parameters:

Returns integer. The new value of confused.

remove_client_color

Removes an instance of color_type from the mob's client_colors list, returning TRUE if one existed.

remove_grabs_and_pulls

Remove all grabs applied to target mob. Useful when mob is entering a compartment where they're not supposed to be grabbed.

set_confused

Sets a mob's confused value.

Parameters:

Returns integer. The new value of confused.

set_see_in_dark

See In Dark Set Handling

set_see_invisible

See Invisible Set Handling

show_associated_bans

Aliases to _show_associated_bans() using this mob's fetch_bans() result, ckey, IP address, and CID.

Has no return value.

show_associated_connections

Aliases to _show_associated_connections() using this mob's fetch_connections() result, ckey, IP address, and CID.

Has no return value.

update_client_color

Resets the mob's client.color to null and then applies the client_colors list.

use_sanity_check

Validates the mob can perform general interactions. Primarily intended for use after inputs, sleeps, timers, etc to ensure the action can still be completed.

Parameters:

Returns boolean.