[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/options_handler.c</h2>
This handler deals will the options a player has.  It will return the
list of options, set options and control how the options can be
set.<p>Written by Pinkfish<p>Started Thu Jun  8 17:13:47 PDT 2000
<h2>Includes</h2>
This class includes the following files /include/error_handler.h, /include/ls.h, /include/cmds/options.h, /include/cmds/teach.h, /include/terrain_map.h, /include/creator.h, /include/top_ten_tables.h, /include/obj_parser.h, /include/localtime.h, /include/player.h, /include/am_time.h, /include/colour.h, /include/newbiehelpers.h, /include/options_handler.h, /include/clubs.h and /include/playtesters.h<h2>Method index</h2>
<ul>
<li><a href="#add_option">add_option</a>(string, mixed, int, function, function, string)<br/>
This method adds in an option for the player to be able to set.
<li><a href="#add_option_to_mapping">add_option_to_mapping</a>(mapping, string, mixed, int, function, function, string)<br/>
This method adds in an option for the player to be able to set to
a mapping.
<li><a href="#convert_birthday">convert_birthday</a>(string)<li><a href="#is_option">is_option</a>(object, string)<br/>
This method checks to see if the specified option path exists.
<li><a href="#is_option_group">is_option_group</a>(object, string)<br/>
This method checks to see if the specified option group path exists.
<li><a href="#query_all_options">query_all_options</a>()<li><a href="#query_option_behaviour">query_option_behaviour</a>(object, string)<br/>
This function returns the types of the options in this category.
<li><a href="#query_option_help">query_option_help</a>(object, string)<br/>
This method returns the help string of the specified option.
<li><a href="#query_option_value">query_option_value</a>(object, string)<br/>
This method returns the value of the specified option.
<li><a href="#query_option_values">query_option_values</a>(object, string)<br/>
This method returns the different values this option can be
set to.
<li><a href="#query_sub_options">query_sub_options</a>(object, string)<br/>
This method returns all the sub options and option groups at this
level.
<li><a href="#set_option_value">set_option_value</a>(object, string, string)<br/>
This method sets an option value on the player.
<li><a href="#set_timezone_name">set_timezone_name</a>(object, string)<li><a href="#set_timezone_offset">set_timezone_offset</a>(object, float)<li><a href="#valid_birthday">valid_birthday</a>(object, string)</ul>
<h2>Public Functions</h2>
These are functions that everyone can access.<p>
<dl>
<dt class="autodocfuncname"><a name="convert_birthday">
convert_birthday</a><pre class="autodocfuncdef">
string convert_birthday(string str)
</pre>
<dt class="autodocfuncname"><a name="is_option">
is_option</a><pre class="autodocfuncdef">
int is_option(object player,
string name)
</pre><dd><br />
This method checks to see if the specified option path exists.  This
will only return true if it is an actual option, not an option group.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
player - the player this is relative to<br />
name - the option path to check<br />
<br />
<dd><b>Returns:</b>
<br />1 if it is an option, 0 if not
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="is_option_group">
is_option_group</a><pre class="autodocfuncdef">
int is_option_group(object player,
string name)
</pre><dd><br />
This method checks to see if the specified option group path exists.  This
will only return true if it is an option group, not an actual option.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
player - the player this is relative to<br />
name - the option path to check<br />
<br />
<dd><b>Returns:</b>
<br />1 if it is an option group, 0 if not
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_all_options">
query_all_options</a><pre class="autodocfuncdef">
mapping query_all_options()
</pre>
<dt class="autodocfuncname"><a name="query_option_behaviour">
query_option_behaviour</a><pre class="autodocfuncdef">
mixed query_option_behaviour(object player,
string name)
</pre><dd><br />
This function returns the types of the options in this category.  It should
correspond to the value returned by query_option_values().<br />
<br /><dl>
<dd><b>Parameters:</b><br />
player - the player this is relative to<br />
name - the name of the option<br />
<br />
<dd><b>Returns:</b>
<br />the allowed parameters
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_option_help">
query_option_help</a><pre class="autodocfuncdef">
string query_option_help(object player,
string path)
</pre><dd><br />
This method returns the help string of the specified option.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
player - the player to find the value on<br />
path - the path to the option
<br />
<br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_option_value">
query_option_value</a><pre class="autodocfuncdef">
string query_option_value(object player,
string path)
</pre><dd><br />
This method returns the value of the specified option.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
player - the player to find the value on<br />
path - the path to the option
<br />
<br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_option_values">
query_option_values</a><pre class="autodocfuncdef">
string * query_option_values(object player,
string name)
</pre><dd><br />
This method returns the different values this option can be
set to.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
player - the player this is relative to<br />
name - the name of the option<br />
<br />
<dd><b>Returns:</b>
<br />the allowed parameters
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_sub_options">
query_sub_options</a><pre class="autodocfuncdef">
string * query_sub_options(object player,
string name)
</pre><dd><br />
This method returns all the sub options and option groups at this
level.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
player - the player this is relative to<br />
name - the path to return the suboptions of<br />
<br />
<dd><b>Returns:</b>
<br />the sub options of the path
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="set_option_value">
set_option_value</a><pre class="autodocfuncdef">
int set_option_value(object player,
string path,
string value)
</pre><dd><br />
This method sets an option value on the player.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
player - the player to find the value on<br />
path - the path to the option<br />
value - the value directly from the command line
<br />
<br />
<br /></dl>

<dt class="autodocfuncname"><a name="set_timezone_name">
set_timezone_name</a><pre class="autodocfuncdef">
int set_timezone_name(object player,
string tz_name)
</pre>
<dt class="autodocfuncname"><a name="set_timezone_offset">
set_timezone_offset</a><pre class="autodocfuncdef">
int set_timezone_offset(object player,
float tz_offset)
</pre>
<dt class="autodocfuncname"><a name="valid_birthday">
valid_birthday</a><pre class="autodocfuncdef">
int valid_birthday(object person,
string str)
</pre>
</dl>
<h2>Protected Functions</h2>
These are functions that only objects inheriting the class can access.<p>
<dl>
<dt class="autodocfuncname"><a name="add_option">
add_option</a><pre class="autodocfuncdef">
int add_option(string name,
mixed type,
int cre_only,
function set_function,
function query_function,
string help)
</pre><dd><br />
This method adds in an option for the player to be able to set.
The set function will be called with two parameters, the value to
set it to and the variable being set.  The set function must return
1 if the value was successfuly set.
<p>
int set_function(variable, value);<br />
<br /><dl>
<dd><b>Parameters:</b><br />
name - the name of the option eg: "output look" <br />
type - the type of the option eg: OPTIONS_TYPE_BRIEF<br />
cre_only - 1 if cre only, 0 if available for all<br />
set_function - the function to call to set the option<br />
query_function - the function to call to query the option<br />
help - a short notice to what the option manipulates<br />
<br />
<dd><b>Returns:</b>
<br />1 if successful, 0 if not
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="add_option_to_mapping">
add_option_to_mapping</a><pre class="autodocfuncdef">
void add_option_to_mapping(mapping array,
string name,
mixed type,
int cre_only,
function set_function,
function query_function,
string help)
</pre><dd><br />
This method adds in an option for the player to be able to set to
a mapping.  This method should be used by all the dynamic tree
methods to create leaves.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
array - the mapping to add the elements to<br />
path - the path to the option eg: ({ "output", "look" })<br />
type - the type of the option eg: OPTIONS_TYPE_BRIEF<br />
set_function - the function to call to set the option<br />
query_function - the function to call to query the option<br />
<br />
<dd><b>Returns:</b>
<br />1 if successful, 0 if not
<br /><br />
<br /></dl>

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

