mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-27 14:07:51 +01:00
48 lines
10 KiB
HTML
48 lines
10 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><base href="../../../"><link rel="stylesheet" href="dmdoc.css"><title>/datum/controller/subsystem/blackbox - 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/controller/subsystem/blackbox.html#var">Var Details</a> - <a href="datum/controller/subsystem/blackbox.html#proc">Proc Details</a></header><main><h1>blackbox <aside>/<a href="datum.html">datum</a>/<a href="datum/controller.html">controller</a>/<a href="datum/controller/subsystem.html">subsystem</a>/<a href="datum/controller/subsystem/blackbox.html">blackbox</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/controllers/subsystem/SSblackbox.dm#L3"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/SSblackbox.dm 3"></a></h1><table class="summary" cellspacing="0"><tr><td colspan="2"><h2>Vars</h2></td></tr><tr><th><a href="datum/controller/subsystem/blackbox.html#var/feedback">feedback</a></th><td>List of all recorded feedback</td></tr><tr><th><a href="datum/controller/subsystem/blackbox.html#var/research_levels">research_levels</a></th><td>List of highest tech levels attained that isn't lost lost by destruction of RD computers</td></tr><tr><th><a href="datum/controller/subsystem/blackbox.html#var/sealed">sealed</a></th><td>Is it time to stop tracking stats?</td></tr><tr><th><a href="datum/controller/subsystem/blackbox.html#var/versions">versions</a></th><td>Associative list of any feedback variables that have had their format changed since creation and their current version, remember to update this</td></tr><tr><td colspan="2"><h2>Procs</h2></td></tr><tr><th><a href="datum/controller/subsystem/blackbox.html#proc/LogBroadcast">LogBroadcast</a></th><td>Radio broadcast logging helper</td></tr><tr><th><a href="datum/controller/subsystem/blackbox.html#proc/ReportDeath">ReportDeath</a></th><td>Death reporting proc</td></tr><tr><th><a href="datum/controller/subsystem/blackbox.html#proc/Seal">Seal</a></th><td>Blackbox Sealer</td></tr><tr><th><a href="datum/controller/subsystem/blackbox.html#proc/Shutdown">Shutdown</a></th><td>Shutdown Helper</td></tr><tr><th><a href="datum/controller/subsystem/blackbox.html#proc/find_feedback_datum">find_feedback_datum</a></th><td>Helper to find and return a feeedback datum</td></tr><tr><th><a href="datum/controller/subsystem/blackbox.html#proc/log_research">log_research</a></th><td>Research level broadcast logging helper</td></tr><tr><th><a href="datum/controller/subsystem/blackbox.html#proc/record_feedback">record_feedback</a></th><td>Main feedback recording proc</td></tr><tr><th><a href="datum/controller/subsystem/blackbox.html#proc/record_feedback_recurse_list">record_feedback_recurse_list</a></th><td>Recursive list recorder</td></tr></table><h2 id="var">Var Details</h2><h3 id="var/feedback"><aside class="declaration">var </aside>feedback <aside>– /list/<a href="datum.html">datum</a>/<a href="datum/feedback_variable.html">feedback_variable</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/controllers/subsystem/SSblackbox.dm#L15"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/SSblackbox.dm 15"></a></h3><p>List of all recorded feedback</p><h3 id="var/research_levels"><aside class="declaration">var </aside>research_levels <aside>– /list</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/controllers/subsystem/SSblackbox.dm#L19"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/SSblackbox.dm 19"></a></h3><p>List of highest tech levels attained that isn't lost lost by destruction of RD computers</p><h3 id="var/sealed"><aside class="declaration">var </aside>sealed <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/controllers/subsystem/SSblackbox.dm#L17"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/SSblackbox.dm 17"></a></h3><p>Is it time to stop tracking stats?</p><h3 id="var/versions"><aside class="declaration">var </aside>versions <aside>– /list</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/controllers/subsystem/SSblackbox.dm#L21"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/SSblackbox.dm 21"></a></h3><p>Associative list of any feedback variables that have had their format changed since creation and their current version, remember to update this</p><h2 id="proc">Proc Details</h2><h3 id="proc/LogBroadcast"><aside class="declaration">proc </aside>LogBroadcast<aside>(freq) <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/controllers/subsystem/SSblackbox.dm#L143"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/SSblackbox.dm 143"></a></aside></h3><p>Radio broadcast logging helper</p>
|
||
<p>Called during [/proc/broadcast_message()] to log a message to the blackbox.
|
||
Translates the specific frequency to a name</p>
|
||
<p>Arguments:</p>
|
||
<ul>
|
||
<li>freq - Frequency of the transmission</li>
|
||
</ul><h3 id="proc/ReportDeath"><aside class="declaration">proc </aside>ReportDeath<aside>(/<a href="mob.html">mob</a>/<a href="mob/living.html">living</a>/L) <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/controllers/subsystem/SSblackbox.dm#L319"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/SSblackbox.dm 319"></a></aside></h3><p>Death reporting proc</p>
|
||
<p>Called when humans and cyborgs die, and logs death info to the <code>death</code> table</p>
|
||
<p>Arguments:</p>
|
||
<ul>
|
||
<li>L - The human or cyborg to be logged</li>
|
||
</ul><h3 id="proc/Seal"><aside class="declaration">proc </aside>Seal<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/controllers/subsystem/SSblackbox.dm#L113"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/SSblackbox.dm 113"></a></aside></h3><p>Blackbox Sealer</p>
|
||
<p>Seals the blackbox, preventing new data from being stored. This is to avoid data being bloated during end round grief</p><h3 id="proc/Shutdown">Shutdown<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/controllers/subsystem/SSblackbox.dm#L74"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/SSblackbox.dm 74"></a></aside></h3><p>Shutdown Helper</p>
|
||
<p>Dumps all feedback stats to the DB. Doesnt get much simpler than that.</p><h3 id="proc/find_feedback_datum"><aside class="declaration">proc </aside>find_feedback_datum<aside>(key, key_type) <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/controllers/subsystem/SSblackbox.dm#L187"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/SSblackbox.dm 187"></a></aside></h3><p>Helper to find and return a feeedback datum</p>
|
||
<p>Pass in a feedback datum key and key_type to do a lookup.
|
||
It will create the feedback datum if it doesnt exist</p>
|
||
<p>Arguments:</p>
|
||
<ul>
|
||
<li>key - Key of the variable to lookup</li>
|
||
<li>key_type - Type of feedback to be recorded if the feedback datum cant be found</li>
|
||
</ul><h3 id="proc/log_research"><aside class="declaration">proc </aside>log_research<aside>(tech, level) <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/controllers/subsystem/SSblackbox.dm#L129"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/SSblackbox.dm 129"></a></aside></h3><p>Research level broadcast logging helper</p>
|
||
<p>This is called on R&D updates for a safe way of logging tech levels if an R&D console is destroyed</p>
|
||
<p>Arguments:</p>
|
||
<ul>
|
||
<li>tech - Research technology name</li>
|
||
<li>level - Research technology level</li>
|
||
</ul><h3 id="proc/record_feedback"><aside class="declaration">proc </aside>record_feedback<aside>(key_type, key, stat, data, overwrite, ignore_seal) <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/controllers/subsystem/SSblackbox.dm#L211"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/SSblackbox.dm 211"></a></aside></h3><p>Main feedback recording proc</p>
|
||
<p>This is the bulk of this subsystem and is in charge of creating and using the variables.
|
||
See .github/USING_FEEDBACK_DATA.md for instructions
|
||
Note that feedback is not recorded to the DB during this function. That happens at round end.</p>
|
||
<p>Arguments:</p>
|
||
<ul>
|
||
<li>key_type - Type of key. Either "text", "amount", "tally", "nested tally", "associative"</li>
|
||
<li>key - Key of the data to be used (EG: "user_verb")</li>
|
||
<li>stat - Either a number accumulated via "amount", "tally", or "nested tally"; or a number/string collected by "ledger" or "nested ledger".</li>
|
||
<li>data - The actual data to logged</li>
|
||
<li>overwrite - Do we want to overwrite the existing key</li>
|
||
<li>ignore_seal - Does the feedback go in regardless of blackbox sealed status? (EG: map vote results)</li>
|
||
</ul><h3 id="proc/record_feedback_recurse_list"><aside class="declaration">proc </aside>record_feedback_recurse_list<aside>(/list/L, /list/key_list, value, depth, accumulate) <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/controllers/subsystem/SSblackbox.dm#L274"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/SSblackbox.dm 274"></a></aside></h3><p>Recursive list recorder</p>
|
||
<p>Used by the above proc for nested tallies</p>
|
||
<p>Arguments:</p>
|
||
<ul>
|
||
<li>L - List to use</li>
|
||
<li>key_list - List of keys to add</li>
|
||
<li>value - How much to increase by or append to</li>
|
||
<li>depth - Depth to use</li>
|
||
<li>accumulate - TRUE if we are adding <code>value</code> to a tally, FALSE if we are appending it to a record</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> |