material ![code/datums/materials/_material.dm 8](git.png)
Vars | |
added_slowdown | The slowdown that is added to items. |
---|---|
alpha | Base alpha of the material |
armor_modifiers | Armor modifiers, multiplies an items normal armor vars by these amounts. |
beauty_modifier | How beautiful is this material per unit. |
cached_texture_filter_icon | a cached icon for the texture filter |
categories | Materials "Traits". its a map of key = category | Value = Bool. Used to define what it can be used for |
color | Base color of the material, for items that don't have greyscale configs nor are made of multiple materials. Item isn't changed in color if this is null. This can be a RGB or color matrix, but it cannot be RGBA as alpha is automatically filled in. |
debris_type | What type of debris the tile will leave behind when shattered. |
desc | A short description of the material. Not used anywhere, yet... |
fish_weight_modifier | Fish made of or infused with this material have their weight multiplied by this value. |
fishing_bait_speed_mult | The multiplier of the bait/bobber speed of the fishing challenge for fishing rods made of this material |
fishing_bounciness_mult | The multiplier of the bounciness of the bait/bobber upon hitting the edges of the minigame area |
fishing_cast_range | Additive bonus/malus to the cast range of the fishing rod |
fishing_completion_speed | The multiplier to the completion gain of the fishing rod made of this material |
fishing_deceleration_mult | The multiplier of the deceleration/friction for fishing rods made of this material |
fishing_difficulty_modifier | Additive bonus/malus to the fishing difficulty modifier of any rod made of this item. Negative is good, positive bad |
fishing_experience_multiplier | The multiplier of how much experience is gained when using a fishing rod made of this material |
fishing_gravity_mult | The multiplier of negative velocity that pulls the bait/bobber of a fishing rod down when not holding the click |
greyscale_color | If the color is a color matrix and either the item uses greyscale configs or is made of multiple colored materials. This will be used instead because neither greyscale configs nor BlendRGB() support color matrices. Also this has to be RRGGBB, six characters, no alpha channel as it's automatically filled in. |
id | What the material is indexed by in the SSmaterials.materials list. Defaults to the type of the material. |
init_flags | Bitflags that influence how SSmaterials handles this material. |
integrity_modifier | This is a modifier for integrity, and resembles the strength of the material |
item_sound_override | Can be used to override the sound items make, lets add some SLOSHing. |
mat_rust_resistance | How resistant the material is to rusting when applied to a turf |
mineral_rarity | How likely this mineral is to be found in a boulder during mining. |
minimum_value_override | This is the minimum value of the material, used in the stock market for any mat that isn't set to null |
name | What the material is referred to as IC. |
ore_type | What type of ore is this material associated with? Used for mining, and not every material has one. |
points_per_unit | How many points per units of ore does this grant? |
ru_names | List consists of ("name", "именительный", "родительный", "дательный", "винительный", "творительный", "предложный", "gender") |
shard_type | What type of shard the material will shatter to |
sheet_type | The type of sheet this material creates. This should be replaced as soon as possible by greyscale sheets |
starlight_color | Starlight color of the material This is the color of light it'll emit if its turf is transparent and over space. Defaults to COLOR_STARLIGHT if not set |
strength_modifier | This is a modifier for force, and resembles the strength of the material |
texture_layer_icon_state | what texture icon state to overlay |
tradable | Is this material traded on the stock market? |
tradable_base_quantity | If this material is tradable, what is the base quantity of the material on the stock market? |
turf_sound_override | Can be used to override the stepsound a turf makes. MORE SLOOOSH |
value_per_unit | This is the amount of value per 1 unit of the material |
Procs | |
Initialize | |
get_armor_modifiers | Returns the list of armor modifiers, with each element having its assoc value multiplied by the multiplier arg |
on_accidental_mat_consumption | This proc is called when the mat is found in an item that's consumed by accident. see /obj/item/proc/on_accidental_consumption. Arguments |
on_applied | This proc is called when the material is added to an object. |
on_main_applied | This proc is called when the material becomes the one the object is composed of the most |
on_main_removed | This proc is called when the material is no longer the one the object is composed by the most |
on_removed | This proc is called when the material is removed from an object. |
return_composition |
Var Details
added_slowdown ![code/datums/materials/_material.dm 79](git.png)
The slowdown that is added to items.
alpha ![code/datums/materials/_material.dm 30](git.png)
Base alpha of the material
armor_modifiers ![code/datums/materials/_material.dm 57](git.png)
Armor modifiers, multiplies an items normal armor vars by these amounts.
beauty_modifier ![code/datums/materials/_material.dm 59](git.png)
How beautiful is this material per unit.
cached_texture_filter_icon ![code/datums/materials/_material.dm 67](git.png)
a cached icon for the texture filter
categories ![code/datums/materials/_material.dm 37](git.png)
Materials "Traits". its a map of key = category | Value = Bool. Used to define what it can be used for
color ![code/datums/materials/_material.dm 20](git.png)
Base color of the material, for items that don't have greyscale configs nor are made of multiple materials. Item isn't changed in color if this is null. This can be a RGB or color matrix, but it cannot be RGBA as alpha is automatically filled in.
debris_type ![code/datums/materials/_material.dm 73](git.png)
What type of debris the tile will leave behind when shattered.
desc ![code/datums/materials/_material.dm 12](git.png)
A short description of the material. Not used anywhere, yet...
fish_weight_modifier ![code/datums/materials/_material.dm 82](git.png)
Fish made of or infused with this material have their weight multiplied by this value.
fishing_bait_speed_mult ![code/datums/materials/_material.dm 93](git.png)
The multiplier of the bait/bobber speed of the fishing challenge for fishing rods made of this material
fishing_bounciness_mult ![code/datums/materials/_material.dm 97](git.png)
The multiplier of the bounciness of the bait/bobber upon hitting the edges of the minigame area
fishing_cast_range ![code/datums/materials/_material.dm 87](git.png)
Additive bonus/malus to the cast range of the fishing rod
fishing_completion_speed ![code/datums/materials/_material.dm 91](git.png)
The multiplier to the completion gain of the fishing rod made of this material
fishing_deceleration_mult ![code/datums/materials/_material.dm 95](git.png)
The multiplier of the deceleration/friction for fishing rods made of this material
fishing_difficulty_modifier ![code/datums/materials/_material.dm 85](git.png)
Additive bonus/malus to the fishing difficulty modifier of any rod made of this item. Negative is good, positive bad
fishing_experience_multiplier ![code/datums/materials/_material.dm 89](git.png)
The multiplier of how much experience is gained when using a fishing rod made of this material
fishing_gravity_mult ![code/datums/materials/_material.dm 99](git.png)
The multiplier of negative velocity that pulls the bait/bobber of a fishing rod down when not holding the click
greyscale_color ![code/datums/materials/_material.dm 28](git.png)
If the color is a color matrix and either the item uses greyscale configs or is made of multiple colored materials. This will be used instead because neither greyscale configs nor BlendRGB() support color matrices. Also this has to be RRGGBB, six characters, no alpha channel as it's automatically filled in.
Basically, set this if the color is a color matrix (list)
id ![code/datums/materials/_material.dm 14](git.png)
What the material is indexed by in the SSmaterials.materials list. Defaults to the type of the material.
init_flags ![code/datums/materials/_material.dm 35](git.png)
Bitflags that influence how SSmaterials handles this material.
integrity_modifier ![code/datums/materials/_material.dm 45](git.png)
This is a modifier for integrity, and resembles the strength of the material
item_sound_override ![code/datums/materials/_material.dm 61](git.png)
Can be used to override the sound items make, lets add some SLOSHing.
mat_rust_resistance ![code/datums/materials/_material.dm 71](git.png)
How resistant the material is to rusting when applied to a turf
mineral_rarity ![code/datums/materials/_material.dm 75](git.png)
How likely this mineral is to be found in a boulder during mining.
minimum_value_override ![code/datums/materials/_material.dm 50](git.png)
This is the minimum value of the material, used in the stock market for any mat that isn't set to null
name ![code/datums/materials/_material.dm 10](git.png)
What the material is referred to as IC.
ore_type ![code/datums/materials/_material.dm 41](git.png)
What type of ore is this material associated with? Used for mining, and not every material has one.
points_per_unit ![code/datums/materials/_material.dm 77](git.png)
How many points per units of ore does this grant?
ru_names ![modular_bandastation/translations/code/ru_names/ru_name_materials.dm 5](git.png)
List consists of ("name", "именительный", "родительный", "дательный", "винительный", "творительный", "предложный", "gender")
shard_type ![code/datums/materials/_material.dm 69](git.png)
What type of shard the material will shatter to
sheet_type ![code/datums/materials/_material.dm 39](git.png)
The type of sheet this material creates. This should be replaced as soon as possible by greyscale sheets
starlight_color ![code/datums/materials/_material.dm 33](git.png)
Starlight color of the material This is the color of light it'll emit if its turf is transparent and over space. Defaults to COLOR_STARLIGHT if not set
strength_modifier ![code/datums/materials/_material.dm 43](git.png)
This is a modifier for force, and resembles the strength of the material
texture_layer_icon_state ![code/datums/materials/_material.dm 65](git.png)
what texture icon state to overlay
tradable ![code/datums/materials/_material.dm 52](git.png)
Is this material traded on the stock market?
tradable_base_quantity ![code/datums/materials/_material.dm 54](git.png)
If this material is tradable, what is the base quantity of the material on the stock market?
turf_sound_override ![code/datums/materials/_material.dm 63](git.png)
Can be used to override the stepsound a turf makes. MORE SLOOOSH
value_per_unit ![code/datums/materials/_material.dm 48](git.png)
This is the amount of value per 1 unit of the material
Proc Details
Initialize
-
Handles initializing the material.
-
Arguments:
-
- _id: The ID the material should use. Overrides the existing ID.
get_armor_modifiers
Returns the list of armor modifiers, with each element having its assoc value multiplied by the multiplier arg
on_accidental_mat_consumption
This proc is called when the mat is found in an item that's consumed by accident. see /obj/item/proc/on_accidental_consumption. Arguments
- M - person consuming the mat
- S - (optional) item the mat is contained in (NOT the item with the mat itself)
on_applied
This proc is called when the material is added to an object.
on_main_applied
This proc is called when the material becomes the one the object is composed of the most
on_main_removed
This proc is called when the material is no longer the one the object is composed by the most
on_removed
This proc is called when the material is removed from an object.
return_composition
-
Returns the composition of this material.
-
Mostly used for alloys when breaking down materials.
-
Arguments:
-
- amount: The amount of the material to break down.