Files
Paradise/datum/stack_recipe.html

1 line
10 KiB
HTML

<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><base href="../"><link rel="stylesheet" href="dmdoc.css"><title>/datum/stack_recipe - Space Station 13</title></head><body><header><a href="index.html">Space Station 13</a> - <a href="index.html#modules">Modules</a> - <a href="index.html#types">Types</a><a href="datum/stack_recipe.html#var">Var Details</a> - <a href="datum/stack_recipe.html#proc">Proc Details</a></header><main><h1>stack_recipe <aside>/<a href="datum.html">datum</a>/<a href="datum/stack_recipe.html">stack_recipe</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/objects/items/stacks/stack_recipe.dm#L4"><img src="git.png" width="16" height="16" title="code/game/objects/items/stacks/stack_recipe.dm 4"></a></h1><table class="summary" cellspacing="0"><tr><td colspan="2"><h2>Vars</h2></td></tr><tr><th><a href="datum/stack_recipe.html#var/cult_structure">cult_structure</a></th><td>Resulting atom is a cult structure</td></tr><tr><th><a href="datum/stack_recipe.html#var/max_res_amount">max_res_amount</a></th><td>Maximum amount of atoms made</td></tr><tr><th><a href="datum/stack_recipe.html#var/on_floor">on_floor</a></th><td>Requires a floor underneath to make</td></tr><tr><th><a href="datum/stack_recipe.html#var/on_floor_or_lattice">on_floor_or_lattice</a></th><td>Requires a floor OR lattice underneath to make</td></tr><tr><th><a href="datum/stack_recipe.html#var/one_per_turf">one_per_turf</a></th><td>Only one resulting atom is allowed per turf</td></tr><tr><th><a href="datum/stack_recipe.html#var/req_amount">req_amount</a></th><td>Required stack amount to make</td></tr><tr><th><a href="datum/stack_recipe.html#var/res_amount">res_amount</a></th><td>Amount of atoms made</td></tr><tr><th><a href="datum/stack_recipe.html#var/result_image">result_image</a></th><td>Generated base64 image. Used only if result has color</td></tr><tr><th><a href="datum/stack_recipe.html#var/result_type">result_type</a></th><td>Resulting typepath of crafted atom</td></tr><tr><th><a href="datum/stack_recipe.html#var/time">time</a></th><td>Time to make</td></tr><tr><th><a href="datum/stack_recipe.html#var/title">title</a></th><td>Visible title of recipe</td></tr><tr><th><a href="datum/stack_recipe.html#var/window_checks">window_checks</a></th><td>Requires a valid window location to make</td></tr><tr><td colspan="2"><h2>Procs</h2></td></tr><tr><th><a href="datum/stack_recipe.html#proc/do_build">do_build</a></th><td>Creates the atom defined by the recipe. Should always return the object it creates or FALSE. This proc assumes that the construction is already possible; for checking whether a recipe <em>can</em> be built before construction, use try_build()</td></tr><tr><th><a href="datum/stack_recipe.html#proc/post_build">post_build</a></th><td>What should be done after the object is built? obj/item/stack/result might not actually be a stack, but this proc needs access to merge() to work, which is on obj/item/stack, so declare it as obj/item/stack anyways.</td></tr><tr><th><a href="datum/stack_recipe.html#proc/try_build">try_build</a></th><td>Returns TRUE if the recipe can be built, otherwise returns FALSE. This proc is only meant as a series of tests to check if construction is possible; the actual creation of the resulting atom should be handled in do_build()</td></tr></table><h2 id="var">Var Details</h2><h3 id="var/cult_structure"><aside class="declaration">var </aside>cult_structure <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/objects/items/stacks/stack_recipe.dm#L28"><img src="git.png" width="16" height="16" title="code/game/objects/items/stacks/stack_recipe.dm 28"></a></h3><p>Resulting atom is a cult structure</p><h3 id="var/max_res_amount"><aside class="declaration">var </aside>max_res_amount <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/objects/items/stacks/stack_recipe.dm#L16"><img src="git.png" width="16" height="16" title="code/game/objects/items/stacks/stack_recipe.dm 16"></a></h3><p>Maximum amount of atoms made</p><h3 id="var/on_floor"><aside class="declaration">var </aside>on_floor <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/objects/items/stacks/stack_recipe.dm#L22"><img src="git.png" width="16" height="16" title="code/game/objects/items/stacks/stack_recipe.dm 22"></a></h3><p>Requires a floor underneath to make</p><h3 id="var/on_floor_or_lattice"><aside class="declaration">var </aside>on_floor_or_lattice <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/objects/items/stacks/stack_recipe.dm#L24"><img src="git.png" width="16" height="16" title="code/game/objects/items/stacks/stack_recipe.dm 24"></a></h3><p>Requires a floor OR lattice underneath to make</p><h3 id="var/one_per_turf"><aside class="declaration">var </aside>one_per_turf <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/objects/items/stacks/stack_recipe.dm#L20"><img src="git.png" width="16" height="16" title="code/game/objects/items/stacks/stack_recipe.dm 20"></a></h3><p>Only one resulting atom is allowed per turf</p><h3 id="var/req_amount"><aside class="declaration">var </aside>req_amount <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/objects/items/stacks/stack_recipe.dm#L12"><img src="git.png" width="16" height="16" title="code/game/objects/items/stacks/stack_recipe.dm 12"></a></h3><p>Required stack amount to make</p><h3 id="var/res_amount"><aside class="declaration">var </aside>res_amount <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/objects/items/stacks/stack_recipe.dm#L14"><img src="git.png" width="16" height="16" title="code/game/objects/items/stacks/stack_recipe.dm 14"></a></h3><p>Amount of atoms made</p><h3 id="var/result_image"><aside class="declaration">var </aside>result_image <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/objects/items/stacks/stack_recipe.dm#L10"><img src="git.png" width="16" height="16" title="code/game/objects/items/stacks/stack_recipe.dm 10"></a></h3><p>Generated base64 image. Used only if result has color</p><h3 id="var/result_type"><aside class="declaration">var </aside>result_type <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/objects/items/stacks/stack_recipe.dm#L8"><img src="git.png" width="16" height="16" title="code/game/objects/items/stacks/stack_recipe.dm 8"></a></h3><p>Resulting typepath of crafted atom</p><h3 id="var/time"><aside class="declaration">var </aside>time <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/objects/items/stacks/stack_recipe.dm#L18"><img src="git.png" width="16" height="16" title="code/game/objects/items/stacks/stack_recipe.dm 18"></a></h3><p>Time to make</p><h3 id="var/title"><aside class="declaration">var </aside>title <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/objects/items/stacks/stack_recipe.dm#L6"><img src="git.png" width="16" height="16" title="code/game/objects/items/stacks/stack_recipe.dm 6"></a></h3><p>Visible title of recipe</p><h3 id="var/window_checks"><aside class="declaration">var </aside>window_checks <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/objects/items/stacks/stack_recipe.dm#L26"><img src="git.png" width="16" height="16" title="code/game/objects/items/stacks/stack_recipe.dm 26"></a></h3><p>Requires a valid window location to make</p><h2 id="proc">Proc Details</h2><h3 id="proc/do_build"><aside class="declaration">proc </aside>do_build<aside>(/<a href="mob.html">mob</a>/user, /<a href="obj.html">obj</a>/<a href="obj/item.html">item</a>/<a href="obj/item/stack.html">stack</a>/material, multiplier, /<a href="atom.html">atom</a>/result) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/objects/items/stacks/stack_recipe.dm#L105"><img src="git.png" width="16" height="16" title="code/game/objects/items/stacks/stack_recipe.dm 105"></a></aside></h3><p>Creates the atom defined by the recipe. Should always return the object it creates or FALSE. This proc assumes that the construction is already possible; for checking whether a recipe <em>can</em> be built before construction, use try_build()</p><h3 id="proc/post_build"><aside class="declaration">proc </aside>post_build<aside>(/<a href="mob.html">mob</a>/user, /<a href="obj.html">obj</a>/<a href="obj/item.html">item</a>/<a href="obj/item/stack.html">stack</a>/material, /<a href="obj.html">obj</a>/<a href="obj/item.html">item</a>/<a href="obj/item/stack.html">stack</a>/result) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/objects/items/stacks/stack_recipe.dm#L134"><img src="git.png" width="16" height="16" title="code/game/objects/items/stacks/stack_recipe.dm 134"></a></aside></h3><p>What should be done after the object is built? obj/item/stack/result might not actually be a stack, but this proc needs access to merge() to work, which is on obj/item/stack, so declare it as obj/item/stack anyways.</p><h3 id="proc/try_build"><aside class="declaration">proc </aside>try_build<aside>(/<a href="mob.html">mob</a>/user, /<a href="obj.html">obj</a>/<a href="obj/item.html">item</a>/<a href="obj/item/stack.html">stack</a>/material, multiplier) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/objects/items/stacks/stack_recipe.dm#L65"><img src="git.png" width="16" height="16" title="code/game/objects/items/stacks/stack_recipe.dm 65"></a></aside></h3><p>Returns TRUE if the recipe can be built, otherwise returns FALSE. This proc is only meant as a series of tests to check if construction is possible; the actual creation of the resulting atom should be handled in do_build()</p></main><footer>paradise.dme <a href="https://github.com/ParadiseSS13/Paradise/tree/8a8a00a2a9bec485351e5f219982b7315d3504fa">8a8a00a</a> (master) — <a href="https://github.com/SpaceManiac/SpacemanDMM/blob/master/crates/dmdoc/README.md">dmdoc 1.11.0</a></footer></body></html>