/datum/material ![code/modules/materials/Mat_Materials.dm 16](git.png)
Vars | |
alpha | The "transparency" of the material. Kept as alpha for logical reasons. Displayed as percentage ingame. |
---|---|
applyColor | Should this even color the objects made from it? Mostly used for base station materials like steel |
cached | Whether this material should be stored in the material cache - only used for base types, modifying at runtime has no effect |
canMix | Can this be mixed with other materials? |
color | The color of the material |
desc | Description of the material, used for scanning |
edible | The functional value of edibility. Edible or not? This is what you check from the outside to see if material is edible. See /datum/material/var/edible_exact. |
edible_exact | The actual value of edibility. Changes internally and sets /datum/material/var/edible. |
generation | Compound generation |
mat_id | used to retrieve instances of these base materials from the cache. |
material_flags | Various flags. See [material_properties.dm] |
mixOnly | Can this only be used after being combined with another material? |
mutable | Is this a mutable instance? Defaults to true so creating new materials returns a mutable instance by default |
name | Name of the material, used for combination and scanning |
parent_materials | Holds the parent materials. |
prefixes | words that go before the name, used in combination |
properties | Associated list of all the various /datum/material_property that apply. list/datum/material_property = value |
quality | The 'quality' of the material |
special_naming | Whether the specaialNaming proc is called when this material is applied. |
suffixes | words that go after the name, used in combination |
texture | if not null, texture will be set when mat is applied. |
texture_blend | How to blend the /datum/material/var/texture. |
triggersChem | Called when exposed to chemicals. |
triggersDrop | Called when owning object is dropped. |
triggersExp | Called when exposed to explosions. |
triggersOnAdd | Called when the material is added to an object |
triggersOnAttack | Called when the owning object is used to attack something or someone. |
triggersOnAttacked | Called when a mob wearing the owning object is attacked. |
triggersOnBlobHit | Called when blob hits something with this material assigned. |
triggersOnBullet | Called when a mob wearing the owning object is shot. |
triggersOnEat | Called when someone eats a thing with this material assigned. |
triggersOnEntered | Called when something enters a turf with the material assigned. Also called on all objects on the turf with a material. |
triggersOnHit | Called when an obj hits something with this material assigned. |
triggersOnLife | Called when the life proc of a mob that has the owning item equipped runs. |
triggersOnRemove | Called when the material is removed from an object |
triggersPickup | Called when owning object is picked up. |
triggersTemp | Called when exposed to temperatures. |
value | In percent of a base value. How much this sells for. |
Procs | |
addTrigger | Triggers is specified using one of the TRIGGER_ON_ defines |
countTriggers | Triggers is specified using one of the TRIGGER_ON_ defines |
getImmutable | Returns an immutable version of this material. Will return this material if it is already immutable. |
getMaterialTraitDesc | Time for some super verbose proc names. |
getMutable | Returns a mutable version of this material. Will return a copy of this material if it is already mutable. The reason this is a separate proc and not using in getMaterial() is prevent cargo-culting accidentally reintroducing the issue this was supposed to fix. Force the coders to explicitly ask for a mutable instance, demand to know why they want it to be mutable in reviews! |
hasTrigger | Checks if material proc type is present for a given trigger in the material |
isSameMaterial | Compares a material to this one to determine if stacking should be allowed. |
removeAllTriggers | Triggers is specified using one of the TRIGGER_ON_ defines |
removeTrigger | Triggers is specified using one of the TRIGGER_ON_ defines |
Var Details
alpha ![code/modules/materials/Mat_Materials.dm 63](git.png)
The "transparency" of the material. Kept as alpha for logical reasons. Displayed as percentage ingame.
applyColor ![code/modules/materials/Mat_Materials.dm 59](git.png)
Should this even color the objects made from it? Mostly used for base station materials like steel
cached ![code/modules/materials/Mat_Materials.dm 22](git.png)
Whether this material should be stored in the material cache - only used for base types, modifying at runtime has no effect
canMix ![code/modules/materials/Mat_Materials.dm 49](git.png)
Can this be mixed with other materials?
color ![code/modules/materials/Mat_Materials.dm 61](git.png)
The color of the material
desc ![code/modules/materials/Mat_Materials.dm 26](git.png)
Description of the material, used for scanning
edible ![code/modules/materials/Mat_Materials.dm 70](git.png)
The functional value of edibility. Edible or not? This is what you check from the outside to see if material is edible. See /datum/material/var/edible_exact.
edible_exact ![code/modules/materials/Mat_Materials.dm 68](git.png)
The actual value of edibility. Changes internally and sets /datum/material/var/edible.
generation ![code/modules/materials/Mat_Materials.dm 47](git.png)
Compound generation
mat_id ![code/modules/materials/Mat_Materials.dm 20](git.png)
used to retrieve instances of these base materials from the cache.
material_flags ![code/modules/materials/Mat_Materials.dm 31](git.png)
Various flags. See [material_properties.dm]
mixOnly ![code/modules/materials/Mat_Materials.dm 51](git.png)
Can this only be used after being combined with another material?
mutable ![code/modules/materials/Mat_Materials.dm 18](git.png)
Is this a mutable instance? Defaults to true so creating new materials returns a mutable instance by default
name ![code/modules/materials/Mat_Materials.dm 24](git.png)
Name of the material, used for combination and scanning
parent_materials ![code/modules/materials/Mat_Materials.dm 45](git.png)
Holds the parent materials.
prefixes ![code/modules/materials/Mat_Materials.dm 37](git.png)
words that go before the name, used in combination
properties ![code/modules/materials/Mat_Materials.dm 29](git.png)
Associated list of all the various /datum/material_property that apply. list/datum/material_property = value
quality ![code/modules/materials/Mat_Materials.dm 65](git.png)
The 'quality' of the material
special_naming ![code/modules/materials/Mat_Materials.dm 41](git.png)
Whether the specaialNaming proc is called when this material is applied.
suffixes ![code/modules/materials/Mat_Materials.dm 39](git.png)
words that go after the name, used in combination
texture ![code/modules/materials/Mat_Materials.dm 55](git.png)
if not null, texture will be set when mat is applied.
texture_blend ![code/modules/materials/Mat_Materials.dm 57](git.png)
How to blend the /datum/material/var/texture.
triggersChem ![code/modules/materials/Mat_Materials.dm 77](git.png)
Called when exposed to chemicals.
triggersDrop ![code/modules/materials/Mat_Materials.dm 81](git.png)
Called when owning object is dropped.
triggersExp ![code/modules/materials/Mat_Materials.dm 83](git.png)
Called when exposed to explosions.
triggersOnAdd ![code/modules/materials/Mat_Materials.dm 85](git.png)
Called when the material is added to an object
triggersOnAttack ![code/modules/materials/Mat_Materials.dm 91](git.png)
Called when the owning object is used to attack something or someone.
triggersOnAttacked ![code/modules/materials/Mat_Materials.dm 93](git.png)
Called when a mob wearing the owning object is attacked.
triggersOnBlobHit ![code/modules/materials/Mat_Materials.dm 101](git.png)
Called when blob hits something with this material assigned.
triggersOnBullet ![code/modules/materials/Mat_Materials.dm 95](git.png)
Called when a mob wearing the owning object is shot.
triggersOnEat ![code/modules/materials/Mat_Materials.dm 99](git.png)
Called when someone eats a thing with this material assigned.
triggersOnEntered ![code/modules/materials/Mat_Materials.dm 97](git.png)
Called when something enters a turf with the material assigned. Also called on all objects on the turf with a material.
triggersOnHit ![code/modules/materials/Mat_Materials.dm 103](git.png)
Called when an obj hits something with this material assigned.
triggersOnLife ![code/modules/materials/Mat_Materials.dm 89](git.png)
Called when the life proc of a mob that has the owning item equipped runs.
triggersOnRemove ![code/modules/materials/Mat_Materials.dm 87](git.png)
Called when the material is removed from an object
triggersPickup ![code/modules/materials/Mat_Materials.dm 79](git.png)
Called when owning object is picked up.
triggersTemp ![code/modules/materials/Mat_Materials.dm 75](git.png)
Called when exposed to temperatures.
value ![code/modules/materials/Mat_Materials.dm 33](git.png)
In percent of a base value. How much this sells for.
Proc Details
addTrigger
Triggers is specified using one of the TRIGGER_ON_ defines
countTriggers
Triggers is specified using one of the TRIGGER_ON_ defines
getImmutable
Returns an immutable version of this material. Will return this material if it is already immutable.
getMaterialTraitDesc
Time for some super verbose proc names.
getMutable
Returns a mutable version of this material. Will return a copy of this material if it is already mutable. The reason this is a separate proc and not using in getMaterial() is prevent cargo-culting accidentally reintroducing the issue this was supposed to fix. Force the coders to explicitly ask for a mutable instance, demand to know why they want it to be mutable in reviews!
hasTrigger
Checks if material proc type is present for a given trigger in the material
isSameMaterial
Compares a material to this one to determine if stacking should be allowed.
removeAllTriggers
Triggers is specified using one of the TRIGGER_ON_ defines
removeTrigger
Triggers is specified using one of the TRIGGER_ON_ defines