Goonstation 13 - Modules - TypesVar Details - Proc Details

/datum/material

Vars

alphaThe "transparency" of the material. Kept as alpha for logical reasons. Displayed as percentage ingame.
applyColorShould this even color the objects made from it? Mostly used for base station materials like steel
cachedWhether this material should be stored in the material cache - only used for base types, modifying at runtime has no effect
canMixCan this be mixed with other materials?
colorThe color of the material
descDescription of the material, used for scanning
edibleThe 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_exactThe actual value of edibility. Changes internally and sets /datum/material/var/edible.
generationCompound generation
mat_idused to retrieve instances of these base materials from the cache.
material_flagsVarious flags. See [material_properties.dm]
mixOnlyCan this only be used after being combined with another material?
mutableIs this a mutable instance? Defaults to true so creating new materials returns a mutable instance by default
nameName of the material, used for combination and scanning
parent_materialsHolds the parent materials.
prefixeswords that go before the name, used in combination
propertiesList of all the various /datum/material_property that apply.
qualityThe 'quality' of the material
special_namingWhether the specaialNaming proc is called when this material is applied.
suffixeswords that go after the name, used in combination
textureif not null, texture will be set when mat is applied.
texture_blendHow to blend the /datum/material/var/texture.
triggersChemCalled when exposed to chemicals.
triggersDropCalled when owning object is dropped.
triggersExpCalled when exposed to explosions.
triggersOnAddCalled when the material is added to an object
triggersOnAttackCalled when the owning object is used to attack something or someone.
triggersOnAttackedCalled when a mob wearing the owning object is attacked.
triggersOnBlobHitCalled when blob hits something with this material assigned.
triggersOnBulletCalled when a mob wearing the owning object is shot.
triggersOnEatCalled when someone eats a thing with this material assigned.
triggersOnEnteredCalled when something enters a turf with the material assigned. Also called on all objects on the turf with a material.
triggersOnHitCalled when an obj hits something with this material assigned.
triggersOnLifeCalled when the life proc of a mob that has the owning item equipped runs.
triggersOnRemoveCalled when the material is removed from an object
triggersPickupCalled when owning object is picked up.
triggersTempCalled when exposed to temperatures.
valueIn percent of a base value. How much this sells for.

Procs

addTriggerTriggers is specified using one of the TRIGGER_ON_ defines
countTriggersTriggers is specified using one of the TRIGGER_ON_ defines
getImmutableReturns an immutable version of this material. Will return this material if it is already immutable.
getMaterialTraitDescTime for some super verbose proc names.
getMutableReturns 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!
hasTriggerChecks if material proc type is present for a given trigger in the material
isSameMaterialCompares a material to this one to determine if stacking should be allowed.
removeAllTriggersTriggers is specified using one of the TRIGGER_ON_ defines
removeTriggerTriggers 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

List of all the various /datum/material_property that apply.

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.

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