item ![code/game/objects/items.dm 4](git.png)
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. |
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. |
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. |
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 ![code/game/objects/items.dm 72](git.png)
List of icons-sheets for a given action to override the icon.
action_icon_state ![code/game/objects/items.dm 74](git.png)
List of icon states for a given action to override the icon_state.
actions ![code/game/objects/items.dm 68](git.png)
List of /datum/action's that this item has.
actions_types ![code/game/objects/items.dm 70](git.png)
List of paths of action datums to give to the item on New().
allowed ![code/game/objects/items.dm 97](git.png)
For what suits can store. IE. secuirty vest holding stunbatons, disablers, cuffs.
armour_penetration_flat ![code/game/objects/items.dm 93](git.png)
Flat armour reduction, occurs after percentage armour penetration.
armour_penetration_percentage ![code/game/objects/items.dm 95](git.png)
Percentage armour reduction, happens before flat armour reduction.
attack_effect_override ![code/game/objects/items.dm 46](git.png)
Allows you to override the attack animation with an attack effect
attack_verb ![code/game/objects/items.dm 48](git.png)
Used in attackby() to say how something was attacked "[x] has been [z.attack_verb] by [y] with [z]"
body_parts_covered ![code/game/objects/items.dm 83](git.png)
What bodyflags does this item cover? See setup.dm for appropriate bit flags
cold_protection ![code/game/objects/items.dm 62](git.png)
Flags which determine which body parts are protected from cold. Use the HEAD, UPPER_TORSO, LOWER_TORSO, etc. flags. See setup.dm
discrete ![code/game/objects/items.dm 13](git.png)
used in item_attack.dm to make an item not show an attack message to viewers
dog_fashion ![code/game/objects/items.dm 115](git.png)
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 ![code/game/objects/items.dm 42](git.png)
Sound uses when dropping the item, or when its thrown.
embed_chance ![code/game/objects/items.dm 121](git.png)
So items can have custom embedd values because customisation is king
embedded_fall_chance ![code/game/objects/items.dm 123](git.png)
The chances of the item falling out of the limb
embedded_fall_pain_multiplier ![code/game/objects/items.dm 129](git.png)
The coefficient of multiplication for the damage this item does when falling out of a limb (this * w_class)
embedded_ignore_throwspeed_threshold ![code/game/objects/items.dm 137](git.png)
How fast something has to be going to embed
embedded_impact_pain_multiplier ![code/game/objects/items.dm 131](git.png)
The coefficient of multiplication for the damage this item does when first embedded (this * w_class)
embedded_pain_chance ![code/game/objects/items.dm 125](git.png)
The cances of the item dealing damage to the limb
embedded_pain_multiplier ![code/game/objects/items.dm 127](git.png)
The coefficient of multiplication for the damage this item does while embedded (this * w_class)
embedded_unsafe_removal_pain_multiplier ![code/game/objects/items.dm 133](git.png)
The coefficient of multiplication for the damage removing this without surgery causes (this * w_class)
embedded_unsafe_removal_time ![code/game/objects/items.dm 135](git.png)
A time in ticks, multiplied by the w_class.
equip_sound ![code/game/objects/items.dm 38](git.png)
Sound used when equipping the item into a valid slot
flags_cover ![code/game/objects/items.dm 108](git.png)
For flags that define what areas an item cover
flags_inv ![code/game/objects/items.dm 80](git.png)
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 ![code/game/objects/items.dm 85](git.png)
For leaking gas from turf to mask and vice-versa.
heat_protection ![code/game/objects/items.dm 60](git.png)
Flags which determine which body parts are protected from heat. Use the HEAD, UPPER_TORSO, LOWER_TORSO, etc. flags. See setup.dm
hidden_uplink ![code/game/objects/items.dm 99](git.png)
All items can have an uplink hidden inside, just remember to add the triggers.
hit_reaction_chance ![code/game/objects/items.dm 111](git.png)
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 ![code/game/objects/items.dm 32](git.png)
Sound played when you hit something with the item
icon_override ![code/game/objects/items.dm 159](git.png)
Used to override hardcoded clothing dmis in human clothing proc.
in_inventory ![code/game/objects/items.dm 166](git.png)
Is this item equipped into an inventory slot or hand of a mob?
in_storage ![code/game/objects/items.dm 175](git.png)
Is this item inside a storage object?
inhand_x_dimension ![code/game/objects/items.dm 21](git.png)
Dimension X of the lefthand_file and righthand_file var eg: 32x32 sprite, 64x64 sprite, etc.
inhand_y_dimension ![code/game/objects/items.dm 24](git.png)
Dimension Y of the lefthand_file and righthand_file var eg: 32x32 sprite, 64x64 sprite, etc.
item_state ![code/game/objects/items.dm 15](git.png)
The icon state used to display the item in your inventory. If null then the icon_state value itself will be used
materials ![code/game/objects/items.dm 77](git.png)
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 ![code/game/objects/items.dm 64](git.png)
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 ![code/game/objects/items.dm 66](git.png)
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 ![code/game/objects/items.dm 36](git.png)
Used when yate into a mob
needs_permit ![code/game/objects/items.dm 102](git.png)
Used by security bots to determine if this item is safe for public use.
outline_filter ![code/game/objects/items.dm 179](git.png)
Holder var for the item outline filter, null when no outline filter on the item.
pass_flags ![code/game/objects/items.dm 54](git.png)
Determines what it can pass over/through. IE. 'PASSTABLE' will allow it to pass over tables
permeability_coefficient ![code/game/objects/items.dm 87](git.png)
for chemicals/diseases
pickup_sound ![code/game/objects/items.dm 40](git.png)
Sound uses when picking the item up (into your hands)
put_on_delay ![code/game/objects/items.dm 106](git.png)
How long it takes to put an item onto somebody. IE. clothing
reach ![code/game/objects/items.dm 181](git.png)
In tiles, how far this weapon can reach; 1 for adjacent, which is default
siemens_coefficient ![code/game/objects/items.dm 89](git.png)
for electrical admittance/conductance (electrocution checks and shit)
slot_flags ![code/game/objects/items.dm 52](git.png)
This is used to determine on which slots an item can fit.
slowdown ![code/game/objects/items.dm 91](git.png)
How much clothing is slowing you down. Negative values speeds you up.
sprite_sheets_inhand ![code/game/objects/items.dm 157](git.png)
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 ![code/game/objects/items.dm 161](git.png)
Used to override hardcoded clothing inventory object dmis in human clothing proc.
stealthy_audio ![code/game/objects/items.dm 44](git.png)
Whether or not we use stealthy audio levels for this item's attack sounds
strip_delay ![code/game/objects/items.dm 104](git.png)
How long it takes to remove an item off of somebody. IE. clothing
thrownby ![code/game/objects/items.dm 118](git.png)
UID of a /mob
tool_behaviour ![code/game/objects/items.dm 140](git.png)
What kind of tool are we?
tool_enabled ![code/game/objects/items.dm 142](git.png)
If we can turn on or off, are we currently active? Mostly for welders and this will normally be TRUE
tool_volume ![code/game/objects/items.dm 144](git.png)
How loud are we when we use our tool?
toolspeed ![code/game/objects/items.dm 146](git.png)
If this item is a tool, the speed multiplier. Smaller numbers are faster.
usesound ![code/game/objects/items.dm 34](git.png)
Played when the item is used, for example tools
w_class ![code/game/objects/items.dm 50](git.png)
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.
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.
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.