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.
-
do_replacements
string do_replacements(string mess)
Remove "ne1" and suchlike
-
fix_shorthand
string fix_shorthand(string mess)
-
garble_say
mixed garble_say(string lang,
string start,
string mess,
object player,
object from,
string type)
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.
- Parameters:
lang - the language spoken in
start - the start bit
mess - the message itself
player - the player hearing
from - the player speaking
type - 'say', 'tell', 'shout' etc
- Returns:
an array ({ start, mess })
-
garble_text
string garble_text(string lang,
mixed text,
object thing,
object player)
Garble written text. This is the same as garble_say, but it works on
written text.
- Parameters:
lang - the language written in
text - the text which has been written
thing - the thing which is written on
player - the player doing the reading
- Returns:
the garbled text as a string
-
garble_text_say
string garble_text_say(string text,
string language,
object player)
This is a garble to use for inanimate objects that speak. This
garble works with only the player, language and text.
- Parameters:
text - the text to garble
language - the language to garble with
player - the person listening to the message
-
query_flags
int query_flags(string name)
Return all the flags for the language.
- Parameters:
name - the language to get the flags of
- Returns:
all the flags
- See also:
/include/language.h
-
query_garble_object
string query_garble_object(string name)
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.
- Parameters:
name - the language to get the garble object for
- Returns:
the garble object
-
query_language_always_spoken
int query_language_always_spoken(string str)
Determine if the language is always able to be spoken.
- Parameters:
str - the language name to test
- Returns:
1 if the language is spoken, 0 if it is not
-
query_language_distance
int query_language_distance(string str)
Determine if the language is spoken.
Distance languages can be used with tell and shout.
- Parameters:
str - the language name to test
- Returns:
1 if it is distance language, 0 if it is not
-
query_language_magic
int query_language_magic(string str)
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.
- Parameters:
str - the language to test
- Returns:
1 if it is magical, 0 if it is not
-
query_language_size
int query_language_size(string str)
The size of the language. Some languages have bigger letters
and stuff than others.
- Parameters:
str - the language to get the size of
- Returns:
the size of each letter
-
query_language_spoken
int query_language_spoken(string str)
Determine if the language is spoken.
- Parameters:
str - the language name to test
- Returns:
1 if the language is spoken, 0 if it is not
-
query_language_spoken_skill
string query_language_spoken_skill(string lang)
The skill for the spoken language. This gets the skill name in the skill
tree for the spoken part of the language.
- Parameters:
lang - the language to get the skill of
- Returns:
the skill name
-
query_language_written
int query_language_written(string str)
Determine if the language is written.
- Parameters:
str - the language name to test
- Returns:
1 if the language is written, 0 if it is not
-
query_language_written_skill
string query_language_written_skill(string lang)
The skill for the written language. This gets the skill name in the skill
tree for the written part of the language.
- Parameters:
lang - the language to get the skill of
- Returns:
the skill name
-
query_languages
string * query_languages()
Names of all the languages.
- Returns:
the names of all the languages
-
test_language
int test_language(string str)
Determine if this is a language.
- Parameters:
str - the language to check
- Returns:
1 if it is a language, 0 if it s not