35 lines
3.3 KiB
HTML
35 lines
3.3 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><base href="../../../"><link rel="stylesheet" href="dmdoc.css"><title>code/modules/language/language_holder.dm - /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></header><main><h1>code/modules/language/language_holder.dm <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/language/language_holder.dm0"><img src="git.png" width="16" height="16" title="code/modules/language/language_holder.dm0"></a></h1><table class="summary" cellspacing="0"><tr><td colspan="2"><p>Language holders will either exist in an atom/movable or a mind. Creation of language holders happens
|
|
automatically when they are needed, for example when something tries to speak.
|
|
Where a mind is available, the mind language holder will be the one "in charge". The mind holder
|
|
will update its languages based on the atom holder, and will get updated as part of
|
|
transformations and other events that cause new languages to become available.
|
|
Every language holder has three lists of languages (and sources for each of them):</p>
|
|
<ul>
|
|
<li>understood_languages</li>
|
|
<li>spoken_languages</li>
|
|
<li>blocked_languages
|
|
Understood languages let you understand them, spoken languages lets you speak them
|
|
(if your tongue is compatible), and blocked languages will let you do neither no matter
|
|
what the source of the language is.
|
|
Language holders are designed to mostly only ever require the use the helpers in atom/movable
|
|
to achieve your goals, but it is also possible to work on them directly if needed. Any adding
|
|
and removing of languages and sources should only happen through the procs, as directly changing
|
|
these will mess something up somewhere down the line.
|
|
All atom movables have the initial_language_holder var which allows you to set the default language
|
|
holder to create. For example, /datum/language_holder/alien will give you xenocommon and a block for
|
|
galactic common. Human species also have a default language holder var that will be updated on
|
|
species change, initial_species_holder.
|
|
Key procs</li>
|
|
</ul>
|
|
<ul>
|
|
<li><a href="atom/movable.html#proc/grant_language">grant_language</a></li>
|
|
<li><a href="atom/movable.html#proc/remove_language">remove_language</a></li>
|
|
<li><a href="atom/movable.html#proc/add_blocked_language">add_blocked_language</a></li>
|
|
<li><a href="atom/movable.html#proc/remove_blocked_language">remove_blocked_language</a></li>
|
|
<li><a href="atom/movable.html#proc/grant_all_languages">grant_all_languages</a></li>
|
|
<li><a href="atom/movable.html#proc/remove_all_languages">remove_all_languages</a></li>
|
|
<li><a href="atom/movable.html#proc/has_language">has_language</a></li>
|
|
<li><a href="atom/movable.html#proc/can_speak_language">can_speak_language</a></li>
|
|
<li><a href="atom/movable.html#proc/get_selected_language">get_selected_language</a></li>
|
|
<li><a href="atom/movable.html#proc/update_atom_languages">update_atom_languages</a></li>
|
|
</ul></td></tr></table></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> |