item

Vars | |
actions | list of /datum/action's that this item has. |
---|---|
actions_types | list of paths of action datums to give to the item on Initialize(). |
armor_protection_flags | see setup.dm for appropriate bit flags |
attack_speed | Byond tick delay between left click attacks |
attack_speed_alternate | Byond tick delay between right click alternate attacks |
attack_verb | Used in attackby() to say how something was attacked "[x] [z.attack_verb] [y] with their [z]!" Should be in simple present tense! |
blood_sprite_state | The iconstate that the items use for blood on blood.dmi when drawn on the mob. |
cold_protection_flags | flags which determine which body parts are protected from cold. Use the HEAD, CHEST, GROIN, etc. flags. See setup.dm |
colorable_allowed | Some defines to determine if the item is allowed to be recolored. |
colorable_colors | optional assoc list of colors we can color this item |
current_variant | Current variant selected. |
edge | whether this item is more likely to dismember |
equip_delay_other | How long an item takes to put on another person |
equip_delay_self | How long it takes to equip this item yoursef |
equip_slot_flags | This is used to determine on which slots an item can fit. |
gas_transfer_coefficient | for leaking gas from turf to mask and vice-versa (for masks right now, but at some point, i'd like to include space helmets) |
heat | whether this item is a source of heat, and how hot it is (in Kelvin). |
heat_protection_flags | flags which determine which body parts are protected from heat. Use the HEAD, CHEST, GROIN, etc. flags. See setup.dm |
hitsound | sound this item makes when you hit something with it |
icon_override | overrides the icon file which the item will be used to render on mob, if its in hands it will add _l or _r to the state depending if its on left or right hand. |
icon_state_mini | The icon state used to represent this image in "icons/obj/items/items_mini.dmi" Used in /obj/item/storage/box/visual to display tiny items in the box |
icon_state_variants | List of icon_state suffixes for item variants. |
inhand_x_dimension | Same as for worn_x_dimension but for inhands. |
inhand_x_offset | Worn nhand overlay will be shifted by this along x axis |
inhand_y_dimension | Same as for worn_y_dimension but for inhands. |
inhand_y_offset | Worn inhand overlay will be shifted by this along y axis |
inv_hide_flags | 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. |
inventory_flags | This flag is used for various clothing/equipment item stuff |
item_flags | flags for item stuff that isn't clothing/equipping specific. |
item_state_worn | tells if the item shall use worn_icon_state for non-inhands, needed due to some items using worn_icon_state only for inhands and not worn. |
last_equipped_slot | Last slot that item was equipped to (aka sticky slot) |
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 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 flags |
permeability_coefficient | for chemicals/diseases |
pry_capable | whether this item can be used to pry things open. |
sharp | whether this item cuts |
siemens_coefficient | for electrical admittance/conductance (electrocution checks and shit) |
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 |
sprite_sheets | Species-specific sprites, concept stolen from Paradise//vg/. Ex: sprite_sheets = list("Combat Robot" = 'icons/mob/species/robot/backpack.dmi') If index term exists and icon_override is not set, this sprite sheet will be used. |
strip_delay | How long an item takes to remove from another person |
unequip_delay_self | How long it takes to unequip this item yourself |
w_class | The weight class being how big, mainly used for storage purposes |
worn_icon_list | |
worn_icon_state | Icon state for mob worn overlays, if null the normal icon_state will be used. |
worn_item_state_slots | |
worn_layer | specific layer for on-mob icon. |
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_x_offset | Worn overlay will be shifted by this along x axis |
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 |
zoom | TRUE if item is actively being used to zoom. For scoped guns and binoculars. |
zoom_allow_movement | if you can move with the zoom on, only works if zoom_view_size is 7 otherwise CRASH() is called due to maptick performance reasons. |
zoom_tile_offset | how much tiles the zoom offsets to the direction it zooms to. |
zoom_viewsize | how much tiles the zoom zooms out, 7 is the default view. |
zoomdevicename | name used for message when binoculars/scope is used |
Procs | |
ai_should_use | Checks if the AI can or should use this |
ai_use | AI uses this item in some manner, such as consuming or activating it |
alternate_color_item | Is called when the item is alternate attacked by paint. Handles coloring any secondary colors that are registered to COMSIG_ITEM_SECONDARY_COLOR |
apply_accessories | applies any accessory the item may have, called by make_worn_icon(). |
apply_blood | applies blood on the item, called by make_worn_icon(). |
apply_custom | applies any custom thing to the sprite, caled by make_worn_icon(). |
attack_alternate | attack_alternate |
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_alternate | Called when the item is in the active hand, and RIGHT clicked; |
basic_spin_trick | The basic spin trick |
canStrip | Checks whether the item can be unequipped from owner by stripper. Generates a message on failure and returns TRUE/FALSE |
change_zoom_offset | applies the offset of the zooming, using animate for smoothing. |
check_allowed_items | Checks if an item is allowed to be used on an atom/target Returns TRUE if allowed. |
color_item | Colors the item or selects variants. |
do_drop_animation | Play small animation and jiggle when dropping an object |
do_pickup_animation | Play small animation and jiggle when picking up an object |
do_quick_equip | Called to return an item to equip using the quick equip hotkey. Base proc returns the item itself, overridden for storage behavior. |
do_trick | Checks to see if you successfully perform a trick, and what kind |
do_unique_action | Signal sender for unique_action |
equipped | called after an item is placed in an equipment slot user is mob that equipped it slot uses the slot_X defines found in setup.dm for items that can be placed in multiple slots note this isn't called during the initial dressing of a player |
get_worn_icon_file | gets what icon dmi file shall be used for the on-mob sprite |
get_worn_icon_state | Returns the state that should be used for the on-mob icon |
getstripdelay | Returns the strip delay of the item. |
is_beneficial_implant | Returns whether this is considered beneficial if embedded in a mob |
make_worn_icon | Generates worn icon for sprites on-mob. |
melee_attack_chain_alternate | RIGHT CLICK CODE FROM HERE |
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 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. Set disable_warning to 1 if you wish it to not give you outputs. warning_text is used in the case that you want to provide a specific warning for why the item cannot be equipped. The bitslot param determines if the flag we've passed is a bitflag or not |
on_enter_storage | called when this item is added into a storage item, which is passed on as S. The loc variable is already set to the storage item. |
on_exit_storage | called when this item is removed from a storage item, which is passed on as S. The loc variable is already set to the new destination before this is called. |
on_found | called when "found" in pockets and storage items. Returns 1 if the search should end. |
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. |
on_vend | Called by vendors when vending an item. Allows the item to specify what happens when it is given to the player. |
onunzoom | called when zoom is deactivated. |
onzoom | called when zoom is activated. |
pickup | Called just as an item is picked up (loc is not yet changed) |
refill | Proc that gets called by a vendor when you refill something Returns FALSE if it's not elligible for refills |
removed_from_inventory | Called whenever an item is unequipped to a new loc (IE, not when the item ends up in the hands) |
set_last_equipped_slot_of_storage | Helper function for updating last_equipped_slot when item is drawn from storage |
slot_to_in_storage_slot | Get appropriate SLOT_IN_X for given slot |
special_stripped_behavior | Used by any item which wants to react to or prevent its own stripping, called after checks/delays. Return TRUE to block normal stripping behavior. |
throw_catch_trick | The fancy trick. Woah. |
throw_impact | When hit by a thrown object, play the associated hitsound of the object |
toggle_deployment_flag | Handles registering if an item is flagged as deployed or not |
toggle_item_bump_attack | Used to enable/disable an item's bump attack. Grouped in a proc to make sure the signal or flags aren't missed |
unequipped | Called when an item is removed from an equipment slot. The loc should still be in the unequipper. |
unique_action | Anything unique the item can do, like pumping a shotgun, spin or whatever. |
use | Generic use proc. Depending on the item, it uses up fuel, charges, sheets, etc. Returns TRUE on success, FALSE on failure. |
vendor_equip | Controls how vendors will try to equip this item. Returns whether item was sucessfully equipped |
zoom_check_return | returns a bitflag when another item tries to zoom same user. |
zoom_item_turnoff | Wrapper for signal turning scope off. |
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 Initialize().
armor_protection_flags

see setup.dm for appropriate bit flags
attack_speed

Byond tick delay between left click attacks
attack_speed_alternate

Byond tick delay between right click alternate attacks
attack_verb

Used in attackby() to say how something was attacked "[x] [z.attack_verb] [y] with their [z]!" Should be in simple present tense!
blood_sprite_state

The iconstate that the items use for blood on blood.dmi when drawn on the mob.
cold_protection_flags

flags which determine which body parts are protected from cold. Use the HEAD, CHEST, GROIN, etc. flags. See setup.dm
colorable_allowed

Some defines to determine if the item is allowed to be recolored.
colorable_colors

optional assoc list of colors we can color this item
current_variant

Current variant selected.
edge

whether this item is more likely to dismember
equip_delay_other

How long an item takes to put on another person
equip_delay_self

How long it takes to equip this item yoursef
equip_slot_flags

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

for leaking gas from turf to mask and vice-versa (for masks right now, but at some point, i'd like to include space helmets)
heat

whether this item is a source of heat, and how hot it is (in Kelvin).
heat_protection_flags

flags which determine which body parts are protected from heat. Use the HEAD, CHEST, GROIN, etc. flags. See setup.dm
hitsound

sound this item makes when you hit something with it
icon_override

overrides the icon file which the item will be used to render on mob, if its in hands it will add _l or _r to the state depending if its on left or right hand.
icon_state_mini

The icon state used to represent this image in "icons/obj/items/items_mini.dmi" Used in /obj/item/storage/box/visual to display tiny items in the box
icon_state_variants

List of icon_state suffixes for item variants.
inhand_x_dimension

Same as for worn_x_dimension but for inhands.
inhand_x_offset

Worn nhand overlay will be shifted by this along x axis
inhand_y_dimension

Same as for worn_y_dimension but for inhands.
inhand_y_offset

Worn inhand overlay will be shifted by this along y axis
inv_hide_flags

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.
inventory_flags

This flag is used for various clothing/equipment item stuff
item_flags

flags for item stuff that isn't clothing/equipping specific.
item_state_worn

tells if the item shall use worn_icon_state for non-inhands, needed due to some items using worn_icon_state only for inhands and not worn.
last_equipped_slot

Last slot that item was equipped to (aka sticky slot)
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 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 flags
permeability_coefficient

for chemicals/diseases
pry_capable

whether this item can be used to pry things open.
sharp

whether this item cuts
siemens_coefficient

for electrical admittance/conductance (electrocution checks and shit)
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
sprite_sheets

Species-specific sprites, concept stolen from Paradise//vg/. Ex: sprite_sheets = list("Combat Robot" = 'icons/mob/species/robot/backpack.dmi') If index term exists and icon_override is not set, this sprite sheet will be used.
strip_delay

How long an item takes to remove from another person
unequip_delay_self

How long it takes to unequip this item yourself
w_class

The weight class being how big, mainly used for storage purposes
worn_icon_list

LazyList< Used to specify the icon file to be used when the item is worn in a certain slot. icon_override or sprite_sheets are set they will take precendence over this, assuming they apply to the slot in question.
worn_icon_state

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

Lazylist< that overrides the default worn_icon_state for particular slots.
worn_layer

specific layer for on-mob icon.
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_x_offset

Worn overlay will be shifted by this along x axis
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
zoom

TRUE if item is actively being used to zoom. For scoped guns and binoculars.
zoom_allow_movement

if you can move with the zoom on, only works if zoom_view_size is 7 otherwise CRASH() is called due to maptick performance reasons.
zoom_tile_offset

how much tiles the zoom offsets to the direction it zooms to.
zoom_viewsize

how much tiles the zoom zooms out, 7 is the default view.
zoomdevicename

name used for message when binoculars/scope is used
Proc Details
ai_should_use
Checks if the AI can or should use this
ai_use
AI uses this item in some manner, such as consuming or activating it
alternate_color_item
Is called when the item is alternate attacked by paint. Handles coloring any secondary colors that are registered to COMSIG_ITEM_SECONDARY_COLOR
apply_accessories
applies any accessory the item may have, called by make_worn_icon().
apply_blood
applies blood on the item, called by make_worn_icon().
apply_custom
applies any custom thing to the sprite, caled by make_worn_icon().
attack_alternate
attack_alternate
called when the a mob right click attacks on another mob with an item Arguments: M: the target being attacked user: the person 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_alternate
Called when the item is in the active hand, and RIGHT clicked;
basic_spin_trick
The basic spin trick
canStrip
Checks whether the item can be unequipped from owner by stripper. Generates a message on failure and returns TRUE/FALSE
change_zoom_offset
applies the offset of the zooming, using animate for smoothing.
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.
color_item
Colors the item or selects variants.
do_drop_animation
Play small animation and jiggle when dropping an object
do_pickup_animation
Play small animation and jiggle when picking up an object
do_quick_equip
Called to return an item to equip using the quick equip hotkey. Base proc returns the item itself, overridden for storage behavior.
do_trick
Checks to see if you successfully perform a trick, and what kind
do_unique_action
Signal sender for unique_action
equipped
called after an item is placed in an equipment slot user is mob that equipped it slot uses the slot_X defines found in setup.dm for items that can be placed in multiple slots note this isn't called during the initial dressing of a player
get_worn_icon_file
gets what icon dmi file shall be used for the on-mob sprite
get_worn_icon_state
Returns the state that should be used for the on-mob icon
getstripdelay
Returns the strip delay of the item.
is_beneficial_implant
Returns whether this is considered beneficial if embedded in a mob
make_worn_icon
Generates worn icon for sprites on-mob.
melee_attack_chain_alternate
RIGHT CLICK CODE FROM HERE
Most of this is basically whats above for left click but broken down, add more as needed A less complex version of melee_attack_chain, called when rightclicking with an item on something Arguments: user: mob attacking with this item target: atom being clicked on params: passed down params from Click()
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 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. Set disable_warning to 1 if you wish it to not give you outputs. warning_text is used in the case that you want to provide a specific warning for why the item cannot be equipped. The bitslot param determines if the flag we've passed is a bitflag or not
on_enter_storage
called when this item is added into a storage item, which is passed on as S. The loc variable is already set to the storage item.
on_exit_storage
called when this item is removed from a storage item, which is passed on as S. The loc variable is already set to the new destination before this is called.
on_found
called when "found" in pockets and storage items. Returns 1 if the search should end.
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.
on_vend
Called by vendors when vending an item. Allows the item to specify what happens when it is given to the player.
onunzoom
called when zoom is deactivated.
onzoom
called when zoom is activated.
pickup
Called just as an item is picked up (loc is not yet changed)
refill
Proc that gets called by a vendor when you refill something Returns FALSE if it's not elligible for refills
removed_from_inventory
Called whenever an item is unequipped to a new loc (IE, not when the item ends up in the hands)
set_last_equipped_slot_of_storage
Helper function for updating last_equipped_slot when item is drawn from storage
slot_to_in_storage_slot
Get appropriate SLOT_IN_X for given slot
special_stripped_behavior
Used by any item which wants to react to or prevent its own stripping, called after checks/delays. Return TRUE to block normal stripping behavior.
throw_catch_trick
The fancy trick. Woah.
throw_impact
When hit by a thrown object, play the associated hitsound of the object
toggle_deployment_flag
Handles registering if an item is flagged as deployed or not
toggle_item_bump_attack
Used to enable/disable an item's bump attack. Grouped in a proc to make sure the signal or flags aren't missed
unequipped
Called when an item is removed from an equipment slot. The loc should still be in the unequipper.
unique_action
Anything unique the item can do, like pumping a shotgun, spin or whatever.
use
Generic use proc. Depending on the item, it uses up fuel, charges, sheets, etc. Returns TRUE on success, FALSE on failure.
vendor_equip
Controls how vendors will try to equip this item. Returns whether item was sucessfully equipped
zoom_check_return
returns a bitflag when another item tries to zoom same user.
zoom_item_turnoff
Wrapper for signal turning scope off.