[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/new_soul.c</h2>
The soul handler for Discworld.  Handles the soul definitions and
the mangling needed to print the output for the players.
<p>Written by Pinkfish
<h2>Includes</h2>
This class includes the following files /include/soul.h, /include/obj_parser.h, /include/user_parser.h, /include/playtesters.h and /include/player.h<h2>Method index</h2>
<ul>
<li><a href="#add_soul_command">add_soul_command</a>(string, mixed)<br/>
Adds in a soul command.
<li><a href="#clean_cache">clean_cache</a>()<li><a href="#command_control">command_control</a>(string, object *, string, string, string *, string)<br/>
The main soul handling bit.
<li><a href="#delete_soul_command">delete_soul_command</a>(string)<br/>
Deletes the soul command.
<li><a href="#do_force">do_force</a>(mixed *)<br/>
Attempts to do the force on the player.
<li><a href="#extract_filenames">extract_filenames</a>(string)<li><a href="#get_name">get_name</a>(object, int, int)<li><a href="#get_souls">get_souls</a>(string, int)<br/>
This method gets an array of souls of the desired category.
<li><a href="#help_list">help_list</a>()<br/>
The list of soul comands in the look at soul function.
<li><a href="#help_string">help_string</a>(string)<br/>
Returns the help string for the soul command.
<li><a href="#is_soul_in_category">is_soul_in_category</a>(string, string)<br/>
Figures out if the specified soul is in the specified category.
<li><a href="#load_it">load_it</a>()<br/>
Loads the previous state of the soul object off the disc.
<li><a href="#query_categories_for_soul">query_categories_for_soul</a>(string)<br/>
This returns the categories associated with the specific soul command.
<li><a href="#query_main_soul_categories">query_main_soul_categories</a>()<br/>
This method queries all the categories of souls.
<li><a href="#query_pcache_size">query_pcache_size</a>()<li><a href="#query_scache_size">query_scache_size</a>()<li><a href="#query_soul_command">query_soul_command</a>(string)<br/>
This returns the arrays that are used by the pattern
matcher in the player object.
<li><a href="#query_soul_command_data">query_soul_command_data</a>(string)<br/>
Used internally to get the soul command data.
<li><a href="#query_soul_command_stuff">query_soul_command_stuff</a>(string)<br/>
Returns the data associated with soul command.
<li><a href="#query_soul_commands">query_soul_commands</a>()<br/>
The name of all the soul commands.
<li><a href="#query_soul_stats">query_soul_stats</a>()<li><a href="#query_synonym">query_synonym</a>(string)<br/>
Find the synonyms for this specific synonym category.
<li><a href="#query_synonym_categories">query_synonym_categories</a>()<br/>
This mehod returns the synonyms for the categories.
<li><a href="#save_it">save_it</a>()<br/>
Saves the current state of the soul object.
<li><a href="#set_soul_category">set_soul_category</a>(string, string *)<br/>
Set the categories for the specified soul command.
<li><a href="#test_file">test_file</a>(string)<li><a href="#www_string">www_string</a>(string)<br/>
Returns a web formatted version of the help string for the soul command.
</ul>
<h2>Public Functions</h2>
These are functions that everyone can access.<p>
<dl>
<dt class="autodocfuncname"><a name="add_soul_command">
add_soul_command</a><pre class="autodocfuncdef">
void add_soul_command(string name,
                      mixed data)
</pre><dd><br />
Adds in a soul command.  Only allows additions from
the soul compiler.
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
name - the name of the soul command<br />
data - the data associated with the soul command
<br />
<br />
<dd><b>See also:</b>
<br /><a href="obj.handlers.soul_compiler.c.shtml">/obj/handlers/soul_compiler.c</a><br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="clean_cache">
clean_cache</a><pre class="autodocfuncdef">
void clean_cache()
</pre>
<dt class="autodocfuncname"><a name="command_control">
command_control</a><pre class="autodocfuncdef">
int command_control(string verb,
                    object * obs,
                    string str,
                    string in_dir_match,
                    string * args,
                    string pattern)
</pre><dd><br />
The main soul handling bit.  This is called by the add_command code
when a soul command is matched.
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
verb - the verb matched<br />
obs - the objects to do the soul command on<br />
in_dir_match - the name which was matched for the peoples names<br />
args - the values of the string and stuff<br />
pattern - the pattern which was matched.<br />
<br />
<dd><b>Returns:</b>
<br />1 if the command succeeded, 0 if it failed
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="delete_soul_command">
delete_soul_command</a><pre class="autodocfuncdef">
void delete_soul_command(string name)
</pre><dd><br />
Deletes the soul command.  This is used to remove soul commands
that are no longer used.
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
name - the soul command name to delete
<br />
<br />
<br /></dl>

<dt class="autodocfuncname"><a name="do_force">
do_force</a><pre class="autodocfuncdef">
void do_force(mixed * arr)
</pre><dd><br />
Attempts to do the force on the player.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
arr - the args used to force
<br />
<br />
<br /></dl>

<dt class="autodocfuncname"><a name="extract_filenames">
extract_filenames</a><pre class="autodocfuncdef">
string * extract_filenames(string str)
</pre>
<dt class="autodocfuncname"><a name="get_name">
get_name</a><pre class="autodocfuncdef">
string get_name(object ob,
                int use_name,
                int type)
</pre>
<dt class="autodocfuncname"><a name="get_souls">
get_souls</a><pre class="autodocfuncdef">
string * get_souls(string category,
                   int a_r_t_w)
</pre><dd><br />
This method gets an array of souls of the desired category.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
category - The category of souls. You can choose either sub categories
 like "happiness_laugh" or full categories like "happiness". A list can be
 seen with query_soul_categories(). There are a few special categories not
 listed including "touch", "nice" and "nasty".<br />
a_r_t_w - Set this to 1 if you want the souls to have the "@" in
 front that they need for an add_respond_to_with, and 0 for just the
 souls.<br />
<br />
<dd><b>Returns:</b>
<br />An array of the souls matching the category.<br /><br />
<dd><b>See also:</b>
<br />query_soul_categories.c, get_words.c and query_word_categories
.c<br /><br /><dd><b>Example:</b>
<br/><pre> string *souls;

 souls = ("/obj/handlers/soul_categories")->get_souls( "laughter", 1 );

 if( sizeof( souls ) ) {
   add_respond_to_with( ({ souls }), "you" }), "'Stop laughing at me!" );
 }</pre><br /></dl>

<dt class="autodocfuncname"><a name="help_list">
help_list</a><pre class="autodocfuncdef">
string help_list()
</pre><dd><br />
The list of soul comands in the look at soul function.
<br />
<br /><dl>
<dd><b>Returns:</b>
<br />the list of all the soul commands formated for the screen
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="help_string">
help_string</a><pre class="autodocfuncdef">
string help_string(string verb)
</pre><dd><br />
Returns the help string for the soul command.  Creates a nice help
message for the passed soul command.
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
verb - the soul command to get help on<br />
<br />
<dd><b>Returns:</b>
<br />the soul command help string
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="is_soul_in_category">
is_soul_in_category</a><pre class="autodocfuncdef">
int is_soul_in_category(string soul,
                        string category)
</pre><dd><br />
Figures out if the specified soul is in the specified category.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
soul - the soul to find the category<br />
category - the category to check in<br />
<br />
<dd><b>Returns:</b>
<br />1 if it is in the category, 0 if not
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="load_it">
load_it</a><pre class="autodocfuncdef">
void load_it()
</pre><dd><br />
Loads the previous state of the soul object off the disc.
<br />

<dt class="autodocfuncname"><a name="query_categories_for_soul">
query_categories_for_soul</a><pre class="autodocfuncdef">
string * query_categories_for_soul(string soul)
</pre><dd><br />
This returns the categories associated with the specific soul command.
It return an empty array if the soul command is not found, or there
are no categories associated with it.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
soul - the soul to lookup<br />
<br />
<dd><b>Returns:</b>
<br />the categories associated with the command
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_main_soul_categories">
query_main_soul_categories</a><pre class="autodocfuncdef">
string * query_main_soul_categories()
</pre><dd><br />
This method queries all the categories of souls.<br />
<br /><dl>
<dd><b>Returns:</b>
<br />An array of all soul categories.<br /><br />
<dd><b>See also:</b>
<br />get_souls
.c<br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="query_pcache_size">
query_pcache_size</a><pre class="autodocfuncdef">
int query_pcache_size()
</pre>
<dt class="autodocfuncname"><a name="query_scache_size">
query_scache_size</a><pre class="autodocfuncdef">
int query_scache_size()
</pre>
<dt class="autodocfuncname"><a name="query_soul_command">
query_soul_command</a><pre class="autodocfuncdef">
mixed * query_soul_command(string name)
</pre><dd><br />
This returns the arrays that are used by the pattern
matcher in the player object. Called from inside add_command interface.
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
name - the souul command name to find<br />
<br />
<dd><b>Returns:</b>
<br />0 if no command found, otherwise an array of patterns<br /><br />
<dd><b>See also:</b>
<br /><a href="global.new_parse.c.shtml#add_command">/global/new_parse->add_command()
</a><br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="query_soul_command_stuff">
query_soul_command_stuff</a><pre class="autodocfuncdef">
mixed * query_soul_command_stuff(string str)
</pre><dd><br />
Returns the data associated with soul command.
Probably not very useful, but useful for debugging.
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
str - the soul command to get the data for<br />
<br />
<dd><b>Returns:</b>
<br />the data associated with the soul command
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_soul_commands">
query_soul_commands</a><pre class="autodocfuncdef">
string * query_soul_commands()
</pre><dd><br />
The name of all the soul commands.
<br />
<br /><dl>
<dd><b>Returns:</b>
<br />an array containing the names of all the soul commands
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_soul_stats">
query_soul_stats</a><pre class="autodocfuncdef">
string query_soul_stats()
</pre>
<dt class="autodocfuncname"><a name="query_synonym">
query_synonym</a><pre class="autodocfuncdef">
string * query_synonym(string cat)
</pre><dd><br />
Find the synonyms for this specific synonym category.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
cat - the synonym category to look for<br />
<br />
<dd><b>Returns:</b>
<br />the synonym categories
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_synonym_categories">
query_synonym_categories</a><pre class="autodocfuncdef">
string * query_synonym_categories()
</pre><dd><br />
This mehod returns the synonyms for the categories.<br />
<br /><dl>
<dd><b>Returns:</b>
<br />the synonym stuff
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="save_it">
save_it</a><pre class="autodocfuncdef">
void save_it()
</pre><dd><br />
Saves the current state of the soul object.
<br />

<dt class="autodocfuncname"><a name="set_soul_category">
set_soul_category</a><pre class="autodocfuncdef">
void set_soul_category(string soul,
                       string * cats)
</pre><dd><br />
Set the categories for the specified soul command.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
soul - the soul command the categories are for<br />
categories - the categories of the soul command
<br />
<br />
<br /></dl>

<dt class="autodocfuncname"><a name="test_file">
test_file</a><pre class="autodocfuncdef">
int test_file(string str)
</pre>
<dt class="autodocfuncname"><a name="www_string">
www_string</a><pre class="autodocfuncdef">
string www_string(string verb)
</pre><dd><br />
Returns a web formatted version of the help string for the soul command.
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
verb - the soul command to get help on<br />
<br />
<dd><b>Returns:</b>
<br />the soul command help string
<br /><br />
<br /></dl>

</dl>
<h2>Protected Functions</h2>
These are functions that only objects inheriting the class can access.<p>
<dl>
<dt class="autodocfuncname"><a name="query_soul_command_data">
query_soul_command_data</a><pre class="autodocfuncdef">
mixed * query_soul_command_data(string str)
</pre><dd><br />
Used internally to get the soul command data.
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
str - the soul command to get data for<br />
<br />
<dd><b>Returns:</b>
<br />the soul command data<br /><br />
<dd><b>See also:</b>
<br /><a href="#query_soul_command_stuff">query_soul_command_stuff()
</a><br /><br /><br /></dl>

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

