Files
GS13NG/obj/item/stack.html
2025-02-05 06:19:18 +00:00

72 lines
11 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>/obj/item/stack - /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="obj/item/stack.html#var">Var Details</a> - <a href="obj/item/stack.html#proc">Proc Details</a></header><main><h1>stack <aside>/<a href="obj.html">obj</a>/<a href="obj/item.html">item</a>/<a href="obj/item/stack.html">stack</a></aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/game/objects/items/stacks/stack.dm#L12"><img src="git.png" width="16" height="16" title="code/game/objects/items/stacks/stack.dm 12"></a></h1><table class="summary" cellspacing="0"><tr><td colspan="2"><h2>Vars</h2></td></tr><tr><th><a href="obj/item/stack.html#var/absorption_capacity">absorption_capacity</a></th><td>How much blood flow this stack can absorb if used as a bandage on a cut wound, note that absorption is how much we lower the flow rate, not the raw amount of blood we suck up</td></tr><tr><th><a href="obj/item/stack.html#var/absorption_rate">absorption_rate</a></th><td>How quickly we lower the blood flow on a cut wound we're bandaging. Expected lifetime of this bandage in ticks is thus absorption_capacity/absorption_rate, or until the cut heals, whichever comes first</td></tr><tr><th><a href="obj/item/stack.html#var/material_type">material_type</a></th><td>Datum material type that this stack is made of</td></tr><tr><th><a href="obj/item/stack.html#var/matter_amount">matter_amount</a></th><td>Amount of matter for RCD</td></tr><tr><th><a href="obj/item/stack.html#var/splint_factor">splint_factor</a></th><td>If set and this used as a splint for a broken bone wound, this is used as a multiplier for applicable slowdowns (lower = better) (also for speeding up burn recoveries)</td></tr><tr><td colspan="2"><h2>Procs</h2></td></tr><tr><th><a href="obj/item/stack.html#proc/add">add</a></th><td></td></tr><tr><th><a href="obj/item/stack.html#proc/build_recipe">build_recipe</a></th><td>Returns a list of properties of a given recipe</td></tr><tr><th><a href="obj/item/stack.html#proc/can_merge">can_merge</a></th><td></td></tr><tr><th><a href="obj/item/stack.html#proc/is_valid_recipe">is_valid_recipe</a></th><td>Checks if the recipe is valid to be used</td></tr><tr><th><a href="obj/item/stack.html#proc/recursively_build_recipes">recursively_build_recipes</a></th><td>Builds all recipes in a given recipe list and returns an association list containing them</td></tr><tr><th><a href="obj/item/stack.html#proc/set_custom_materials">set_custom_materials</a></th><td>Override to make things like metalgen accurately set custom materials</td></tr><tr><th><a href="obj/item/stack.html#proc/set_mats_per_unit">set_mats_per_unit</a></th><td></td></tr><tr><th><a href="obj/item/stack.html#proc/split_stack">split_stack</a></th><td></td></tr><tr><th><a href="obj/item/stack.html#proc/update_custom_materials">update_custom_materials</a></th><td>Updates the custom materials list of this stack.</td></tr></table><h2 id="var">Var Details</h2><h3 id="var/absorption_capacity"><aside class="declaration">var </aside>absorption_capacity <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/game/objects/items/stacks/stack.dm#L38"><img src="git.png" width="16" height="16" title="code/game/objects/items/stacks/stack.dm 38"></a></h3><p>How much blood flow this stack can absorb if used as a bandage on a cut wound, note that absorption is how much we lower the flow rate, not the raw amount of blood we suck up</p><h3 id="var/absorption_rate"><aside class="declaration">var </aside>absorption_rate <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/game/objects/items/stacks/stack.dm#L40"><img src="git.png" width="16" height="16" title="code/game/objects/items/stacks/stack.dm 40"></a></h3><p>How quickly we lower the blood flow on a cut wound we're bandaging. Expected lifetime of this bandage in ticks is thus absorption_capacity/absorption_rate, or until the cut heals, whichever comes first</p><h3 id="var/material_type"><aside class="declaration">var </aside>material_type <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/game/objects/items/stacks/stack.dm#L30"><img src="git.png" width="16" height="16" title="code/game/objects/items/stacks/stack.dm 30"></a></h3><p>Datum material type that this stack is made of</p><h3 id="var/matter_amount"><aside class="declaration">var </aside>matter_amount <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/game/objects/items/stacks/stack.dm#L42"><img src="git.png" width="16" height="16" title="code/game/objects/items/stacks/stack.dm 42"></a></h3><p>Amount of matter for RCD</p><h3 id="var/splint_factor"><aside class="declaration">var </aside>splint_factor <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/game/objects/items/stacks/stack.dm#L36"><img src="git.png" width="16" height="16" title="code/game/objects/items/stacks/stack.dm 36"></a></h3><p>If set and this used as a splint for a broken bone wound, this is used as a multiplier for applicable slowdowns (lower = better) (also for speeding up burn recoveries)</p><h2 id="proc">Proc Details</h2><h3 id="proc/add"><aside class="declaration">proc </aside>add<aside>(_amount) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/game/objects/items/stacks/stack.dm#L433"><img src="git.png" width="16" height="16" title="code/game/objects/items/stacks/stack.dm 433"></a></aside></h3><ul>
<li>
<p>Adds some number of units to this stack.</p>
</li>
<li>
<p>Arguments:</p>
</li>
<li>
<ul>
<li>_amount: The number of units to add to this stack.</li>
</ul>
</li>
</ul><h3 id="proc/build_recipe"><aside class="declaration">proc </aside>build_recipe<aside>(/<a href="datum.html">datum</a>/<a href="datum/stack_recipe.html">stack_recipe</a>/R) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/game/objects/items/stacks/stack.dm#L210"><img src="git.png" width="16" height="16" title="code/game/objects/items/stacks/stack.dm 210"></a></aside></h3><p>Returns a list of properties of a given recipe</p>
<p>Arguments:</p>
<ul>
<li>R - The stack recipe we are using to get a list of properties</li>
</ul><h3 id="proc/can_merge"><aside class="declaration">proc </aside>can_merge<aside>(/<a href="obj.html">obj</a>/<a href="obj/item.html">item</a>/<a href="obj/item/stack.html">stack</a>/check) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/game/objects/items/stacks/stack.dm#L448"><img src="git.png" width="16" height="16" title="code/game/objects/items/stacks/stack.dm 448"></a></aside></h3><ul>
<li>
<p>Checks whether this stack can merge itself into another stack.</p>
</li>
<li>
<p>Arguments:</p>
</li>
<li>
<ul>
<li><a href="obj/item/stack.html" title="/obj/item/stack">check</a>: The stack to check for mergeability.</li>
</ul>
</li>
</ul><h3 id="proc/is_valid_recipe"><aside class="declaration">proc </aside>is_valid_recipe<aside>(/<a href="datum.html">datum</a>/<a href="datum/stack_recipe.html">stack_recipe</a>/R, /list/recipe_list) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/game/objects/items/stacks/stack.dm#L225"><img src="git.png" width="16" height="16" title="code/game/objects/items/stacks/stack.dm 225"></a></aside></h3><p>Checks if the recipe is valid to be used</p>
<p>Arguments:</p>
<ul>
<li>R - The stack recipe we are checking if it is valid</li>
<li>recipe_list - The list of recipes we are using to check the given recipe</li>
</ul><h3 id="proc/recursively_build_recipes"><aside class="declaration">proc </aside>recursively_build_recipes<aside>(/list/recipe_to_iterate) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/game/objects/items/stacks/stack.dm#L193"><img src="git.png" width="16" height="16" title="code/game/objects/items/stacks/stack.dm 193"></a></aside></h3><p>Builds all recipes in a given recipe list and returns an association list containing them</p>
<p>Arguments:</p>
<ul>
<li>recipe_to_iterate - The list of recipes we are using to build recipes</li>
</ul><h3 id="proc/set_custom_materials"><aside class="parent"><a title="/atom" href="atom.html#proc/set_custom_materials"></a></aside>set_custom_materials<aside>(/list/materials, multiplier, is_update) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/game/objects/items/stacks/stack.dm#L105"><img src="git.png" width="16" height="16" title="code/game/objects/items/stacks/stack.dm 105"></a></aside></h3><p>Override to make things like metalgen accurately set custom materials</p><h3 id="proc/set_mats_per_unit"><aside class="declaration">proc </aside>set_mats_per_unit<aside>(/list/mats, multiplier) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/game/objects/items/stacks/stack.dm#L93"><img src="git.png" width="16" height="16" title="code/game/objects/items/stacks/stack.dm 93"></a></aside></h3><ul>
<li>
<p>Sets the amount of materials per unit for this stack.</p>
</li>
<li>
<p>Arguments:</p>
</li>
<li>
<ul>
<li><a href="https://www.byond.com/docs/ref/#/list" title="/list">mats</a>: The value to set the mats per unit to.</li>
</ul>
</li>
<li>
<ul>
<li>multiplier: The amount to multiply the mats per unit by. Defaults to 1.</li>
</ul>
</li>
</ul><h3 id="proc/split_stack"><aside class="declaration">proc </aside>split_stack<aside>(/<a href="mob.html">mob</a>/user, amount) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/game/objects/items/stacks/stack.dm#L555"><img src="git.png" width="16" height="16" title="code/game/objects/items/stacks/stack.dm 555"></a></aside></h3><ul>
<li>
<p>Splits the stack into two stacks.</p>
</li>
<li>
<p>Arguments:</p>
</li>
<li>
<ul>
<li><a href="mob.html" title="/mob">user</a>: The mob splitting the stack.</li>
</ul>
</li>
<li>
<ul>
<li>amount: The number of units to split from this stack.</li>
</ul>
</li>
</ul><h3 id="proc/update_custom_materials"><aside class="declaration">proc </aside>update_custom_materials<aside>() <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/game/objects/items/stacks/stack.dm#L99"><img src="git.png" width="16" height="16" title="code/game/objects/items/stacks/stack.dm 99"></a></aside></h3><p>Updates the custom materials list of this stack.</p></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>