[an error occurred while processing this directive]
[<a href="index.shtml">Package Index</a></code> | <a href="index_std.shtml">Mudlib Index</a></code> | <a href="index_eff.shtml">Effect Index</a></code>]<br><h2>File /obj/handlers/languages.c</h2>
The language handler.  This will keep track of the info on languages
Each language can be a written language a spoken language and have
a garble object.
<p>
The function garble_say, garble_tell, garble_shout and
garble_written should be defined on the garbling object.
They should return the entire string to print.  So if the
routine returns 0 nothing is printed.
<p>Written by Pinkfish
<h2>Includes</h2>
This class includes the following files /include/language.h<h2>Method index</h2>
<ul>
<li><a href="#do_replacements">do_replacements</a>(string)<br/>
Remove "ne1" and suchlike

<li><a href="#fix_shorthand">fix_shorthand</a>(string)<li><a href="#garble_say">garble_say</a>(string, string, string, object, object, string)<br/>
This garbles a say.
<li><a href="#garble_text">garble_text</a>(string, mixed, object, object)<br/>
Garble written text.
<li><a href="#garble_text_say">garble_text_say</a>(string, string, object)<br/>
This is a garble to use for inanimate objects that speak.
<li><a href="#query_flags">query_flags</a>(string)<br/>
Return all the flags for the language.
<li><a href="#query_garble_object">query_garble_object</a>(string)<br/>
Figure out the garble object.
<li><a href="#query_language_always_spoken">query_language_always_spoken</a>(string)<br/>
Determine if the language is always able to be spoken.
<li><a href="#query_language_distance">query_language_distance</a>(string)<br/>
Determine if the language is spoken.
<li><a href="#query_language_magic">query_language_magic</a>(string)<br/>
Determine if it is a magical language.
<li><a href="#query_language_size">query_language_size</a>(string)<br/>
The size of the language.
<li><a href="#query_language_spoken">query_language_spoken</a>(string)<br/>
Determine if the language is spoken.
<li><a href="#query_language_spoken_skill">query_language_spoken_skill</a>(string)<br/>
The skill for the spoken language.
<li><a href="#query_language_written">query_language_written</a>(string)<br/>
Determine if the language is written.
<li><a href="#query_language_written_skill">query_language_written_skill</a>(string)<br/>
The skill for the written language.
<li><a href="#query_languages">query_languages</a>()<br/>
Names of all the languages.
<li><a href="#test_language">test_language</a>(string)<br/>
Determine if this is a language.
</ul>
<h2>Public Functions</h2>
These are functions that everyone can access.<p>
<dl>
<dt class="autodocfuncname"><a name="do_replacements">
do_replacements</a><pre class="autodocfuncdef">
string do_replacements(string mess)
</pre><dd><br />
Remove "ne1" and suchlike
<br />

<dt class="autodocfuncname"><a name="fix_shorthand">
fix_shorthand</a><pre class="autodocfuncdef">
string fix_shorthand(string mess)
</pre>
<dt class="autodocfuncname"><a name="garble_say">
garble_say</a><pre class="autodocfuncdef">
mixed garble_say(string lang,
                 string start,
                 string mess,
                 object player,
                 object from,
                 string type)
</pre><dd><br />
This garbles a say.  Called from the events class to garble the text
that players see.  This looks up the garble object and calls the
correct function on it.  The returned array contains the
garbled start and message.
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
lang - the language spoken in<br />
start - the start bit<br />
mess - the message itself<br />
player - the player hearing<br />
from - the player speaking<br />
type - 'say', 'tell', 'shout' etc<br />
<br />
<dd><b>Returns:</b>
<br />an array <code>({ start, mess })</code>
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="garble_text">
garble_text</a><pre class="autodocfuncdef">
string garble_text(string lang,
                   mixed text,
                   object thing,
                   object player)
</pre><dd><br />
Garble written text.  This is the same as garble_say, but it works on
written text.
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
lang - the language written in<br />
text - the text which has been written<br />
thing - the thing which is written on<br />
player - the player doing the reading<br />
<br />
<dd><b>Returns:</b>
<br />the garbled text as a string
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="garble_text_say">
garble_text_say</a><pre class="autodocfuncdef">
string garble_text_say(string text,
                       string language,
                       object player)
</pre><dd><br />
This is a garble to use for inanimate objects that speak.  This
garble works with only the player, language and text.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
text - the text to garble<br />
language - the language to garble with<br />
player - the person listening to the message
<br />
<br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_flags">
query_flags</a><pre class="autodocfuncdef">
int query_flags(string name)
</pre><dd><br />
Return all the flags for the language.
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
name - the language to get the flags of<br />
<br />
<dd><b>Returns:</b>
<br />all the flags<br /><br />
<dd><b>See also:</b>
<br />/include/language.h
<br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="query_garble_object">
query_garble_object</a><pre class="autodocfuncdef">
string query_garble_object(string name)
</pre><dd><br />
Figure out the garble object.  This returns the garble object for the
language.  The garble object is used to modify the text so that
player does not see plain text if they do not know the language.
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
name - the language to get the garble object for<br />
<br />
<dd><b>Returns:</b>
<br />the garble object
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_language_always_spoken">
query_language_always_spoken</a><pre class="autodocfuncdef">
int query_language_always_spoken(string str)
</pre><dd><br />
Determine if the language is always able to be spoken. 
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
str - the language name to test<br />
<br />
<dd><b>Returns:</b>
<br />1 if the language is spoken, 0 if it is not
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_language_distance">
query_language_distance</a><pre class="autodocfuncdef">
int query_language_distance(string str)
</pre><dd><br />
Determine if the language is spoken.
Distance languages can be used with tell and shout.
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
str - the language name to test<br />
<br />
<dd><b>Returns:</b>
<br />1 if it is distance language, 0 if it is not
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_language_magic">
query_language_magic</a><pre class="autodocfuncdef">
int query_language_magic(string str)
</pre><dd><br />
Determine if it is a magical language.
A magical langage gets a function called on it's object whenever it
is read even if the person knows the language.  It is also the language
spells are written in.
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
str - the language to test<br />
<br />
<dd><b>Returns:</b>
<br />1 if it is magical, 0 if it is not
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_language_size">
query_language_size</a><pre class="autodocfuncdef">
int query_language_size(string str)
</pre><dd><br />
The size of the language.  Some languages have bigger letters
and stuff than others.
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
str - the language to get the size of<br />
<br />
<dd><b>Returns:</b>
<br />the size of each letter 
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_language_spoken">
query_language_spoken</a><pre class="autodocfuncdef">
int query_language_spoken(string str)
</pre><dd><br />
Determine if the language is spoken. 
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
str - the language name to test<br />
<br />
<dd><b>Returns:</b>
<br />1 if the language is spoken, 0 if it is not
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_language_spoken_skill">
query_language_spoken_skill</a><pre class="autodocfuncdef">
string query_language_spoken_skill(string lang)
</pre><dd><br />
The skill for the spoken language.  This gets the skill name in the skill
tree for the spoken part of the language.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
lang - the language to get the skill of<br />
<br />
<dd><b>Returns:</b>
<br />the skill name
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_language_written">
query_language_written</a><pre class="autodocfuncdef">
int query_language_written(string str)
</pre><dd><br />
Determine if the language is written.
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
str - the language name to test<br />
<br />
<dd><b>Returns:</b>
<br />1 if the language is written, 0 if it is not
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_language_written_skill">
query_language_written_skill</a><pre class="autodocfuncdef">
string query_language_written_skill(string lang)
</pre><dd><br />
The skill for the written language.  This gets the skill name in the skill
tree for the written part of the language.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
lang - the language to get the skill of<br />
<br />
<dd><b>Returns:</b>
<br />the skill name
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_languages">
query_languages</a><pre class="autodocfuncdef">
string * query_languages()
</pre><dd><br />
Names of all the languages.<br />
<br /><dl>
<dd><b>Returns:</b>
<br />the names of all the languages
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="test_language">
test_language</a><pre class="autodocfuncdef">
int test_language(string str)
</pre><dd><br />
Determine if this is a language.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
str - the language to check
<br />
<br />
<dd><b>Returns:</b>
<br />1 if it is a language, 0 if it s not<br /><br />
<br /></dl>

</dl>
[an error occurred while processing this directive]

