[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 /std/basic/property.c</h2>
The property handling system.  This handles all the stuff to do with
properties.
<p>Written by Pinkfish<h2>Method index</h2>
<ul>
<li><a href="#add_properties">add_properties</a>(mapping)<br/>
Adds a mapping of properties in, instead of just one.
<li><a href="#add_property">add_property</a>(string, mixed, int)<br/>
Adds a property onto the object.
<li><a href="#query_is_timed_property">query_is_timed_property</a>(string)<br/>
Is this property value timed?
<li><a href="#query_properties">query_properties</a>()<br/>
returns a mapping with all the properties in it.
<li><a href="#query_property">query_property</a>(string)<br/>
Returns the value of the property.
<li><a href="#query_property_exists">query_property_exists</a>(string)<br/>
Does this property exist?
<li><a href="#query_property_stats">query_property_stats</a>(string)<br/>
Returns some facts about the property, in the format
({ Filename of object which added stat, time added, time expiring })

<li><a href="#query_property_time_left">query_property_time_left</a>(string)<br/>
If this is a timed property it returns the amount of time left.
<li><a href="#query_stats">query_stats</a>()<br/>
Return all property statistics

<li><a href="#query_timed_properties">query_timed_properties</a>()<br/>
Returns a mapping of all the timed properties.
<li><a href="#reload_player_properties">reload_player_properties</a>()<br/>
Fixes the times back up again after it has been loaded.
<li><a href="#remove_property">remove_property</a>(string)<br/>
Removes a property off the object.
<li><a href="#save_player_properties">save_player_properties</a>()<br/>
Updates the timeouts and stuff before saving the player object.
<li><a href="#set_properties">set_properties</a>(mapping)<br/>
Resets all properties
</ul>
<h2>Public Functions</h2>
These are functions that everyone can access.<p>
<dl>
<dt class="autodocfuncname"><a name="add_properties">
add_properties</a><pre class="autodocfuncdef">
void add_properties(mapping map)
</pre><dd><br />
Adds a mapping of properties in, instead of just one.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
map - the mapping of properties
<br />
<br />
<br /></dl>

<dt class="autodocfuncname"><a name="add_property">
add_property</a><pre class="autodocfuncdef">
varargs int add_property(string var,
                         mixed val,
                         int tim)
</pre><dd><br />
Adds a property onto the object.  Allows you to add a property
onto the current object.  You can also set a time for the property
to last.
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
var - the name of the property<br />
val - the value to give the property<br />
tim - the time before the property should time out
<br />
<br />
<dd><b>Returns:</b>
<br />1 if it succeeded, 0 if it failed.
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_is_timed_property">
query_is_timed_property</a><pre class="autodocfuncdef">
int query_is_timed_property(string str)
</pre><dd><br />
Is this property value timed?
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
str - the property to check
<br />
<br />
<dd><b>Returns:</b>
<br />1 if it is, 0 if not<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_properties">
query_properties</a><pre class="autodocfuncdef">
mapping query_properties()
</pre><dd><br />
returns a mapping with all the properties in it.
<br />
<br /><dl>
<dd><b>Returns:</b>
<br />a mapping of all the properties
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_property">
query_property</a><pre class="autodocfuncdef">
mixed query_property(string str)
</pre><dd><br />
Returns the value of the property.  This will return the current value
of the named property.
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
str - the property to find<br />
<br />
<dd><b>Returns:</b>
<br />the value of the property<br /><br />
<dd><b>See also:</b>
<br /><a href="#query_property_exists">query_property_exists(), query_is_timed_property(), 
query_property_time_left()
</a><br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="query_property_exists">
query_property_exists</a><pre class="autodocfuncdef">
int query_property_exists(string str)
</pre><dd><br />
Does this property exist?
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
str - the property to check<br />
<br />
<dd><b>Returns:</b>
<br />1 if the property exists, 0 if it does not
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_property_stats">
query_property_stats</a><pre class="autodocfuncdef">
mixed query_property_stats(string var)
</pre><dd><br />
Returns some facts about the property, in the format
({ Filename of object which added stat, time added, time expiring })
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
The - property statistics are wanted on<br />
<br />
<dd><b>Returns:</b>
<br />That stuff just mentioned.
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_property_time_left">
query_property_time_left</a><pre class="autodocfuncdef">
int query_property_time_left(string str)
</pre><dd><br />
If this is a timed property it returns the amount of time left.
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
str - the property name<br />
<br />
<dd><b>Returns:</b>
<br />the amount ot time left
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_stats">
query_stats</a><pre class="autodocfuncdef">
mapping query_stats()
</pre><dd><br />
Return all property statistics
<br />
<br /><dl>
<dd><b>Returns:</b>
<br />A mapping full of stats<br /><br />
<dd><b>See also:</b>
<br />query_property_stats
.c<br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="query_timed_properties">
query_timed_properties</a><pre class="autodocfuncdef">
mapping query_timed_properties()
</pre><dd><br />
Returns a mapping of all the timed properties.<br />
<br /><dl>
<dd><b>Returns:</b>
<br />a mapping of all the timed properties
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="remove_property">
remove_property</a><pre class="autodocfuncdef">
int remove_property(string var)
</pre><dd><br />
Removes a property off the object.  This removes the named property
from the object.
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
var - the name of the property<br />
<br />
<dd><b>Returns:</b>
<br />always returns 1
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="set_properties">
set_properties</a><pre class="autodocfuncdef">
void set_properties(mapping map)
</pre><dd><br />
Resets all properties<br />
<br /><dl>
<dd><b>Parameters:</b><br />
map - the mapping of properties
<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="reload_player_properties">
reload_player_properties</a><pre class="autodocfuncdef">
void reload_player_properties()
</pre><dd><br />
Fixes the times back up again after it has been loaded.
<br />

<dt class="autodocfuncname"><a name="save_player_properties">
save_player_properties</a><pre class="autodocfuncdef">
void save_player_properties()
</pre><dd><br />
Updates the timeouts and stuff before saving the player object.
<br />

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

