Files
Paradise/obj/item/robot_module.html

31 lines
22 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/robot_module - 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="obj/item/robot_module.html#var">Var Details</a> - <a href="obj/item/robot_module.html#proc">Proc Details</a></header><main><h1>robot_module <aside>/<a href="obj.html">obj</a>/<a href="obj/item.html">item</a>/<a href="obj/item/robot_module.html">robot_module</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/mob/living/silicon/robot/robot_modules.dm#L1"><img src="git.png" width="16" height="16" title="code/modules/mob/living/silicon/robot/robot_modules.dm 1"></a></h1><table class="summary" cellspacing="0"><tr><td colspan="2"><h2>Vars</h2></td></tr><tr><th><a href="obj/item/robot_module.html#var/basic_modules">basic_modules</a></th><td>A list of module-specific, non-emag modules the borg will gain when this module is chosen.</td></tr><tr><th><a href="obj/item/robot_module.html#var/channels">channels</a></th><td>Radio channels the module owner has access to.</td></tr><tr><th><a href="obj/item/robot_module.html#var/custom_removals">custom_removals</a></th><td>Special items that are able to be removed from the robot owner via crowbar.</td></tr><tr><th><a href="obj/item/robot_module.html#var/emag_modules">emag_modules</a></th><td>A list of modules the robot gets when emagged.</td></tr><tr><th><a href="obj/item/robot_module.html#var/emag_override_modules">emag_override_modules</a></th><td>A list of modules the robot gets when either emagged or Safety Overridden.</td></tr><tr><th><a href="obj/item/robot_module.html#var/malf_modules">malf_modules</a></th><td>A list of modules that the robot gets when malf AI buys it.</td></tr><tr><th><a href="obj/item/robot_module.html#var/malfhacked">malfhacked</a></th><td>Has the AI hacked the borg module, allowing access to the malf AI exclusive item.</td></tr><tr><th><a href="obj/item/robot_module.html#var/material_storages">material_storages</a></th><td>A list of all &quot;material stacks&quot;, i.e. metal, glass, and reinforced glass</td></tr><tr><th><a href="obj/item/robot_module.html#var/module_actions">module_actions</a></th><td>Special actions this module will gain when chosen such as meson vision, or thermal vision.</td></tr><tr><th><a href="obj/item/robot_module.html#var/module_type">module_type</a></th><td>For icon usage.</td></tr><tr><th><a href="obj/item/robot_module.html#var/modules">modules</a></th><td>A list of all currently usable and created modules the robot currently has access too.</td></tr><tr><th><a href="obj/item/robot_module.html#var/override_modules">override_modules</a></th><td>A list of modules the robot gets when Safety Overridden.</td></tr><tr><th><a href="obj/item/robot_module.html#var/special_rechargables">special_rechargables</a></th><td>A list of modules that require special recharge handling. Examples include things like flashes, sprays and welding tools.</td></tr><tr><th><a href="obj/item/robot_module.html#var/storages">storages</a></th><td>A list of all &quot;energy stacks&quot;, i.e rods, brute kits, splints, etc.</td></tr><tr><th><a href="obj/item/robot_module.html#var/subsystems">subsystems</a></th><td>Available tools given in the verb tab such as a crew monitor, or power monitor.</td></tr><tr><td colspan="2"><h2>Procs</h2></td></tr><tr><th><a href="obj/item/robot_module.html#proc/add_armor">add_armor</a></th><td>Adds armor to a cyborg. Normaly resets it to 0 across the board, unless the module has an armor defined.</td></tr><tr><th><a href="obj/item/robot_module.html#proc/add_languages">add_languages</a></th><td>Adds all of the languages this module is suppose to know and/or speak.</td></tr><tr><th><a href="obj/item/robot_module.html#proc/add_module">add_module</a></th><td>Adds the item <code>I</code> to our <code>modules</code> list, and sets up an <code>/datum/robot_storage/energy</code> if its a stack.</td></tr><tr><th><a href="obj/item/robot_module.html#proc/add_subsystems_and_actions">add_subsystems_and_actions</a></th><td>Adds anything in <code>subsystems</code> to the robot's verbs, and grants any actions that are in <code>module_actions</code>.</td></tr><tr><th><a href="obj/item/robot_module.html#proc/get_or_create_estorage">get_or_create_estorage</a></th><td>Returns a <code>robot_energy_strage</code> datum of type <code>storage_type</code>. If one already exists, it returns that one, otherwise it create a new one.</td></tr><tr><th><a href="obj/item/robot_module.html#proc/handle_death">handle_death</a></th><td>Overriden for specific modules if they have storage items. These should have their contents emptied out onto the floor.</td></tr><tr><th><a href="obj/item/robot_module.html#proc/rebuild_modules">rebuild_modules</a></th><td>Builds the usable module list from the modules we have in <code>basic_modules</code>, <code>override_modules</code>, <code>emag_modules</code>, <code>emag_override_modules</code> and <code>malf_modules</code></td></tr><tr><th><a href="obj/item/robot_module.html#proc/recharge_consumables">recharge_consumables</a></th><td>Handles the recharging of all borg stack items and any items which are in the <code>special_rechargables</code> list.</td></tr><tr><th><a href="obj/item/robot_module.html#proc/remove_item_from_lists">remove_item_from_lists</a></th><td>Searches through the various module lists for the given <code>item_type</code>, deletes and removes the item from all supplied lists, if the item is found.</td></tr><tr><th><a href="obj/item/robot_module.html#proc/remove_subsystems_and_actions">remove_subsystems_and_actions</a></th><td>Removes any verbs from the robot that are in <code>subsystems</code>, and removes any actions that are in <code>module_actions</code>.</td></tr><tr><th><a href="obj/item/robot_module.html#proc/unemag">unemag</a></th><td>Called when the robot owner of this module has the <code>unemag()</code> proc called on them, which is only via admin means.</td></tr><tr><th><a href="obj/item/robot_module.html#proc/update_cells">update_cells</a></th><td>Called when the robot owner of this module has their power cell replaced.</td></tr></table><h2 id="var">Var Details</h2><h3 id="var/basic_modules"><aside class="declaration">var </aside>basic_modules <aside> /list</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/mob/living/silicon/robot/robot_modules.dm#L15"><img src="git.png" width="16" height="16" title="code/modules/mob/living/silicon/robot/robot_modules.dm 15"></a></h3><p>A list of module-specific, non-emag modules the borg will gain when this module is chosen.</p><h3 id="var/channels"><aside class="declaration">var </aside>channels <aside> /list</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/mob/living/silicon/robot/robot_modules.dm#L35"><img src="git.png" width="16" height="16" title="code/modules/mob/living/silicon/robot/robot_modules.dm 35"></a></h3><p>Radio channels the module owner has access to.</p><h3 id="var/custom_removals"><aside class="declaration">var </aside>custom_removals <aside> /list</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/mob/living/silicon/robot/robot_modules.dm#L37"><img src="git.png" width="16" height="16" title="code/modules/mob/living/silicon/robot/robot_modules.dm 37"></a></h3><p>Special items that are able to be removed from the robot owner via crowbar.</p><h3 id="var/emag_modules"><aside class="declaration">var </aside>emag_modules <aside> /list</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/mob/living/silicon/robot/robot_modules.dm#L17"><img src="git.png" width="16" height="16" title="code/modules/mob/living/silicon/robot/robot_modules.dm 17"></a></h3><p>A list of modules the robot gets when emagged.</p><h3 id="var/emag_override_modules"><aside class="declaration">var </aside>emag_override_modules <aside> /list</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/mob/living/silicon/robot/robot_modules.dm#L21"><img src="git.png" width="16" height="16" title="code/modules/mob/living/silicon/robot/robot_modules.dm 21"></a></h3><p>A list of modules the robot gets when either emagged or Safety Overridden.</p><h3 id="var/malf_modules"><aside class="declaration">var </aside>malf_modules <aside> /list</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/mob/living/silicon/robot/robot_modules.dm#L23"><img src="git.png" width="16" height="16" title="code/modules/mob/living/silicon/robot/robot_modules.dm 23"></a></h3><p>A list of modules that the robot gets when malf AI buys it.</p><h3 id="var/malfhacked"><aside class="declaration">var </aside>malfhacked <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/mob/living/silicon/robot/robot_modules.dm#L10"><img src="git.png" width="16" height="16" title="code/modules/mob/living/silicon/robot/robot_modules.dm 10"></a></h3><p>Has the AI hacked the borg module, allowing access to the malf AI exclusive item.</p><h3 id="var/material_storages"><aside class="declaration">var </aside>material_storages <aside> /list</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/mob/living/silicon/robot/robot_modules.dm#L29"><img src="git.png" width="16" height="16" title="code/modules/mob/living/silicon/robot/robot_modules.dm 29"></a></h3><p>A list of all &quot;material stacks&quot;, i.e. metal, glass, and reinforced glass</p><h3 id="var/module_actions"><aside class="declaration">var </aside>module_actions <aside> /list</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/mob/living/silicon/robot/robot_modules.dm#L31"><img src="git.png" width="16" height="16" title="code/modules/mob/living/silicon/robot/robot_modules.dm 31"></a></h3><p>Special actions this module will gain when chosen such as meson vision, or thermal vision.</p><h3 id="var/module_type"><aside class="declaration">var </aside>module_type <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/mob/living/silicon/robot/robot_modules.dm#L39"><img src="git.png" width="16" height="16" title="code/modules/mob/living/silicon/robot/robot_modules.dm 39"></a></h3><p>For icon usage.</p><h3 id="var/modules"><aside class="declaration">var </aside>modules <aside> /list</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/mob/living/silicon/robot/robot_modules.dm#L13"><img src="git.png" width="16" height="16" title="code/modules/mob/living/silicon/robot/robot_modules.dm 13"></a></h3><p>A list of all currently usable and created modules the robot currently has access too.</p><h3 id="var/override_modules"><aside class="declaration">var </aside>override_modules <aside> /list</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/mob/living/silicon/robot/robot_modules.dm#L19"><img src="git.png" width="16" height="16" title="code/modules/mob/living/silicon/robot/robot_modules.dm 19"></a></h3><p>A list of modules the robot gets when Safety Overridden.</p><h3 id="var/special_rechargables"><aside class="declaration">var </aside>special_rechargables <aside> /list</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/mob/living/silicon/robot/robot_modules.dm#L25"><img src="git.png" width="16" height="16" title="code/modules/mob/living/silicon/robot/robot_modules.dm 25"></a></h3><p>A list of modules that require special recharge handling. Examples include things like flashes, sprays and welding tools.</p><h3 id="var/storages"><aside class="declaration">var </aside>storages <aside> /list</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/mob/living/silicon/robot/robot_modules.dm#L27"><img src="git.png" width="16" height="16" title="code/modules/mob/living/silicon/robot/robot_modules.dm 27"></a></h3><p>A list of all &quot;energy stacks&quot;, i.e rods, brute kits, splints, etc.</p><h3 id="var/subsystems"><aside class="declaration">var </aside>subsystems <aside> /list</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/mob/living/silicon/robot/robot_modules.dm#L33"><img src="git.png" width="16" height="16" title="code/modules/mob/living/silicon/robot/robot_modules.dm 33"></a></h3><p>Available tools given in the verb tab such as a crew monitor, or power monitor.</p><h2 id="proc">Proc Details</h2><h3 id="proc/add_armor"><aside class="declaration">proc </aside>add_armor<aside>(/<a href="mob.html">mob</a>/<a href="mob/living.html">living</a>/<a href="mob/living/silicon.html">silicon</a>/<a href="mob/living/silicon/robot.html">robot</a>/R) <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/mob/living/silicon/robot/robot_modules.dm#L304"><img src="git.png" width="16" height="16" title="code/modules/mob/living/silicon/robot/robot_modules.dm 304"></a></aside></h3><p>Adds armor to a cyborg. Normaly resets it to 0 across the board, unless the module has an armor defined.</p><h3 id="proc/add_languages"><aside class="declaration">proc </aside>add_languages<aside>(/<a href="mob.html">mob</a>/<a href="mob/living.html">living</a>/<a href="mob/living/silicon.html">silicon</a>/<a href="mob/living/silicon/robot.html">robot</a>/R) <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/mob/living/silicon/robot/robot_modules.dm#L282"><img src="git.png" width="16" height="16" title="code/modules/mob/living/silicon/robot/robot_modules.dm 282"></a></aside></h3><p>Adds all of the languages this module is suppose to know and/or speak.</p>
<p>Arugments:</p>
<ul>
<li>R - the owner of this module.</li>
</ul><h3 id="proc/add_module"><aside class="declaration">proc </aside>add_module<aside>(/<a href="obj.html">obj</a>/<a href="obj/item.html">item</a>/I, requires_rebuild) <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/mob/living/silicon/robot/robot_modules.dm#L164"><img src="git.png" width="16" height="16" title="code/modules/mob/living/silicon/robot/robot_modules.dm 164"></a></aside></h3><p>Adds the item <code>I</code> to our <code>modules</code> list, and sets up an <code>/datum/robot_storage/energy</code> if its a stack.</p>
<p>Arugments:</p>
<ul>
<li>I - the item to add to our modules.</li>
<li>requires_rebuild - if adding this item requires <code>rebuild_modules()</code> to be called.</li>
</ul><h3 id="proc/add_subsystems_and_actions"><aside class="declaration">proc </aside>add_subsystems_and_actions<aside>(/<a href="mob.html">mob</a>/<a href="mob/living.html">living</a>/<a href="mob/living/silicon.html">silicon</a>/<a href="mob/living/silicon/robot.html">robot</a>/R) <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/mob/living/silicon/robot/robot_modules.dm#L309"><img src="git.png" width="16" height="16" title="code/modules/mob/living/silicon/robot/robot_modules.dm 309"></a></aside></h3><p>Adds anything in <code>subsystems</code> to the robot's verbs, and grants any actions that are in <code>module_actions</code>.</p><h3 id="proc/get_or_create_estorage"><aside class="declaration">proc </aside>get_or_create_estorage<aside>(storage_type) <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/mob/living/silicon/robot/robot_modules.dm#L147"><img src="git.png" width="16" height="16" title="code/modules/mob/living/silicon/robot/robot_modules.dm 147"></a></aside></h3><p>Returns a <code>robot_energy_strage</code> datum of type <code>storage_type</code>. If one already exists, it returns that one, otherwise it create a new one.</p>
<p>Arguments:</p>
<ul>
<li>storage_type - the subtype of <code>datum/robot_storage</code> to fetch or create.</li>
</ul><h3 id="proc/handle_death"><aside class="declaration">proc </aside>handle_death<aside>(/<a href="mob.html">mob</a>/<a href="mob/living.html">living</a>/<a href="mob/living/silicon.html">silicon</a>/<a href="mob/living/silicon/robot.html">robot</a>/R, gibbed) <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/mob/living/silicon/robot/robot_modules.dm#L329"><img src="git.png" width="16" height="16" title="code/modules/mob/living/silicon/robot/robot_modules.dm 329"></a></aside></h3><p>Overriden for specific modules if they have storage items. These should have their contents emptied out onto the floor.</p><h3 id="proc/rebuild_modules"><aside class="declaration">proc </aside>rebuild_modules<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/mob/living/silicon/robot/robot_modules.dm#L194"><img src="git.png" width="16" height="16" title="code/modules/mob/living/silicon/robot/robot_modules.dm 194"></a></aside></h3><p>Builds the usable module list from the modules we have in <code>basic_modules</code>, <code>override_modules</code>, <code>emag_modules</code>, <code>emag_override_modules</code> and <code>malf_modules</code></p><h3 id="proc/recharge_consumables"><aside class="declaration">proc </aside>recharge_consumables<aside>(/<a href="mob.html">mob</a>/<a href="mob/living.html">living</a>/<a href="mob/living/silicon.html">silicon</a>/<a href="mob/living/silicon/robot.html">robot</a>/R, coeff) <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/mob/living/silicon/robot/robot_modules.dm#L233"><img src="git.png" width="16" height="16" title="code/modules/mob/living/silicon/robot/robot_modules.dm 233"></a></aside></h3><p>Handles the recharging of all borg stack items and any items which are in the <code>special_rechargables</code> list.</p>
<p>Arguments:</p>
<ul>
<li>R - the owner of this module.</li>
<li>coeff - a coefficient which can be used to modify the recharge rate of consumables.</li>
</ul><h3 id="proc/remove_item_from_lists"><aside class="declaration">proc </aside>remove_item_from_lists<aside>(item_or_item_type) <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/mob/living/silicon/robot/robot_modules.dm#L115"><img src="git.png" width="16" height="16" title="code/modules/mob/living/silicon/robot/robot_modules.dm 115"></a></aside></h3><p>Searches through the various module lists for the given <code>item_type</code>, deletes and removes the item from all supplied lists, if the item is found.</p>
<p>NOTE: be careful with using this proc, as it irreversibly removes entries from a borg's module list.
This is safe to do with upgrades because the only way to revert upgrades currently is either to rebuild the borg or use a reset module, which allows the lists to regenerate.</p>
<p>Arugments:</p>
<ul>
<li>item_type - the type of item to search for. Also accepts objects themselves.</li>
</ul><h3 id="proc/remove_subsystems_and_actions"><aside class="declaration">proc </aside>remove_subsystems_and_actions<aside>(/<a href="mob.html">mob</a>/<a href="mob/living.html">living</a>/<a href="mob/living/silicon.html">silicon</a>/<a href="mob/living/silicon/robot.html">robot</a>/R) <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/mob/living/silicon/robot/robot_modules.dm#L317"><img src="git.png" width="16" height="16" title="code/modules/mob/living/silicon/robot/robot_modules.dm 317"></a></aside></h3><p>Removes any verbs from the robot that are in <code>subsystems</code>, and removes any actions that are in <code>module_actions</code>.</p><h3 id="proc/unemag">unemag<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/mob/living/silicon/robot/robot_modules.dm#L260"><img src="git.png" width="16" height="16" title="code/modules/mob/living/silicon/robot/robot_modules.dm 260"></a></aside></h3><p>Called when the robot owner of this module has the <code>unemag()</code> proc called on them, which is only via admin means.</p>
<p>Deletes this module's emag items, and recreates them.</p><h3 id="proc/update_cells"><aside class="declaration">proc </aside>update_cells<aside>(unlink_cell) <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/mob/living/silicon/robot/robot_modules.dm#L247"><img src="git.png" width="16" height="16" title="code/modules/mob/living/silicon/robot/robot_modules.dm 247"></a></aside></h3><p>Called when the robot owner of this module has their power cell replaced.</p>
<p>Changes the linked power cell for module items to the newly inserted cell, or to <code>null</code>.
Arguments:</p>
<ul>
<li>unlink_cell - If TRUE, set the item's power cell variable to <code>null</code> rather than linking it to a new one.</li>
</ul></main><footer>paradise.dme <a href="https://github.com/ParadiseSS13/Paradise/tree/776b9861f70566b1e6a0763a465ef22f7920a3d6">776b986</a> (master) — <a href="https://github.com/SpaceManiac/SpacemanDMM/blob/master/crates/dmdoc/README.md">dmdoc 1.11.0</a></footer></body></html>