item
Vars | |
action_icon | List of icons-sheets for a given action to override the icon. |
---|---|
action_icon_state | List of icon states for a given action to override the icon_state. |
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(). |
allowed | For what suits can store. IE. secuirty vest holding stunbatons, disablers, cuffs. |
armour_penetration_flat | Flat armour reduction, occurs after percentage armour penetration. |
armour_penetration_percentage | Percentage armour reduction, happens before flat armour reduction. |
attack_effect_override | Allows you to override the attack animation with an attack effect |
attack_verb | Used in attackby() to say how something was attacked "[x] has been [z.attack_verb] by [y] with [z]" |
body_parts_covered | What bodyflags does this item cover? See setup.dm for appropriate bit flags |
cold_protection | Flags which determine which body parts are protected from cold. Use the HEAD, UPPER_TORSO, LOWER_TORSO, etc. flags. See setup.dm |
discrete | used in item_attack.dm to make an item not show an attack message to viewers |
dog_fashion | What can/cant be worn, and where is valid to be worn by ian/E-N(and corgies), most of the time changing the name and emotes of the pet. |
drop_sound | Sound uses when dropping the item, or when its thrown. |
dyeable | If this item is put into a washing machine to be dyed, can objects of this type be dyed into a different color/icon? |
dyeing_key | The associated key to the dye registry GLOB list, used to transform/color this piece of clothing through dyeing |
embed_chance | So items can have custom embedd values because customisation is king |
embedded_fall_chance | The chances of the item falling out of the limb |
embedded_fall_pain_multiplier | The coefficient of multiplication for the damage this item does when falling out of a limb (this * w_class) |
embedded_ignore_throwspeed_threshold | How fast something has to be going to embed |
embedded_impact_pain_multiplier | The coefficient of multiplication for the damage this item does when first embedded (this * w_class) |
embedded_pain_chance | The cances of the item dealing damage to the limb |
embedded_pain_multiplier | The coefficient of multiplication for the damage this item does while embedded (this * w_class) |
embedded_unsafe_removal_pain_multiplier | The coefficient of multiplication for the damage removing this without surgery causes (this * w_class) |
embedded_unsafe_removal_time | A time in ticks, multiplied by the w_class. |
equip_sound | Sound used when equipping the item into a valid slot |
flags_cover | For flags that define what areas an item cover |
flags_inv | Since any item can now be a piece of clothing, this has to be put here so all items share it. 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. |
gas_transfer_coefficient | For leaking gas from turf to mask and vice-versa. |
heat_protection | Flags which determine which body parts are protected from heat. Use the HEAD, UPPER_TORSO, LOWER_TORSO, etc. flags. See setup.dm |
hidden_uplink | All items can have an uplink hidden inside, just remember to add the triggers. |
hit_reaction_chance | Used to give a reaction chance on hit that is not a block. If less than 0, will remove the block message, allowing overides. |
hitsound | Sound played when you hit something with the item |
icon_override | Used to override hardcoded clothing dmis in human clothing proc. |
in_inventory | Is this item equipped into an inventory slot or hand of a mob? |
in_storage | Is this item inside a storage object? |
inhand_x_dimension | Dimension X of the lefthand_file and righthand_file var eg: 32x32 sprite, 64x64 sprite, etc. |
inhand_y_dimension | Dimension Y of the lefthand_file and righthand_file var eg: 32x32 sprite, 64x64 sprite, etc. |
item_state | The icon state used to display the item in your inventory. If null then the icon_state value itself will be used |
materials | What materials the item yields when broken down. Some methods will not recover everything (autolathes only recover metal and glass, for example). |
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 |
needs_permit | Used by security bots to determine if this item is safe for public use. |
outline_filter | Holder var for the item outline filter, null when no outline filter on the item. |
pass_flags | Determines what it can pass over/through. IE. 'PASSTABLE' will allow it to pass over tables |
permeability_coefficient | for chemicals/diseases |
pickup_sound | Sound uses when picking the item up (into your hands) |
put_on_delay | How long it takes to put an item onto somebody. IE. clothing |
reach | In tiles, how far this weapon can reach; 1 for adjacent, which is default |
siemens_coefficient | for electrical admittance/conductance (electrocution checks and shit) |
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. |
sprite_sheets_inhand | Used to override inhand items. Use a single .dmi and suffix the icon states inside with _l and _r for each hand. |
sprite_sheets_obj | Used to override hardcoded clothing inventory object dmis in human clothing proc. |
stealthy_audio | Whether or not we use stealthy audio levels for this item's attack sounds |
strip_delay | How long it takes to remove an item off of somebody. IE. clothing |
thrownby | UID of a /mob |
tool_behaviour | What kind of tool are we? |
tool_enabled | If we can turn on or off, are we currently active? Mostly for welders and this will normally be TRUE |
tool_volume | How loud are we when we use our tool? |
toolspeed | If this item is a tool, the speed multiplier. Smaller numbers are faster. |
usesound | Played when the item is used, for example tools |
w_class | Determines how big/small items are to fit in storage containers |
Procs | |
can_enter_storage | Called to check if this item can be put into a storage item. |
cigarette_lighter_act | Handles the bulk of cigarette lighting interactions. You must call light() to actually light the cigarette. |
customised_abstract_text | This proc is used to add text for items with ABSTRACT flag after default examine text. |
cyborg_recharge | Called on cyborg items that need special charging behavior. Override as needed for specific items. |
dropped | Called when a mob drops an item. |
dye_item | Updates an item's appearance to mimic the appearance of another item in the dye_registry's dictionary what types of items (beanie, jumpsuit, shoes, etc) src is dyed into depends on the dye_key unless an overidden dye_key is specified. For example if our dye_key is DYE_REGISTRY_UNDER and we specify to dye to DYE_RED, our item's appearance would then mimic /obj/item/clothing/under/color/red; see [dye_registry.dm] for this dictionary |
get_job_name | Used in secHUD icon generation |
get_part_rating | Returns a numeric value for sorting items used as parts in machines, so they can be replaced by the B/RPED |
is_equipped | returns TRUE if the item is equipped by a mob, 0 otherwise. |
is_robot_module | Checks whether this item is a module of the robot it is located in. |
override_throw | Return true if you don't want regular throw handling |
refill | Generic refill proc. Transfers something (e.g. fuel, charge) from an atom to our tool. returns TRUE if it was successful, FALSE otherwise |
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. |
Var Details
action_icon
List of icons-sheets for a given action to override the icon.
action_icon_state
List of icon states for a given action to override the icon_state.
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().
allowed
For what suits can store. IE. secuirty vest holding stunbatons, disablers, cuffs.
armour_penetration_flat
Flat armour reduction, occurs after percentage armour penetration.
armour_penetration_percentage
Percentage armour reduction, happens before flat armour reduction.
attack_effect_override
Allows you to override the attack animation with an attack effect
attack_verb
Used in attackby() to say how something was attacked "[x] has been [z.attack_verb] by [y] with [z]"
body_parts_covered
What bodyflags does this item cover? See setup.dm for appropriate bit flags
cold_protection
Flags which determine which body parts are protected from cold. Use the HEAD, UPPER_TORSO, LOWER_TORSO, etc. flags. See setup.dm
discrete
used in item_attack.dm to make an item not show an attack message to viewers
dog_fashion
What can/cant be worn, and where is valid to be worn by ian/E-N(and corgies), most of the time changing the name and emotes of the pet.
drop_sound
Sound uses when dropping the item, or when its thrown.
dyeable
If this item is put into a washing machine to be dyed, can objects of this type be dyed into a different color/icon?
dyeing_key
The associated key to the dye registry GLOB list, used to transform/color this piece of clothing through dyeing
embed_chance
So items can have custom embedd values because customisation is king
embedded_fall_chance
The chances of the item falling out of the limb
embedded_fall_pain_multiplier
The coefficient of multiplication for the damage this item does when falling out of a limb (this * w_class)
embedded_ignore_throwspeed_threshold
How fast something has to be going to embed
embedded_impact_pain_multiplier
The coefficient of multiplication for the damage this item does when first embedded (this * w_class)
embedded_pain_chance
The cances of the item dealing damage to the limb
embedded_pain_multiplier
The coefficient of multiplication for the damage this item does while embedded (this * w_class)
embedded_unsafe_removal_pain_multiplier
The coefficient of multiplication for the damage removing this without surgery causes (this * w_class)
embedded_unsafe_removal_time
A time in ticks, multiplied by the w_class.
equip_sound
Sound used when equipping the item into a valid slot
flags_cover
For flags that define what areas an item cover
flags_inv
Since any item can now be a piece of clothing, this has to be put here so all items share it. 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.
gas_transfer_coefficient
For leaking gas from turf to mask and vice-versa.
heat_protection
Flags which determine which body parts are protected from heat. Use the HEAD, UPPER_TORSO, LOWER_TORSO, etc. flags. See setup.dm
hidden_uplink
All items can have an uplink hidden inside, just remember to add the triggers.
hit_reaction_chance
Used to give a reaction chance on hit that is not a block. If less than 0, will remove the block message, allowing overides.
hitsound
Sound played when you hit something with the item
icon_override
Used to override hardcoded clothing dmis in human clothing proc.
in_inventory
Is this item equipped into an inventory slot or hand of a mob?
in_storage
Is this item inside a storage object?
inhand_x_dimension
Dimension X of the lefthand_file and righthand_file var eg: 32x32 sprite, 64x64 sprite, etc.
inhand_y_dimension
Dimension Y of the lefthand_file and righthand_file var eg: 32x32 sprite, 64x64 sprite, etc.
item_state
The icon state used to display the item in your inventory. If null then the icon_state value itself will be used
materials
What materials the item yields when broken down. Some methods will not recover everything (autolathes only recover metal and glass, for example).
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
needs_permit
Used by security bots to determine if this item is safe for public use.
outline_filter
Holder var for the item outline filter, null when no outline filter on the item.
pass_flags
Determines what it can pass over/through. IE. 'PASSTABLE' will allow it to pass over tables
permeability_coefficient
for chemicals/diseases
pickup_sound
Sound uses when picking the item up (into your hands)
put_on_delay
How long it takes to put an item onto somebody. IE. clothing
reach
In tiles, how far this weapon can reach; 1 for adjacent, which is default
siemens_coefficient
for electrical admittance/conductance (electrocution checks and shit)
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.
sprite_sheets_inhand
Used to override inhand items. Use a single .dmi and suffix the icon states inside with _l and _r for each hand.
sprite_sheets_obj
Used to override hardcoded clothing inventory object dmis in human clothing proc.
stealthy_audio
Whether or not we use stealthy audio levels for this item's attack sounds
strip_delay
How long it takes to remove an item off of somebody. IE. clothing
thrownby
UID of a /mob
tool_behaviour
What kind of tool are we?
tool_enabled
If we can turn on or off, are we currently active? Mostly for welders and this will normally be TRUE
tool_volume
How loud are we when we use our tool?
toolspeed
If this item is a tool, the speed multiplier. Smaller numbers are faster.
usesound
Played when the item is used, for example tools
w_class
Determines how big/small items are to fit in storage containers
Proc Details
can_enter_storage
Called to check if this item can be put into a storage item.
Return FALSE
if src
can't be inserted, and TRUE
if it can.
Arguments:
- S - The /obj/item/storage that
src
is being inserted into. - user - The mob trying to insert the item.
cigarette_lighter_act
Handles the bulk of cigarette lighting interactions. You must call light()
to actually light the cigarette.
Returns: the target's cigarette (or the cigarette itself if attacked directly) if all checks are passed.
If the cigarette is already lit, or is a fancy smokable being lit by anything other than a zippo or match, will return FALSE
.
Otherwise it will return null
.
Arguments:
- user - The mob trying to light the cigarette.
- target - The mob with the cigarette.
- direct_attackby_item - Used if the cigarette item is clicked on directly with a lighter instead of a mob wearing a cigarette.
customised_abstract_text
This proc is used to add text for items with ABSTRACT flag after default examine text.
cyborg_recharge
Called on cyborg items that need special charging behavior. Override as needed for specific items.
dropped
Called when a mob drops an item.
dye_item
Updates an item's appearance to mimic the appearance of another item in the dye_registry's dictionary what types of items (beanie, jumpsuit, shoes, etc) src is dyed into depends on the dye_key unless an overidden dye_key is specified. For example if our dye_key is DYE_REGISTRY_UNDER and we specify to dye to DYE_RED, our item's appearance would then mimic /obj/item/clothing/under/color/red; see [dye_registry.dm] for this dictionary
once everything is updated, the target type path that we dyed the item into is returned
Arguments:
- dye_color: the DYE_COLOR specifies which dye color we look up to copy apearances from in the dye_registry; cannot be null
- dye_key_override: this overrides the items
dyeing_key
which allows you to force the proc to use a specific lookup key for the dye_registry; this can be null
get_job_name
Used in secHUD icon generation
get_part_rating
Returns a numeric value for sorting items used as parts in machines, so they can be replaced by the B/RPED
is_equipped
returns TRUE if the item is equipped by a mob, 0 otherwise.
is_robot_module
Checks whether this item is a module of the robot it is located in.
override_throw
Return true if you don't want regular throw handling
refill
Generic refill proc. Transfers something (e.g. fuel, charge) from an atom to our tool. returns TRUE if it was successful, FALSE otherwise
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.