Files
GS13NG/datum/material.html
2025-02-05 06:19:18 +00:00

41 lines
16 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><base href="../"><link rel="stylesheet" href="dmdoc.css"><title>/datum/material - /tg/ Station 13</title></head><body><header><a href="index.html">/tg/ Station 13</a> - <a href="index.html#modules">Modules</a> - <a href="index.html#types">Types</a><a href="datum/material.html#var">Var Details</a> - <a href="datum/material.html#proc">Proc Details</a></header><main><h1>material <aside>/<a href="datum.html">datum</a>/<a href="datum/material.html">material</a></aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/materials/_material.dm#L8"><img src="git.png" width="16" height="16" title="code/datums/materials/_material.dm 8"></a></h1><table class="summary" cellspacing="0"><tr><td colspan="2"><h2>Vars</h2></td></tr><tr><th><a href="datum/material.html#var/alpha">alpha</a></th><td>Base alpha of the material, is used for greyscale icons.</td></tr><tr><th><a href="datum/material.html#var/armor_modifiers">armor_modifiers</a></th><td>Armor modifiers, multiplies an items normal armor vars by these amounts.</td></tr><tr><th><a href="datum/material.html#var/beauty_modifier">beauty_modifier</a></th><td>How beautiful is this material per unit.</td></tr><tr><th><a href="datum/material.html#var/cached_texture_filter">cached_texture_filter</a></th><td>a cached icon for the texture filter</td></tr><tr><th><a href="datum/material.html#var/categories">categories</a></th><td>Bitflags that influence how SSmaterials handles this material.
Materials &quot;Traits&quot;. its a map of key = category | Value = Bool. Used to define what it can be used for</td></tr><tr><th><a href="datum/material.html#var/color">color</a></th><td>Base color of the material, is used for greyscale. Item isn't changed in color if this is null.</td></tr><tr><th><a href="datum/material.html#var/desc">desc</a></th><td>A short description of the material. Not used anywhere, yet...</td></tr><tr><th><a href="datum/material.html#var/id">id</a></th><td>What the material is indexed by in the SSmaterials.materials list. Defaults to the type of the material.</td></tr><tr><th><a href="datum/material.html#var/integrity_modifier">integrity_modifier</a></th><td>This is a modifier for integrity, and resembles the strength of the material</td></tr><tr><th><a href="datum/material.html#var/item_sound_override">item_sound_override</a></th><td>Can be used to override the sound items make, lets add some SLOSHing.</td></tr><tr><th><a href="datum/material.html#var/name">name</a></th><td>What the material is referred to as IC.</td></tr><tr><th><a href="datum/material.html#var/shard_type">shard_type</a></th><td>What type of shard the material will shatter to</td></tr><tr><th><a href="datum/material.html#var/sheet_type">sheet_type</a></th><td>The type of sheet this material creates. This should be replaced as soon as possible by greyscale sheets</td></tr><tr><th><a href="datum/material.html#var/strength_modifier">strength_modifier</a></th><td>This is a modifier for force, and resembles the strength of the material</td></tr><tr><th><a href="datum/material.html#var/texture_layer_icon_state">texture_layer_icon_state</a></th><td>what texture icon state to overlay</td></tr><tr><th><a href="datum/material.html#var/turf_sound_override">turf_sound_override</a></th><td>Can be used to override the stepsound a turf makes. MORE SLOOOSH</td></tr><tr><th><a href="datum/material.html#var/value_per_unit">value_per_unit</a></th><td>This is the amount of value per 1 unit of the material</td></tr><tr><td colspan="2"><h2>Procs</h2></td></tr><tr><th><a href="datum/material.html#proc/Initialize">Initialize</a></th><td></td></tr><tr><th><a href="datum/material.html#proc/on_accidental_mat_consumption">on_accidental_mat_consumption</a></th><td>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</td></tr><tr><th><a href="datum/material.html#proc/on_applied">on_applied</a></th><td>This proc is called when the material is added to an object.</td></tr><tr><th><a href="datum/material.html#proc/on_applied_obj">on_applied_obj</a></th><td>This proc is called when the material is added to an object specifically.</td></tr><tr><th><a href="datum/material.html#proc/on_removed">on_removed</a></th><td>This proc is called when the material is removed from an object.</td></tr><tr><th><a href="datum/material.html#proc/on_removed_obj">on_removed_obj</a></th><td>This proc is called when the material is removed from an object specifically.</td></tr><tr><th><a href="datum/material.html#proc/return_composition">return_composition</a></th><td></td></tr></table><h2 id="var">Var Details</h2><h3 id="var/alpha"><aside class="declaration">var </aside>alpha <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/materials/_material.dm#L19"><img src="git.png" width="16" height="16" title="code/datums/materials/_material.dm 19"></a></h3><p>Base alpha of the material, is used for greyscale icons.</p><h3 id="var/armor_modifiers"><aside class="declaration">var </aside>armor_modifiers <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/materials/_material.dm#L33"><img src="git.png" width="16" height="16" title="code/datums/materials/_material.dm 33"></a></h3><p>Armor modifiers, multiplies an items normal armor vars by these amounts.</p><h3 id="var/beauty_modifier"><aside class="declaration">var </aside>beauty_modifier <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/materials/_material.dm#L35"><img src="git.png" width="16" height="16" title="code/datums/materials/_material.dm 35"></a></h3><p>How beautiful is this material per unit.</p><h3 id="var/cached_texture_filter"><aside class="declaration">var </aside>cached_texture_filter <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/materials/_material.dm#L43"><img src="git.png" width="16" height="16" title="code/datums/materials/_material.dm 43"></a></h3><p>a cached icon for the texture filter</p><h3 id="var/categories"><aside class="declaration">var </aside>categories <aside> /list</aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/materials/_material.dm#L23"><img src="git.png" width="16" height="16" title="code/datums/materials/_material.dm 23"></a></h3><p>Bitflags that influence how SSmaterials handles this material.
Materials &quot;Traits&quot;. its a map of key = category | Value = Bool. Used to define what it can be used for</p><h3 id="var/color"><aside class="declaration">var </aside>color <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/materials/_material.dm#L17"><img src="git.png" width="16" height="16" title="code/datums/materials/_material.dm 17"></a></h3><p>Base color of the material, is used for greyscale. Item isn't changed in color if this is null.</p><h3 id="var/desc"><aside class="declaration">var </aside>desc <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/materials/_material.dm#L12"><img src="git.png" width="16" height="16" title="code/datums/materials/_material.dm 12"></a></h3><p>A short description of the material. Not used anywhere, yet...</p><h3 id="var/id"><aside class="declaration">var </aside>id <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/materials/_material.dm#L14"><img src="git.png" width="16" height="16" title="code/datums/materials/_material.dm 14"></a></h3><p>What the material is indexed by in the SSmaterials.materials list. Defaults to the type of the material.</p><h3 id="var/integrity_modifier"><aside class="declaration">var </aside>integrity_modifier <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/materials/_material.dm#L29"><img src="git.png" width="16" height="16" title="code/datums/materials/_material.dm 29"></a></h3><p>This is a modifier for integrity, and resembles the strength of the material</p><h3 id="var/item_sound_override"><aside class="declaration">var </aside>item_sound_override <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/materials/_material.dm#L37"><img src="git.png" width="16" height="16" title="code/datums/materials/_material.dm 37"></a></h3><p>Can be used to override the sound items make, lets add some SLOSHing.</p><h3 id="var/name"><aside class="declaration">var </aside>name <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/materials/_material.dm#L10"><img src="git.png" width="16" height="16" title="code/datums/materials/_material.dm 10"></a></h3><p>What the material is referred to as IC.</p><h3 id="var/shard_type"><aside class="declaration">var </aside>shard_type <aside> /<a href="obj.html">obj</a>/<a href="obj/item.html">item</a></aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/materials/_material.dm#L48"><img src="git.png" width="16" height="16" title="code/datums/materials/_material.dm 48"></a></h3><p>What type of shard the material will shatter to</p><h3 id="var/sheet_type"><aside class="declaration">var </aside>sheet_type <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/materials/_material.dm#L25"><img src="git.png" width="16" height="16" title="code/datums/materials/_material.dm 25"></a></h3><p>The type of sheet this material creates. This should be replaced as soon as possible by greyscale sheets</p><h3 id="var/strength_modifier"><aside class="declaration">var </aside>strength_modifier <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/materials/_material.dm#L27"><img src="git.png" width="16" height="16" title="code/datums/materials/_material.dm 27"></a></h3><p>This is a modifier for force, and resembles the strength of the material</p><h3 id="var/texture_layer_icon_state"><aside class="declaration">var </aside>texture_layer_icon_state <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/materials/_material.dm#L41"><img src="git.png" width="16" height="16" title="code/datums/materials/_material.dm 41"></a></h3><p>what texture icon state to overlay</p><h3 id="var/turf_sound_override"><aside class="declaration">var </aside>turf_sound_override <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/materials/_material.dm#L39"><img src="git.png" width="16" height="16" title="code/datums/materials/_material.dm 39"></a></h3><p>Can be used to override the stepsound a turf makes. MORE SLOOOSH</p><h3 id="var/value_per_unit"><aside class="declaration">var </aside>value_per_unit <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/materials/_material.dm#L31"><img src="git.png" width="16" height="16" title="code/datums/materials/_material.dm 31"></a></h3><p>This is the amount of value per 1 unit of the material</p><h2 id="proc">Proc Details</h2><h3 id="proc/Initialize"><aside class="declaration">proc </aside>Initialize<aside>(_id, ...) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/materials/_material.dm#L53"><img src="git.png" width="16" height="16" title="code/datums/materials/_material.dm 53"></a></aside></h3><ul>
<li>
<p>Handles initializing the material.</p>
</li>
<li>
<p>Arugments:</p>
</li>
<li>
<ul>
<li>_id: The ID the material should use. Overrides the existing ID.</li>
</ul>
</li>
</ul><h3 id="proc/on_accidental_mat_consumption"><aside class="declaration">proc </aside>on_accidental_mat_consumption<aside>(/<a href="mob.html">mob</a>/<a href="mob/living.html">living</a>/<a href="mob/living/carbon.html">carbon</a>/M, /<a href="obj.html">obj</a>/<a href="obj/item.html">item</a>/S) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/materials/_material.dm#L181"><img src="git.png" width="16" height="16" title="code/datums/materials/_material.dm 181"></a></aside></h3><p>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</p>
<ul>
<li>M - person consuming the mat</li>
<li>S - (optional) item the mat is contained in (NOT the item with the mat itself)</li>
</ul><h3 id="proc/on_applied"><aside class="declaration">proc </aside>on_applied<aside>(/<a href="atom.html">atom</a>/source, amount, material_flags) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/materials/_material.dm#L69"><img src="git.png" width="16" height="16" title="code/datums/materials/_material.dm 69"></a></aside></h3><p>This proc is called when the material is added to an object.</p><h3 id="proc/on_applied_obj"><aside class="declaration">proc </aside>on_applied_obj<aside>(/<a href="obj.html">obj</a>/o, amount, material_flags) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/materials/_material.dm#L100"><img src="git.png" width="16" height="16" title="code/datums/materials/_material.dm 100"></a></aside></h3><p>This proc is called when the material is added to an object specifically.</p><h3 id="proc/on_removed"><aside class="declaration">proc </aside>on_removed<aside>(/<a href="atom.html">atom</a>/source, amount, material_flags) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/materials/_material.dm#L142"><img src="git.png" width="16" height="16" title="code/datums/materials/_material.dm 142"></a></aside></h3><p>This proc is called when the material is removed from an object.</p><h3 id="proc/on_removed_obj"><aside class="declaration">proc </aside>on_removed_obj<aside>(/<a href="obj.html">obj</a>/o, amount, material_flags) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/materials/_material.dm#L164"><img src="git.png" width="16" height="16" title="code/datums/materials/_material.dm 164"></a></aside></h3><p>This proc is called when the material is removed from an object specifically.</p><h3 id="proc/return_composition"><aside class="declaration">proc </aside>return_composition<aside>(amount, breakdown_flags) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/materials/_material.dm#L192"><img src="git.png" width="16" height="16" title="code/datums/materials/_material.dm 192"></a></aside></h3><ul>
<li>
<p>Returns the composition of this material.</p>
</li>
<li>
<p>Mostly used for alloys when breaking down materials.</p>
</li>
<li>
<p>Arguments:</p>
</li>
<li>
<ul>
<li>amount: The amount of the material to break down.</li>
</ul>
</li>
<li>
<ul>
<li>breakdown_flags: Some flags dictating how exactly this material is being broken down.</li>
</ul>
</li>
</ul></main><footer>tgstation.dme <a href="https://github.com/evilew/GS13-Citadel/tree/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e">e8e0068</a> (master) — <a href="https://github.com/SpaceManiac/SpacemanDMM/blob/master/crates/dmdoc/README.md">dmdoc 1.9.0</a></footer></body></html>