3 lines
16 KiB
HTML
3 lines
16 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><base href="../"><link rel="stylesheet" href="dmdoc.css"><title>/datum/language_holder - /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="datum/language_holder.html#var">Var Details</a> - <a href="datum/language_holder.html#proc">Proc Details</a></header><main><h1>language_holder <aside>/<a href="datum.html">datum</a>/<a href="datum/language_holder.html">language_holder</a></aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/language/language_holder.dm#L34"><img src="git.png" width="16" height="16" title="code/modules/language/language_holder.dm 34"></a></h1><table class="summary" cellspacing="0"><tr><td colspan="2"><h2>Vars</h2></td></tr><tr><th><a href="datum/language_holder.html#var/blocked_languages">blocked_languages</a></th><td>A list of blocked languages. Used to prevent understanding and speaking certain languages, ie for certain mobs, mutations etc.</td></tr><tr><th><a href="datum/language_holder.html#var/language_menu">language_menu</a></th><td>Handles displaying the language menu UI.</td></tr><tr><th><a href="datum/language_holder.html#var/omnitongue">omnitongue</a></th><td>If true, overrides tongue limitations.</td></tr><tr><th><a href="datum/language_holder.html#var/owner">owner</a></th><td>Tracks the entity that owns the holder.</td></tr><tr><th><a href="datum/language_holder.html#var/selected_language">selected_language</a></th><td>Currently spoken language</td></tr><tr><th><a href="datum/language_holder.html#var/spoken_languages">spoken_languages</a></th><td>A list of languages that can be spoken. Tongue organ may also set limits beyond this list.</td></tr><tr><th><a href="datum/language_holder.html#var/understood_languages">understood_languages</a></th><td>Understood languages.</td></tr><tr><td colspan="2"><h2>Procs</h2></td></tr><tr><th><a href="datum/language_holder.html#proc/New">New</a></th><td>Initializes, and copies in the languages from the current atom if available.</td></tr><tr><th><a href="datum/language_holder.html#proc/add_blocked_language">add_blocked_language</a></th><td>Adds a single language or list of languages to the blocked language list.</td></tr><tr><th><a href="datum/language_holder.html#proc/can_speak_language">can_speak_language</a></th><td>Checks if you can speak the language. Tongue limitations should be supplied as an argument.</td></tr><tr><th><a href="datum/language_holder.html#proc/copy_languages">copy_languages</a></th><td>Copies all languages from the supplied atom/language holder. Source should be overridden when you
|
||
do not want the language overwritten by later atom updates or want to avoid blocked languages.</td></tr><tr><th><a href="datum/language_holder.html#proc/get_atom">get_atom</a></th><td>Gets the atom, since we some times need to check if the tongue has limitations.</td></tr><tr><th><a href="datum/language_holder.html#proc/get_random_spoken_language">get_random_spoken_language</a></th><td>Gets a random spoken language, useful for forced speech and such.</td></tr><tr><th><a href="datum/language_holder.html#proc/get_random_understood_language">get_random_understood_language</a></th><td>Gets a random understood language, useful for hallucinations and such.</td></tr><tr><th><a href="datum/language_holder.html#proc/get_selected_language">get_selected_language</a></th><td>Returns selected language if it can be spoken, or decides, sets and returns a new selected language if possible.</td></tr><tr><th><a href="datum/language_holder.html#proc/grant_all_languages">grant_all_languages</a></th><td>Grants every language to understood and spoken, and gives omnitongue.</td></tr><tr><th><a href="datum/language_holder.html#proc/grant_language">grant_language</a></th><td>Grants the supplied language.</td></tr><tr><th><a href="datum/language_holder.html#proc/has_language">has_language</a></th><td>Checks if you have the language. If spoken is true, only checks if you can speak the language.</td></tr><tr><th><a href="datum/language_holder.html#proc/open_language_menu">open_language_menu</a></th><td>Opens a language menu reading from the language holder.</td></tr><tr><th><a href="datum/language_holder.html#proc/remove_all_languages">remove_all_languages</a></th><td>Removes every language and optionally sets omnitongue false. If a non default source is supplied, only removes that source.</td></tr><tr><th><a href="datum/language_holder.html#proc/remove_blocked_language">remove_blocked_language</a></th><td>Removes a single language or list of languages from the blocked language list.</td></tr><tr><th><a href="datum/language_holder.html#proc/remove_language">remove_language</a></th><td>Removes a single language or source, removing all sources returns the pre-removal state of the language.</td></tr><tr><th><a href="datum/language_holder.html#proc/update_atom_languages">update_atom_languages</a></th><td>Empties out the atom specific languages and updates them according to the supplied atoms language holder.</td></tr></table><h2 id="var">Var Details</h2><h3 id="var/blocked_languages"><aside class="declaration">var </aside>blocked_languages <aside>– /list</aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/language/language_holder.dm#L40"><img src="git.png" width="16" height="16" title="code/modules/language/language_holder.dm 40"></a></h3><p>A list of blocked languages. Used to prevent understanding and speaking certain languages, ie for certain mobs, mutations etc.</p><h3 id="var/language_menu"><aside class="declaration">var </aside>language_menu <aside>– /<a href="datum.html">datum</a>/language_menu</aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/language/language_holder.dm#L44"><img src="git.png" width="16" height="16" title="code/modules/language/language_holder.dm 44"></a></h3><p>Handles displaying the language menu UI.</p><h3 id="var/omnitongue"><aside class="declaration">var </aside>omnitongue <aside>– </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/language/language_holder.dm#L42"><img src="git.png" width="16" height="16" title="code/modules/language/language_holder.dm 42"></a></h3><p>If true, overrides tongue limitations.</p><h3 id="var/owner"><aside class="declaration">var </aside>owner <aside>– </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/language/language_holder.dm#L50"><img src="git.png" width="16" height="16" title="code/modules/language/language_holder.dm 50"></a></h3><p>Tracks the entity that owns the holder.</p><h3 id="var/selected_language"><aside class="declaration">var </aside>selected_language <aside>– </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/language/language_holder.dm#L46"><img src="git.png" width="16" height="16" title="code/modules/language/language_holder.dm 46"></a></h3><p>Currently spoken language</p><h3 id="var/spoken_languages"><aside class="declaration">var </aside>spoken_languages <aside>– /list</aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/language/language_holder.dm#L38"><img src="git.png" width="16" height="16" title="code/modules/language/language_holder.dm 38"></a></h3><p>A list of languages that can be spoken. Tongue organ may also set limits beyond this list.</p><h3 id="var/understood_languages"><aside class="declaration">var </aside>understood_languages <aside>– /list</aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/language/language_holder.dm#L36"><img src="git.png" width="16" height="16" title="code/modules/language/language_holder.dm 36"></a></h3><p>Understood languages.</p><h2 id="proc">Proc Details</h2><h3 id="proc/New">New<aside>(_owner) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/language/language_holder.dm#L51"><img src="git.png" width="16" height="16" title="code/modules/language/language_holder.dm 51"></a></aside></h3><p>Initializes, and copies in the languages from the current atom if available.</p><h3 id="proc/add_blocked_language"><aside class="declaration">proc </aside>add_blocked_language<aside>(languages, source) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/language/language_holder.dm#L113"><img src="git.png" width="16" height="16" title="code/modules/language/language_holder.dm 113"></a></aside></h3><p>Adds a single language or list of languages to the blocked language list.</p><h3 id="proc/can_speak_language"><aside class="declaration">proc </aside>can_speak_language<aside>(language) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/language/language_holder.dm#L145"><img src="git.png" width="16" height="16" title="code/modules/language/language_holder.dm 145"></a></aside></h3><p>Checks if you can speak the language. Tongue limitations should be supplied as an argument.</p><h3 id="proc/copy_languages"><aside class="declaration">proc </aside>copy_languages<aside>(/<a href="datum.html">datum</a>/<a href="datum/language_holder.html">language_holder</a>/from_holder, source_override) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/language/language_holder.dm#L208"><img src="git.png" width="16" height="16" title="code/modules/language/language_holder.dm 208"></a></aside></h3><p>Copies all languages from the supplied atom/language holder. Source should be overridden when you
|
||
do not want the language overwritten by later atom updates or want to avoid blocked languages.</p><h3 id="proc/get_atom"><aside class="declaration">proc </aside>get_atom<aside>() <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/language/language_holder.dm#L182"><img src="git.png" width="16" height="16" title="code/modules/language/language_holder.dm 182"></a></aside></h3><p>Gets the atom, since we some times need to check if the tongue has limitations.</p><h3 id="proc/get_random_spoken_language"><aside class="declaration">proc </aside>get_random_spoken_language<aside>() <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/language/language_holder.dm#L172"><img src="git.png" width="16" height="16" title="code/modules/language/language_holder.dm 172"></a></aside></h3><p>Gets a random spoken language, useful for forced speech and such.</p><h3 id="proc/get_random_understood_language"><aside class="declaration">proc </aside>get_random_understood_language<aside>() <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/language/language_holder.dm#L168"><img src="git.png" width="16" height="16" title="code/modules/language/language_holder.dm 168"></a></aside></h3><p>Gets a random understood language, useful for hallucinations and such.</p><h3 id="proc/get_selected_language"><aside class="declaration">proc </aside>get_selected_language<aside>() <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/language/language_holder.dm#L153"><img src="git.png" width="16" height="16" title="code/modules/language/language_holder.dm 153"></a></aside></h3><p>Returns selected language if it can be spoken, or decides, sets and returns a new selected language if possible.</p><h3 id="proc/grant_all_languages"><aside class="declaration">proc </aside>grant_all_languages<aside>(understood, spoken, grant_omnitongue, source) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/language/language_holder.dm#L77"><img src="git.png" width="16" height="16" title="code/modules/language/language_holder.dm 77"></a></aside></h3><p>Grants every language to understood and spoken, and gives omnitongue.</p><h3 id="proc/grant_language"><aside class="declaration">proc </aside>grant_language<aside>(language, understood, spoken, source) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/language/language_holder.dm#L64"><img src="git.png" width="16" height="16" title="code/modules/language/language_holder.dm 64"></a></aside></h3><p>Grants the supplied language.</p><h3 id="proc/has_language"><aside class="declaration">proc </aside>has_language<aside>(language, spoken) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/language/language_holder.dm#L137"><img src="git.png" width="16" height="16" title="code/modules/language/language_holder.dm 137"></a></aside></h3><p>Checks if you have the language. If spoken is true, only checks if you can speak the language.</p><h3 id="proc/open_language_menu"><aside class="declaration">proc </aside>open_language_menu<aside>(/<a href="mob.html">mob</a>/user) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/language/language_holder.dm#L176"><img src="git.png" width="16" height="16" title="code/modules/language/language_holder.dm 176"></a></aside></h3><p>Opens a language menu reading from the language holder.</p><h3 id="proc/remove_all_languages"><aside class="declaration">proc </aside>remove_all_languages<aside>(source, remove_omnitongue) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/language/language_holder.dm#L105"><img src="git.png" width="16" height="16" title="code/modules/language/language_holder.dm 105"></a></aside></h3><p>Removes every language and optionally sets omnitongue false. If a non default source is supplied, only removes that source.</p><h3 id="proc/remove_blocked_language"><aside class="declaration">proc </aside>remove_blocked_language<aside>(languages, source) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/language/language_holder.dm#L123"><img src="git.png" width="16" height="16" title="code/modules/language/language_holder.dm 123"></a></aside></h3><p>Removes a single language or list of languages from the blocked language list.</p><h3 id="proc/remove_language"><aside class="declaration">proc </aside>remove_language<aside>(language, understood, spoken, source) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/language/language_holder.dm#L85"><img src="git.png" width="16" height="16" title="code/modules/language/language_holder.dm 85"></a></aside></h3><p>Removes a single language or source, removing all sources returns the pre-removal state of the language.</p><h3 id="proc/update_atom_languages"><aside class="declaration">proc </aside>update_atom_languages<aside>(/<a href="atom.html">atom</a>/<a href="atom/movable.html">movable</a>/thing) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/language/language_holder.dm#L191"><img src="git.png" width="16" height="16" title="code/modules/language/language_holder.dm 191"></a></aside></h3><p>Empties out the atom specific languages and updates them according to the supplied atoms language holder.</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> |