/datum/material
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 |
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
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
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.
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