8 lines
7.4 KiB
HTML
8 lines
7.4 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><base href="../../"><link rel="stylesheet" href="dmdoc.css"><title>/obj/machinery/mineral - /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/machinery/mineral.html#var">Var Details</a> - <a href="obj/machinery/mineral.html#proc">Proc Details</a></header><main><h1>mineral <aside>/<a href="obj.html">obj</a>/<a href="obj/machinery.html">machinery</a>/<a href="obj/machinery/mineral.html">mineral</a></aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/mining/machine_processing.dm#L5"><img src="git.png" width="16" height="16" title="code/modules/mining/machine_processing.dm 5"></a></h1><p>Mineral processing unit console</p><table class="summary" cellspacing="0"><tr><td colspan="2"><h2>Vars</h2></td></tr><tr><th><a href="obj/machinery/mineral.html#var/input_dir">input_dir</a></th><td>The current direction of <code>input_turf</code>, in relation to the machine.</td></tr><tr><th><a href="obj/machinery/mineral.html#var/input_turf">input_turf</a></th><td>The turf the machines listens to for items to pick up. Calls the <code>pickup_item()</code> proc.</td></tr><tr><th><a href="obj/machinery/mineral.html#var/needs_item_input">needs_item_input</a></th><td>Determines if this machine needs to pick up items. Used to avoid registering signals to <code>/mineral</code> machines that don't pickup items.</td></tr><tr><th><a href="obj/machinery/mineral.html#var/output_dir">output_dir</a></th><td>The current direction, in relation to the machine, that items will be output to.</td></tr><tr><td colspan="2"><h2>Procs</h2></td></tr><tr><th><a href="obj/machinery/mineral.html#proc/pickup_item">pickup_item</a></th><td>Base proc for all <code>/mineral</code> subtype machines to use. Place your item pickup behavior in this proc when you override it for your specific machine.</td></tr><tr><th><a href="obj/machinery/mineral.html#proc/register_input_turf">register_input_turf</a></th><td>Gets the turf in the <code>input_dir</code> direction adjacent to the machine, and registers signals for ATOM_ENTERED and ATOM_CREATED. Calls the <code>pickup_item()</code> proc when it receives these signals.</td></tr><tr><th><a href="obj/machinery/mineral.html#proc/unload_mineral">unload_mineral</a></th><td>Generic unloading proc. Takes an atom as an argument and forceMove's it to the turf adjacent to this machine in the <code>output_dir</code> direction.</td></tr><tr><th><a href="obj/machinery/mineral.html#proc/unregister_input_turf">unregister_input_turf</a></th><td>Unregisters signals that are registered the machine's input turf, if it has one.</td></tr></table><h2 id="var">Var Details</h2><h3 id="var/input_dir"><aside class="declaration">var </aside>input_dir <aside>– </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/mining/machine_processing.dm#L9"><img src="git.png" width="16" height="16" title="code/modules/mining/machine_processing.dm 9"></a></h3><p>The current direction of <code>input_turf</code>, in relation to the machine.</p><h3 id="var/input_turf"><aside class="declaration">var </aside>input_turf <aside>– /<a href="turf.html">turf</a></aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/mining/machine_processing.dm#L13"><img src="git.png" width="16" height="16" title="code/modules/mining/machine_processing.dm 13"></a></h3><p>The turf the machines listens to for items to pick up. Calls the <code>pickup_item()</code> proc.</p><h3 id="var/needs_item_input"><aside class="declaration">var </aside>needs_item_input <aside>– </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/mining/machine_processing.dm#L15"><img src="git.png" width="16" height="16" title="code/modules/mining/machine_processing.dm 15"></a></h3><p>Determines if this machine needs to pick up items. Used to avoid registering signals to <code>/mineral</code> machines that don't pickup items.</p><h3 id="var/output_dir"><aside class="declaration">var </aside>output_dir <aside>– </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/mining/machine_processing.dm#L11"><img src="git.png" width="16" height="16" title="code/modules/mining/machine_processing.dm 11"></a></h3><p>The current direction, in relation to the machine, that items will be output to.</p><h2 id="proc">Proc Details</h2><h3 id="proc/pickup_item"><aside class="declaration">proc </aside>pickup_item<aside>(/<a href="datum.html">datum</a>/source, /<a href="atom.html">atom</a>/<a href="atom/movable.html">movable</a>/target, /<a href="atom.html">atom</a>/oldLoc) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/mining/machine_processing.dm#L50"><img src="git.png" width="16" height="16" title="code/modules/mining/machine_processing.dm 50"></a></aside></h3><p>Base proc for all <code>/mineral</code> subtype machines to use. Place your item pickup behavior in this proc when you override it for your specific machine.</p>
|
||
<p>Called when the COMSIG_ATOM_ENTERED and COMSIG_ATOM_CREATED signals are sent.</p>
|
||
<p>Arguments:</p>
|
||
<ul>
|
||
<li>source - the turf that is listening for the signals.</li>
|
||
<li>target - the atom that just moved onto the <code>source</code> turf.</li>
|
||
<li>oldLoc - the old location that <code>target</code> was at before moving onto <code>source</code>.</li>
|
||
</ul><h3 id="proc/register_input_turf"><aside class="declaration">proc </aside>register_input_turf<aside>() <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/mining/machine_processing.dm#L23"><img src="git.png" width="16" height="16" title="code/modules/mining/machine_processing.dm 23"></a></aside></h3><p>Gets the turf in the <code>input_dir</code> direction adjacent to the machine, and registers signals for ATOM_ENTERED and ATOM_CREATED. Calls the <code>pickup_item()</code> proc when it receives these signals.</p><h3 id="proc/unload_mineral"><aside class="declaration">proc </aside>unload_mineral<aside>(/<a href="atom.html">atom</a>/<a href="atom/movable.html">movable</a>/S) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/mining/machine_processing.dm#L54"><img src="git.png" width="16" height="16" title="code/modules/mining/machine_processing.dm 54"></a></aside></h3><p>Generic unloading proc. Takes an atom as an argument and forceMove's it to the turf adjacent to this machine in the <code>output_dir</code> direction.</p><h3 id="proc/unregister_input_turf"><aside class="declaration">proc </aside>unregister_input_turf<aside>() <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/mining/machine_processing.dm#L29"><img src="git.png" width="16" height="16" title="code/modules/mining/machine_processing.dm 29"></a></aside></h3><p>Unregisters signals that are registered the machine's input turf, if it has one.</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> |