Goonstation 13 - Modules - TypesVar Details

/datum/component/fragile_item

Defines a "fragile item" component.

An item with this component will be prone to breaking when it's used to attack or thrown and as a result being replaced by another object (i.e. a glass shard).

The component defines default values but they can also be manually set when initializing the component.

Vars

probability_of_breakingWhen safe_hits run out, every further violent interaction has a prob(this_variable) to break.
safe_hitsThe number of violent interactions (attacks with it, being thrown) this item can perform safely before rolling for chances to break.
sound_to_play_on_breakingSound played at the location of the item breaking.
stay_in_handIf set, the item will try to put itself back into the user's hand upon breaking (will only work for item types).
type_to_break_intoWhen the item breaks, it will be replaced by the type defined by this variable.

Var Details

probability_of_breaking

When safe_hits run out, every further violent interaction has a prob(this_variable) to break.

safe_hits

The number of violent interactions (attacks with it, being thrown) this item can perform safely before rolling for chances to break.

sound_to_play_on_breaking

Sound played at the location of the item breaking.

stay_in_hand

If set, the item will try to put itself back into the user's hand upon breaking (will only work for item types).

type_to_break_into

When the item breaks, it will be replaced by the type defined by this variable.