/tg/ Station 13 - Modules - TypesVar Details - Proc Details

item

Anything you can pick up and hold.

Vars

actionslist of /datum/action's that this item has.
actions_typeslist of paths of action datums to give to the item on New().
age_restrictedWhether spessmen with an ID with an age below AGE_MINOR (20 by default) can buy this item
alternate_worn_layerForced mob worn layer instead of the standard preferred size.
armour_penetrationpercentage of armour effectiveness to remove
attack_speedThe click cooldown given after attacking. Lower numbers means faster attacks
attack_verb_continuousUsed in atom/proc/attackby to say how something was attacked "[x] has been [z.attack_verb] by [y] with [z]"
belt_icon_stateIcon state for the belt overlay, if null the normal icon_state will be used.
block_chanceChance of blocking incoming attack
block_effectEffect of blocking
block_soundSound which is produced when blocking an attack
body_parts_coveredWhat body parts are covered by the clothing when you wear it
breakouttimeHow long it takes to resist out of the item (cuffs and such)
cold_protectionflags which determine which body parts are protected from cold. [See here][HEAD]
current_skinHas the item been reskinned?
custom_premium_pricePrice of an item in a vending machine, overriding the premium vending machine price. Define in terms of paycheck defines as opposed to raw numbers.
custom_pricePrice of an item in a vending machine, overriding the base vending machine price. Define in terms of paycheck defines as opposed to raw numbers.
dog_fashionReference to the datum that determines whether dogs can wear the item: Needs to be in /obj/item because corgis can wear a lot of non-clothing items
drop_soundSound uses when dropping the item, or when its thrown.
dye_colorUsed as the dye color source in the washing machine only (at the moment). Can be a hex color or a key corresponding to a registry entry, see washing_machine.dm
dying_keyWhat dye registry should be looked at when dying this item; see washing_machine.dm
embeddingDoes it embed and if yes, what kind of embed
equip_delay_otherIn deciseconds, how long an item takes to put on another person
equip_delay_selfIn deciseconds, how long an item takes to equip; counts only for normal clothing slots, not pockets etc.
equip_soundSound used when equipping the item into a valid slot
fantasy_modificationsA lazylist used for applying fantasy values, contains the actual modification applied to a variable.
flags_coverfor flags such as [GLASSESCOVERSEYES]
flags_invThis flag is used to determine when items in someone's inventory cover others. IE helmets making it so you can't see glasses, etc.
force_stringstring form of an item's force. Edit this var only to set a custom force string
greyscale_config_beltThe config type to use for greyscaled belt overlays. Both this and greyscale_colors must be assigned to work.
greyscale_config_inhand_leftThe config type to use for greyscaled left inhand sprites. Both this and greyscale_colors must be assigned to work.
greyscale_config_inhand_rightThe config type to use for greyscaled right inhand sprites. Both this and greyscale_colors must be assigned to work.
greyscale_config_wornThe config type to use for greyscaled worn sprites. Both this and greyscale_colors must be assigned to work.
grind_resultsGrinder var:A reagent list containing the reagents this item produces when ground up in a grinder - this can be an empty list to allow for reagent transferring only
heat_protectionflags which determine which body parts are protected from heat. [See here][HEAD]
hitsoundSound played when you hit something with the item
inhand_icon_stateicon state for inhand overlays.
inhand_x_dimensionSame as for worn_x_dimension but for inhands, uses the lefthand_ and righthand_ file vars
inhand_y_dimensionSame as for worn_y_dimension but for inhands, uses the lefthand_ and righthand_ file vars
interaction_flags_itemflags for what should be done when you click on the item, default is picking it up
item_flagsItem flags for the item
juice_typepathA reagent the nutriments are converted into when the item is juiced.
lefthand_fileIcon file for left hand inhand overlays
masterThis var exists as a weird proxy "owner" ref It's used in a few places. Stop using it, and optimially replace all uses please
max_heat_protection_temperatureSet this variable to determine up to which temperature (IN KELVIN) the item protects against heat damage. Keep at null to disable protection. Only protects areas set by heat_protection flags
min_cold_protection_temperatureSet this variable to determine down to which temperature (IN KELVIN) the item protects against cold damage. 0 is NOT an acceptable number due to if(varname) tests!! Keep at null to disable protection. Only protects areas set by cold_protection flags
mob_throw_hit_soundUsed when yate into a mob
mouse_drag_pointerthe icon to indicate this object is being dragged
offensive_notesUsed in obj/item/examine to give additional notes on what the weapon does, separate from the predetermined output variables
override_notesUsed in obj/item/examine to determines whether or not to detail an item's statistics even if it does not meet the force requirements
pickup_soundSound uses when picking the item up (into your hands)
reachIn tiles, how far this weapon can reach; 1 for adjacent, which is default
resist_cooldownDo we apply a click cooldown when resisting this object if it is restraining them?
righthand_fileIcon file for right inhand overlays
secondary_attack_speedThe click cooldown on secondary attacks. Lower numbers mean faster attacks. Will use attack_speed if undefined.
sharpnessAll items with sharpness of SHARP_EDGED or higher will automatically get the butchering component.
siemens_coefficientfor electrical admittance/conductance (electrocution checks and shit)
slot_equipment_priorityThe list of slots by priority. equip_to_appropriate_slot() uses this list. Doesn't matter if a mob type doesn't have a slot. For default list, see /mob/proc/equip_to_appropriate_slot
slot_flagsThis is used to determine on which slots an item can fit.
slowdownHow much clothing is slowing you down. Negative values speeds you up
species_exceptionlist() of species types, if a species cannot put items in a certain slot, but species type is in list, it will be able to wear that item
stealthy_audioWhether or not we use stealthy audio levels for this item's attack sounds
strip_delayIn deciseconds, how long an item takes to remove from another person
supports_variations_flagsThis is a bitfield that defines what variations exist for bodyparts like Digi legs. See: code_DEFINES\inventory.dm
throw_verbUsed if we want to have a custom verb text for throwing. "John Spaceman flicks the ciggerate" for example.
thrownbyA weakref to the mob who threw the item
tk_throw_rangeItems can by default thrown up to 10 tiles by TK users
tool_behaviourHow a tool acts when you use it on something, such as wirecutters cutting wires while multitools measure power
toolspeedHow fast does the tool work
transparent_protectionyou can see someone's mask through their transparent visor, but you can't reach it
trigger_guardDetermines who can shoot this
undyeableWhether the item is unaffected by standard dying.
unique_reskinList of options to reskin.
usesoundPlayed when the item is used, for example tools
w_classHow large is the object, used for stuff like whether it can fit in backpacks or not
weak_against_armourWhether or not our object is easily hindered by the presence of armor
worn_iconIcon file for mob worn overlays.
worn_icon_stateIcon state for mob worn overlays, if null the normal icon_state will be used.
worn_x_dimensionDimensions of the icon file used when this item is worn, eg: hats.dmi (32x32 sprite, 64x64 sprite, etc.). Allows inhands/worn sprites to be of any size, but still centered on a mob properly
worn_y_dimensionDimensions of the icon file used when this item is worn, eg: hats.dmi (32x32 sprite, 64x64 sprite, etc.). Allows inhands/worn sprites to be of any size, but still centered on a mob properly
worn_y_offsetWorn overlay will be shifted by this along y axis

Procs

IsReflectThis proc determines if and at what an object will reflect energy projectiles if it's in l_hand,r_hand or wear_suit
add_item_actionAdds an item action to our list of item actions. Item actions are actions linked to our item, that are granted to mobs who equip us. This also ensures that the actions are properly tracked in the actions list and removed if they're deleted. Can be be passed a typepath of an action or an instance of an action.
add_item_contextCreates a "Type-A" contextual screentip interaction. When a user hovers over something with this item in hand, this proc will be called in order to provide context for contextual screentips. You must call register_item_context() in order for this to be registered. A screentip context list is a list that has context keys (SCREENTIP_CONTEXT_*, from __DEFINES/screentips.dm) that map to the action as text. If you mutate the list in this signal, you must return CONTEXTUAL_SCREENTIP_SET. source can, in all cases, be replaced with src, and only exists because this proc directly connects to a signal.
add_stealing_item_objectiveCalled if this item is supposed to be a steal objective item objective.
add_weapon_descriptionAdds the weapon_description element, which shows the 'warning label' for especially dangerous objects. Override this for item types with special notes.
afterattackLast proc in the /obj/item/proc/melee_attack_chain. Returns a bitfield containing AFTERATTACK_PROCESSED_ITEM if the user is likely intending to use this item on another item. Some consumers currently return TRUE to mean "processed". These are not consistent and should be taken with a grain of salt.
afterattack_secondaryCalled at the end of the attack chain if the user right-clicked.
attackCalled from [/mob/living/proc/attackby]
attack_atomThe equivalent of the standard version of /obj/item/proc/attack but for non mob targets.
attack_secondaryThe equivalent of /obj/item/proc/attack but for alternate attacks, AKA right clicking
attack_selfCalled when the item is in the active hand, and clicked; alternately, there is an 'activate held object' verb or you can hit pagedown.
attack_self_secondaryCalled when the item is in the active hand, and right-clicked. Intended for alternate or opposite functions, such as lowering reagent transfer amount. At the moment, there is no verb or hotkey.
attackby_storage_insertWhether or not this item can be put into a storage item through attackby
check_allowed_itemsChecks if an item is allowed to be used on an atom/target Returns TRUE if allowed.
check_reskin_menuChecks if we are allowed to interact with a radial menu for reskins
compare_zone_to_item_slotWhen called on an item, and given a body targeting zone, this will return TRUE if the item slot matches the target zone, and FALSE otherwise. Currently supports the jumpsuit, outersuit, backpack, belt, gloves, hat, ears, neck, mask, eyes, and feet slots. All other slots will auto return FALSE.
cyborg_unequipParent proc - triggers when an item/module is unequipped from a cyborg.
disableEmbeddingFor when you want to disable an item's embedding capabilities (like transforming weapons and such), this proc will detach any active embed elements from it.
droppedCalled when a mob drops an item.
equippedCalled by on_equipped. Don't call this directly, we want the ITEM_POST_EQUIPPED signal to be sent after everything else.
failedEmbedIn case we want to do something special (like self delete) upon failing to embed in something.
get_belt_overlayReturns the icon used for overlaying the object on a belt
get_part_ratingReturns a numeric value for sorting items used as parts in machines, so they can be replaced by the rped
get_sechud_job_icon_stateReturns the SecHUD job icon state for whatever this object's ID card is, if it has one.
get_sharpnessReturns the sharpness of src. If you want to get the sharpness of an item use this.
get_surgery_tool_overlayExtend this to give the item an appearance when placed in a surgical tray. Uses an icon state in medicart.dmi.
get_temperatureReturns the temperature of src. If you want to know if an item is hot use this proc.
get_worn_offsetsReturns offsets used for equipped item overlays in list(px_offset,py_offset) form.
get_writing_implement_detailsReturns null if this object cannot be used to interact with physical writing mediums such as paper. Returns a list of key attributes for this object interacting with paper otherwise.
give_item_actionGives one of our item actions to a mob, when equipped to a certain slot
grant_action_to_bearerGrant the action to anyone who has this item equipped to an appropriate slot
grindGrind item, adding grind_results to item's reagents and transfering to target_holder if specified
handle_openspace_clickCalled on [/datum/element/openspace_item_click_handler/proc/on_afterattack]. Check the relative file for information.
help_light_cigFinds a cigarette on another mob to help light.
ignition_effectIf an object can successfully be used as a fire starter it will return a message
interactResearch prospects, including boostable nodes and point values. Deliver to a console to know whether the boosts have already been used. Separator between the items on the list Nodes that can be boosted
interact_with_atomCalled when this item is being used to interact with an atom, IE, a mob is clicking on an atom with this item.
interact_with_atom_secondaryCalled when this item is being used to interact with an atom WITH RIGHT CLICK, IE, a mob is right clicking on an atom with this item.
isEmbedHarmlessDoes the current embedding var meet the criteria for being harmless? Namely, does it have a pain multiplier and jostle pain mult of 0? If so, return true.
item_action_slot_checkSometimes we only want to grant the item's action if it's equipped in a specific slot.
item_start_equipThis proc calls at the begining of anytime an item is being equiped to a target by another mob. It handles initial messages, AFK stripping, and initial logging.
juiceJuice item, converting nutriments into juice_typepath and transfering to target_holder if specified
melee_attack_chainThis is the proc that handles the order of an item_attack.
mob_can_equipthe mob M is attempting to equip this item into the slot passed through as 'slot'. Return 1 if it can do this and 0 if it can't. if this is being done by a mob other than M, it will include the mob equipper, who is trying to equip the item to mob M. equipper will be null otherwise. If you are making custom procs but would like to retain partial or complete functionality of this one, include a 'return ..()' to where you want this to happen. Arguments:
modify_fantasy_variableModifies the fantasy variable
on_action_deletedCalled when an action associated with our item is deleted
on_click_alt_reskinCalled when alt clicked and the item has unique reskin options
on_equippedCalled after an item is placed in an equipment slot. Runs equipped(), then sends a signal. This should be called last or near-to-last, after all other inventory code stuff is handled.
on_foundcalled when "found" in pockets and storage items. Returns 1 if the search should end.
on_grindCalled BEFORE the object is ground up - use this to change grind results based on conditions. Return "-1" to prevent the grinding from occurring
on_juiceCalled BEFORE the object is ground up - use this to change grind results based on conditions. Return "-1" to prevent the grinding from occurring
on_offer_takenAn interrupt for someone trying to accept an offered item, called mainly from /mob/living/carbon/proc/take, in case you want to run your own take behavior instead.
on_offeredAn interrupt for offering an item to other people, called mainly from /mob/living/carbon/proc/give, in case you want to run your own offer behavior instead.
on_outfit_equipSpecial stuff you want to do when an outfit equips this item.
on_thrownCalled by the carbon throw_item() proc. Returns null if the item negates the throw, or a reference to the thing to suffer the throw else.
open_flameCreates an ignition hotspot if item is lit and located on turf, in mask, or in hand
pick_painting_tool_colorCommon proc used by painting tools like spraycans and palettes that can access the entire 24 bits color space.
pickupcalled just as an item is picked up (loc is not yet changed)
play_tool_soundPlays item's usesound, if any.
pre_attackCalled on the item before it hits something
pre_attack_secondaryCalled on the item before it hits something, when right clicking.
register_item_contextCreate a "Type-A" contextual screentip interaction, registering to add_item_context(). This will run add_item_context() when the item hovers over another object for context. add_item_context() will not be called unless this is run. This is not necessary for Type-A interactions, as you can just apply the flag and register to the signal yourself.
remove_item_actionRemoves an instance of an action from our list of item actions.
remove_item_from_storageTakes the location to move the item to, and optionally the mob doing the removing If no mob is provided, we'll pass in the location, assuming it is a mob Please use this if you're going to snowflake an item out of a obj/item/storage
reset_fantasy_variableReturns the original fantasy variable value
reskin_objReskins object based on a user's choice
suicide_act*Makes cool stuff happen when you suicide with an item
talk_intoHandles someone talking INTO an item
tool_check_callbackUsed in a callback that is passed by use_tool into do_after call. Do not override, do not call manually.
tool_start_checkCalled before obj/item/proc/use_tool if there is a delay, or by obj/item/proc/use_tool if there isn't. Only ever used by welding tools and stacks, so it's not added on any other obj/item/proc/use_tool checks.
tool_use_checkA check called by /obj/item/proc/tool_start_check once, and by use_tool on every tick of delay.
tryEmbedtryEmbed() is for when you want to try embedding something without dealing with the damage + hit messages of calling hitby() on the item while targeting the target.
ui_action_clickThis proc is executed when someone clicks the on-screen UI button. The default action is attack_self(). Checks before we get to here are: mob is alive, mob is not restrained, stunned, asleep, resting, laying, item is on the mob.
updateEmbeddingFor when you want to add/update the embedding on an item. Uses the vars in /obj/item/var/embedding, and defaults to config values for values that aren't set. Will automatically detach previous embed elements on this item.
update_greyscaleChecks if this atom uses the GAGS system and if so updates the worn and inhand icons
update_item_action_buttonsUpdates all action buttons associated with this item
update_weight_classUsed to update the weight class of the item in a way that other atoms can react to the change.
useGeneric use proc. Depending on the item, it uses up fuel, charges, sheets, etc. Returns TRUE on success, FALSE on failure.
use_toolCalled when a mob tries to use the item as a tool. Handles most checks.
visual_equippedTo be overwritten to only perform visual tasks; this is directly called instead of equipped on visual-only features like human dummies equipping outfits.

Var Details

actions

list of /datum/action's that this item has.

actions_types

list of paths of action datums to give to the item on New().

age_restricted

Whether spessmen with an ID with an age below AGE_MINOR (20 by default) can buy this item

alternate_worn_layer

Forced mob worn layer instead of the standard preferred size.

armour_penetration

percentage of armour effectiveness to remove

attack_speed

The click cooldown given after attacking. Lower numbers means faster attacks

attack_verb_continuous

Used in atom/proc/attackby to say how something was attacked "[x] has been [z.attack_verb] by [y] with [z]"

belt_icon_state

Icon state for the belt overlay, if null the normal icon_state will be used.

block_chance

Chance of blocking incoming attack

block_effect

Effect of blocking

block_sound

Sound which is produced when blocking an attack

body_parts_covered

What body parts are covered by the clothing when you wear it

breakouttime

How long it takes to resist out of the item (cuffs and such)

cold_protection

flags which determine which body parts are protected from cold. [See here][HEAD]

current_skin

Has the item been reskinned?

custom_premium_price

Price of an item in a vending machine, overriding the premium vending machine price. Define in terms of paycheck defines as opposed to raw numbers.

custom_price

Price of an item in a vending machine, overriding the base vending machine price. Define in terms of paycheck defines as opposed to raw numbers.

dog_fashion

Reference to the datum that determines whether dogs can wear the item: Needs to be in /obj/item because corgis can wear a lot of non-clothing items

drop_sound

Sound uses when dropping the item, or when its thrown.

dye_color

Used as the dye color source in the washing machine only (at the moment). Can be a hex color or a key corresponding to a registry entry, see washing_machine.dm

dying_key

What dye registry should be looked at when dying this item; see washing_machine.dm

embedding

Does it embed and if yes, what kind of embed

equip_delay_other

In deciseconds, how long an item takes to put on another person

equip_delay_self

In deciseconds, how long an item takes to equip; counts only for normal clothing slots, not pockets etc.

equip_sound

Sound used when equipping the item into a valid slot

fantasy_modifications

A lazylist used for applying fantasy values, contains the actual modification applied to a variable.

flags_cover

for flags such as [GLASSESCOVERSEYES]

flags_inv

This flag is used to determine when items in someone's inventory cover others. IE helmets making it so you can't see glasses, etc.

force_string

string form of an item's force. Edit this var only to set a custom force string

greyscale_config_belt

The config type to use for greyscaled belt overlays. Both this and greyscale_colors must be assigned to work.

greyscale_config_inhand_left

The config type to use for greyscaled left inhand sprites. Both this and greyscale_colors must be assigned to work.

greyscale_config_inhand_right

The config type to use for greyscaled right inhand sprites. Both this and greyscale_colors must be assigned to work.

greyscale_config_worn

The config type to use for greyscaled worn sprites. Both this and greyscale_colors must be assigned to work.

grind_results

Grinder var:A reagent list containing the reagents this item produces when ground up in a grinder - this can be an empty list to allow for reagent transferring only

heat_protection

flags which determine which body parts are protected from heat. [See here][HEAD]

hitsound

Sound played when you hit something with the item

inhand_icon_state

icon state for inhand overlays.

inhand_x_dimension

Same as for worn_x_dimension but for inhands, uses the lefthand_ and righthand_ file vars

inhand_y_dimension

Same as for worn_y_dimension but for inhands, uses the lefthand_ and righthand_ file vars

interaction_flags_item

flags for what should be done when you click on the item, default is picking it up

item_flags

Item flags for the item

juice_typepath

A reagent the nutriments are converted into when the item is juiced.

lefthand_file

Icon file for left hand inhand overlays

master

This var exists as a weird proxy "owner" ref It's used in a few places. Stop using it, and optimially replace all uses please

max_heat_protection_temperature

Set this variable to determine up to which temperature (IN KELVIN) the item protects against heat damage. Keep at null to disable protection. Only protects areas set by heat_protection flags

min_cold_protection_temperature

Set this variable to determine down to which temperature (IN KELVIN) the item protects against cold damage. 0 is NOT an acceptable number due to if(varname) tests!! Keep at null to disable protection. Only protects areas set by cold_protection flags

mob_throw_hit_sound

Used when yate into a mob

mouse_drag_pointer

the icon to indicate this object is being dragged

offensive_notes

Used in obj/item/examine to give additional notes on what the weapon does, separate from the predetermined output variables

override_notes

Used in obj/item/examine to determines whether or not to detail an item's statistics even if it does not meet the force requirements

pickup_sound

Sound uses when picking the item up (into your hands)

reach

In tiles, how far this weapon can reach; 1 for adjacent, which is default

resist_cooldown

Do we apply a click cooldown when resisting this object if it is restraining them?

righthand_file

Icon file for right inhand overlays

secondary_attack_speed

The click cooldown on secondary attacks. Lower numbers mean faster attacks. Will use attack_speed if undefined.

sharpness

All items with sharpness of SHARP_EDGED or higher will automatically get the butchering component.

siemens_coefficient

for electrical admittance/conductance (electrocution checks and shit)

slot_equipment_priority

The list of slots by priority. equip_to_appropriate_slot() uses this list. Doesn't matter if a mob type doesn't have a slot. For default list, see /mob/proc/equip_to_appropriate_slot

slot_flags

This is used to determine on which slots an item can fit.

slowdown

How much clothing is slowing you down. Negative values speeds you up

species_exception

list() of species types, if a species cannot put items in a certain slot, but species type is in list, it will be able to wear that item

stealthy_audio

Whether or not we use stealthy audio levels for this item's attack sounds

strip_delay

In deciseconds, how long an item takes to remove from another person

supports_variations_flags

This is a bitfield that defines what variations exist for bodyparts like Digi legs. See: code_DEFINES\inventory.dm

throw_verb

Used if we want to have a custom verb text for throwing. "John Spaceman flicks the ciggerate" for example.

thrownby

A weakref to the mob who threw the item

tk_throw_range

Items can by default thrown up to 10 tiles by TK users

tool_behaviour

How a tool acts when you use it on something, such as wirecutters cutting wires while multitools measure power

toolspeed

How fast does the tool work

transparent_protection

you can see someone's mask through their transparent visor, but you can't reach it

trigger_guard

Determines who can shoot this

undyeable

Whether the item is unaffected by standard dying.

unique_reskin

List of options to reskin.

usesound

Played when the item is used, for example tools

w_class

How large is the object, used for stuff like whether it can fit in backpacks or not

weak_against_armour

Whether or not our object is easily hindered by the presence of armor

worn_icon

Icon file for mob worn overlays.

worn_icon_state

Icon state for mob worn overlays, if null the normal icon_state will be used.

worn_x_dimension

Dimensions of the icon file used when this item is worn, eg: hats.dmi (32x32 sprite, 64x64 sprite, etc.). Allows inhands/worn sprites to be of any size, but still centered on a mob properly

worn_y_dimension

Dimensions of the icon file used when this item is worn, eg: hats.dmi (32x32 sprite, 64x64 sprite, etc.). Allows inhands/worn sprites to be of any size, but still centered on a mob properly

worn_y_offset

Worn overlay will be shifted by this along y axis

Proc Details

IsReflect

This proc determines if and at what an object will reflect energy projectiles if it's in l_hand,r_hand or wear_suit

add_item_action

Adds an item action to our list of item actions. Item actions are actions linked to our item, that are granted to mobs who equip us. This also ensures that the actions are properly tracked in the actions list and removed if they're deleted. Can be be passed a typepath of an action or an instance of an action.

add_item_context

Creates a "Type-A" contextual screentip interaction. When a user hovers over something with this item in hand, this proc will be called in order to provide context for contextual screentips. You must call register_item_context() in order for this to be registered. A screentip context list is a list that has context keys (SCREENTIP_CONTEXT_*, from __DEFINES/screentips.dm) that map to the action as text. If you mutate the list in this signal, you must return CONTEXTUAL_SCREENTIP_SET. source can, in all cases, be replaced with src, and only exists because this proc directly connects to a signal.

add_stealing_item_objective

Called if this item is supposed to be a steal objective item objective.

add_weapon_description

Adds the weapon_description element, which shows the 'warning label' for especially dangerous objects. Override this for item types with special notes.

afterattack

Last proc in the /obj/item/proc/melee_attack_chain. Returns a bitfield containing AFTERATTACK_PROCESSED_ITEM if the user is likely intending to use this item on another item. Some consumers currently return TRUE to mean "processed". These are not consistent and should be taken with a grain of salt.

Arguments:

afterattack_secondary

Called at the end of the attack chain if the user right-clicked.

Arguments:

attack

Called from [/mob/living/proc/attackby]

Arguments:

attack_atom

The equivalent of the standard version of /obj/item/proc/attack but for non mob targets.

attack_secondary

The equivalent of /obj/item/proc/attack but for alternate attacks, AKA right clicking

attack_self

Called when the item is in the active hand, and clicked; alternately, there is an 'activate held object' verb or you can hit pagedown.

attack_self_secondary

Called when the item is in the active hand, and right-clicked. Intended for alternate or opposite functions, such as lowering reagent transfer amount. At the moment, there is no verb or hotkey.

attackby_storage_insert

Whether or not this item can be put into a storage item through attackby

check_allowed_items

Checks if an item is allowed to be used on an atom/target Returns TRUE if allowed.

Args: target_self - Whether we will check if we (src) are in target, preventing people from using items on themselves. not_inside - Whether target (or target's loc) has to be a turf.

check_reskin_menu

Checks if we are allowed to interact with a radial menu for reskins

Arguments:

compare_zone_to_item_slot

When called on an item, and given a body targeting zone, this will return TRUE if the item slot matches the target zone, and FALSE otherwise. Currently supports the jumpsuit, outersuit, backpack, belt, gloves, hat, ears, neck, mask, eyes, and feet slots. All other slots will auto return FALSE.

cyborg_unequip

Parent proc - triggers when an item/module is unequipped from a cyborg.

disableEmbedding

For when you want to disable an item's embedding capabilities (like transforming weapons and such), this proc will detach any active embed elements from it.

dropped

Called when a mob drops an item.

equipped

Called by on_equipped. Don't call this directly, we want the ITEM_POST_EQUIPPED signal to be sent after everything else.

Note that hands count as slots.

Arguments:

failedEmbed

In case we want to do something special (like self delete) upon failing to embed in something.

get_belt_overlay

Returns the icon used for overlaying the object on a belt

get_part_rating

Returns a numeric value for sorting items used as parts in machines, so they can be replaced by the rped

get_sechud_job_icon_state

Returns the SecHUD job icon state for whatever this object's ID card is, if it has one.

get_sharpness

Returns the sharpness of src. If you want to get the sharpness of an item use this.

get_surgery_tool_overlay

Extend this to give the item an appearance when placed in a surgical tray. Uses an icon state in medicart.dmi.

get_temperature

Returns the temperature of src. If you want to know if an item is hot use this proc.

get_worn_offsets

Returns offsets used for equipped item overlays in list(px_offset,py_offset) form.

get_writing_implement_details

Returns null if this object cannot be used to interact with physical writing mediums such as paper. Returns a list of key attributes for this object interacting with paper otherwise.

give_item_action

Gives one of our item actions to a mob, when equipped to a certain slot

grant_action_to_bearer

Grant the action to anyone who has this item equipped to an appropriate slot

grind

Grind item, adding grind_results to item's reagents and transfering to target_holder if specified

handle_openspace_click

Called on [/datum/element/openspace_item_click_handler/proc/on_afterattack]. Check the relative file for information.

help_light_cig

Finds a cigarette on another mob to help light.

ignition_effect

If an object can successfully be used as a fire starter it will return a message

interact

Research prospects, including boostable nodes and point values. Deliver to a console to know whether the boosts have already been used. Separator between the items on the list Nodes that can be boosted

interact_with_atom

Called when this item is being used to interact with an atom, IE, a mob is clicking on an atom with this item.

Return an ITEM_INTERACT_ flag in the event the interaction was handled, to cancel further interaction code. Return NONE to allow default interaction / tool handling.

interact_with_atom_secondary

Called when this item is being used to interact with an atom WITH RIGHT CLICK, IE, a mob is right clicking on an atom with this item.

Default behavior has it run the same code as left click.

Return an ITEM_INTERACT_ flag in the event the interaction was handled, to cancel further interaction code. Return NONE to allow default interaction / tool handling.

isEmbedHarmless

Does the current embedding var meet the criteria for being harmless? Namely, does it have a pain multiplier and jostle pain mult of 0? If so, return true.

item_action_slot_check

Sometimes we only want to grant the item's action if it's equipped in a specific slot.

item_start_equip

This proc calls at the begining of anytime an item is being equiped to a target by another mob. It handles initial messages, AFK stripping, and initial logging.

juice

Juice item, converting nutriments into juice_typepath and transfering to target_holder if specified

melee_attack_chain

This is the proc that handles the order of an item_attack.

The order of procs called is:

mob_can_equip

the mob M is attempting to equip this item into the slot passed through as 'slot'. Return 1 if it can do this and 0 if it can't. if this is being done by a mob other than M, it will include the mob equipper, who is trying to equip the item to mob M. equipper will be null otherwise. If you are making custom procs but would like to retain partial or complete functionality of this one, include a 'return ..()' to where you want this to happen. Arguments:

modify_fantasy_variable

Modifies the fantasy variable

on_action_deleted

Called when an action associated with our item is deleted

on_click_alt_reskin

Called when alt clicked and the item has unique reskin options

on_equipped

Called after an item is placed in an equipment slot. Runs equipped(), then sends a signal. This should be called last or near-to-last, after all other inventory code stuff is handled.

Arguments:

on_found

called when "found" in pockets and storage items. Returns 1 if the search should end.

on_grind

Called BEFORE the object is ground up - use this to change grind results based on conditions. Return "-1" to prevent the grinding from occurring

on_juice

Called BEFORE the object is ground up - use this to change grind results based on conditions. Return "-1" to prevent the grinding from occurring

on_offer_taken

An interrupt for someone trying to accept an offered item, called mainly from /mob/living/carbon/proc/take, in case you want to run your own take behavior instead.

Return TRUE if you want to interrupt the taking.

Arguments: offerer - the person offering the item taker - the person trying to accept the offer

on_offered

An interrupt for offering an item to other people, called mainly from /mob/living/carbon/proc/give, in case you want to run your own offer behavior instead.

Return TRUE if you want to interrupt the offer.

Arguments: offerer - The person offering the item. offered - The person being offered the item.

on_outfit_equip

Special stuff you want to do when an outfit equips this item.

on_thrown

Called by the carbon throw_item() proc. Returns null if the item negates the throw, or a reference to the thing to suffer the throw else.

open_flame

Creates an ignition hotspot if item is lit and located on turf, in mask, or in hand

pick_painting_tool_color

Common proc used by painting tools like spraycans and palettes that can access the entire 24 bits color space.

pickup

called just as an item is picked up (loc is not yet changed)

play_tool_sound

Plays item's usesound, if any.

pre_attack

Called on the item before it hits something

Arguments:

See: /obj/item/proc/melee_attack_chain

pre_attack_secondary

Called on the item before it hits something, when right clicking.

Arguments:

See: /obj/item/proc/melee_attack_chain

register_item_context

Create a "Type-A" contextual screentip interaction, registering to add_item_context(). This will run add_item_context() when the item hovers over another object for context. add_item_context() will not be called unless this is run. This is not necessary for Type-A interactions, as you can just apply the flag and register to the signal yourself.

remove_item_action

Removes an instance of an action from our list of item actions.

remove_item_from_storage

Takes the location to move the item to, and optionally the mob doing the removing If no mob is provided, we'll pass in the location, assuming it is a mob Please use this if you're going to snowflake an item out of a obj/item/storage

reset_fantasy_variable

Returns the original fantasy variable value

reskin_obj

Reskins object based on a user's choice

Arguments:

suicide_act

*Makes cool stuff happen when you suicide with an item

*Outputs a creative message and then return the damagetype done

talk_into

Handles someone talking INTO an item

Commonly used by someone holding it and using .r or .l Also used by radios

Return a flag that modifies the original message

tool_check_callback

Used in a callback that is passed by use_tool into do_after call. Do not override, do not call manually.

tool_start_check

Called before obj/item/proc/use_tool if there is a delay, or by obj/item/proc/use_tool if there isn't. Only ever used by welding tools and stacks, so it's not added on any other obj/item/proc/use_tool checks.

tool_use_check

A check called by /obj/item/proc/tool_start_check once, and by use_tool on every tick of delay.

tryEmbed

tryEmbed() is for when you want to try embedding something without dealing with the damage + hit messages of calling hitby() on the item while targeting the target.

Really, this is used mostly with projectiles with shrapnel payloads, from /datum/element/embed/proc/checkEmbedProjectile, and called on said shrapnel. Mostly acts as an intermediate between different embed elements.

Returns TRUE if it embedded successfully, nothing otherwise

Arguments:

ui_action_click

This proc is executed when someone clicks the on-screen UI button. The default action is attack_self(). Checks before we get to here are: mob is alive, mob is not restrained, stunned, asleep, resting, laying, item is on the mob.

updateEmbedding

For when you want to add/update the embedding on an item. Uses the vars in /obj/item/var/embedding, and defaults to config values for values that aren't set. Will automatically detach previous embed elements on this item.

update_greyscale

Checks if this atom uses the GAGS system and if so updates the worn and inhand icons

update_item_action_buttons

Updates all action buttons associated with this item

Arguments:

update_weight_class

Used to update the weight class of the item in a way that other atoms can react to the change.

Arguments:

Returns:

use

Generic use proc. Depending on the item, it uses up fuel, charges, sheets, etc. Returns TRUE on success, FALSE on failure.

use_tool

Called when a mob tries to use the item as a tool. Handles most checks.

visual_equipped

To be overwritten to only perform visual tasks; this is directly called instead of equipped on visual-only features like human dummies equipping outfits.

This separation exists to prevent things like the monkey sentience helmet from polling ghosts while it's just being equipped as a visual preview for a dummy.