Goonstation 13 - Modules - TypesVar Details - Proc Details

item

Base vars & procs

Vars

amountThis is for things which are stackable! It means that there are [amount] things here, which could be discretely split or stacked! if you use this to represent something other than a literal stack of items I will break your kneecaps
attack_verbsVerb used when you attack someone with this, as in [attacker] [attack_verbs] [victim]. Can be a list or single entry
brew_resultWhat reagent will it make if it's brewable?
burn_outputHow hot does the item burn once on fire
burn_pointAmbient temperature at which the item may spontaneously ignite
burn_possibleIs this item burnable
burn_remainsWhat is left when it's burnt up
burningAre we currently burning
burning_last_processKeep track of last burning state
equip_sfxSound for when you equip this from an inventory (ie not a turf)
firesourceIs this a valid source for lighting fires
hat_offset_xUsed for the hattable component
hat_offset_yUsed for the hattable component
healthHow long an item takes to burn (or be consumed by other means), based on the weight class if no value is set
inhand_colorset to a colour to make the inhand image be that colour. if the item is coloured though that takes priority over this variable
item_stateThe in-hand icon state
leaves_slash_woundwhen attacking, this item can leave a slash wound
masterThis var fucking sucks. It's used for prox sensors and other stuff that when triggered trigger an item they're attached to. Why is this on /item i am so sad
mimic_chanceChance for this item to be replaced by a mimic disguised as it - note, setting this high here is a really bad idea
pickup_sfxSound for when you pick this up from anywhere. If null, we auto-pick from a list based on w_class
storedstorage datum holding it
wear_stateicon state used for worn sprites, icon_state used otherwise

Procs

AfterAttackCall this proc inplace of afterattack(...)
AttackSelfCall this proc inplace of attack_self(...)
UpdateStackAppearanceDon't override this, override _update_stack_appearance() instead.
_update_stack_appearanceCall UpdateStackAppearance() instead.
afterattackDO NOT CALL THIS PROC - Call AfterAttack(...) Instead!
attack_selfDO NOT CALL THIS PROC - Call AttackSelf(...) Instead!
enchantEnchants an item (minor armor boost for clothing, otherwise increases melee damage)
force_dropForce the item to drop from the mob's hands. If sever is TRUE, items will be severed from item arms
get_heroPick one human trying to cover the object
material_on_dropCalled when an item is dropped for mat effects
material_on_pickupCalled when an item is picked up for mat effects
place_to_turf_by_gridMove item to turf, and snap its pixel offsets to a grid of the input size.
setTwoHandedThis is the safe way of changing 2-handed-ness at runtime. Use this please.
should_place_onOverride to implement custom logic for determining whether the item should be placed onto a target object
try_specific_equipattempt unique functionality when item is held in hand and and using the equip hotkey

Var Details

amount

This is for things which are stackable! It means that there are [amount] things here, which could be discretely split or stacked! if you use this to represent something other than a literal stack of items I will break your kneecaps

attack_verbs

Verb used when you attack someone with this, as in [attacker] [attack_verbs] [victim]. Can be a list or single entry

brew_result

What reagent will it make if it's brewable?

burn_output

How hot does the item burn once on fire

burn_point

Ambient temperature at which the item may spontaneously ignite

burn_possible

Is this item burnable

burn_remains

What is left when it's burnt up

burning

Are we currently burning

burning_last_process

Keep track of last burning state

equip_sfx

Sound for when you equip this from an inventory (ie not a turf)

firesource

Is this a valid source for lighting fires

hat_offset_x

Used for the hattable component

hat_offset_y

Used for the hattable component

health

How long an item takes to burn (or be consumed by other means), based on the weight class if no value is set

inhand_color

set to a colour to make the inhand image be that colour. if the item is coloured though that takes priority over this variable

item_state

The in-hand icon state

leaves_slash_wound

when attacking, this item can leave a slash wound

master

This var fucking sucks. It's used for prox sensors and other stuff that when triggered trigger an item they're attached to. Why is this on /item i am so sad

mimic_chance

Chance for this item to be replaced by a mimic disguised as it - note, setting this high here is a really bad idea

pickup_sfx

Sound for when you pick this up from anywhere. If null, we auto-pick from a list based on w_class

stored

storage datum holding it

wear_state

icon state used for worn sprites, icon_state used otherwise

Proc Details

AfterAttack

Call this proc inplace of afterattack(...)

AttackSelf

Call this proc inplace of attack_self(...)

UpdateStackAppearance

Don't override this, override _update_stack_appearance() instead.

_update_stack_appearance

Call UpdateStackAppearance() instead.

afterattack

DO NOT CALL THIS PROC - Call AfterAttack(...) Instead!

Only override this proc!

attack_self

DO NOT CALL THIS PROC - Call AttackSelf(...) Instead!

Only override this proc!

enchant

Enchants an item (minor armor boost for clothing, otherwise increases melee damage)

incr - value to enchant by setTo - when true, sets enchantment to incr, otherwise will add incr to existing enchantment (positive or negative)

force_drop

Force the item to drop from the mob's hands. If sever is TRUE, items will be severed from item arms

get_hero

Pick one human trying to cover the object

material_on_drop

Called when an item is dropped for mat effects

material_on_pickup

Called when an item is picked up for mat effects

place_to_turf_by_grid

Move item to turf, and snap its pixel offsets to a grid of the input size.

setTwoHanded

This is the safe way of changing 2-handed-ness at runtime. Use this please.

should_place_on

Override to implement custom logic for determining whether the item should be placed onto a target object

try_specific_equip

attempt unique functionality when item is held in hand and and using the equip hotkey