[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/light.c</h2>
This method handles the light changing and control.<p>Written by Pinkfish<h2>Method index</h2>
<dl><ul>
<li><a href="#add_inform_light_change">add_inform_light_change</a>(object)<br/>
This method adds an object to be informed of light change events.
<li><a href="#adjust_light">adjust_light</a>(int)<br/>
This changes the current light level.
<li><a href="#inform_of_light_level_change">inform_of_light_level_change</a>(object)<br/>
This method tells all our environments that the light level has
changed.
<li><a href="#light_level_changed">light_level_changed</a>()<br/>
This method tells us that the light levels have changed and should
be recalculated when queried.
<li><a href="#new_recalc_light">new_recalc_light</a>()<br/>
This method forces a recalculation of the current light level in this
object.
<li><a href="#query_light">query_light</a>()<br/>
This returns the total light level of the object.
<li><a href="#query_light_needs_inform">query_light_needs_inform</a>()<li><a href="#query_my_light">query_my_light</a>()<br/>
This method returns the light associated with this object.
<li><a href="#query_opaque">query_opaque</a>()<br/>
This method checks to see if the object is opaque or not.
<li><a href="#remove_inform_light_change">remove_inform_light_change</a>(object)<br/>
This method removes an object from the current list of things to
be informed of a light change.
<li><a href="#reset_opaque">reset_opaque</a>()<br/>
This method makes the object transparent (default).
<li><a href="#set_light">set_light</a>(int)<br/>
This sets the current light level.
<li><a href="#set_opaque">set_opaque</a>()<br/>
This method makes this object opaque.
</ul><h2>Public Functions</h2>
These are functions that everyone can access.<p>
.<ul><a name="add_inform_light_change">
add_inform_light_change</a><pre>
void add_inform_light_change(object ob)
</pre></br>
This method adds an object to be informed of light change events.
<br/><ul>
<li><b>Parameters:</b>
<br/>ob - the object to be informed of light change events

</dl>

<ul><a name="adjust_light">
adjust_light</a><pre>
int adjust_light(int number)
</pre></br>
This changes the current light level. 
<br/><ul>
<li><b>Parameters:</b>
<br/>number - the amount to chage it by
<li><b>See also:</b>
<br/><a href="#set_light">set_light()</a>, <a href="#query_my_light">query_my_light()</a> and <a href="#query_light">query_light()
</a></dl>

<ul><a name="inform_of_light_level_change">
inform_of_light_level_change</a><pre>
void inform_of_light_level_change(object ob)
</pre></br>
This method tells all our environments that the light level has
changed.
<br/><ul>
<li><b>Parameters:</b>
<br/>ob - the object whose environment we should tell about the change
<li><b>See also:</b>
<br/><a href="#light_level_changed">light_level_changed()
</a></dl>

<ul><a name="light_level_changed">
light_level_changed</a><pre>
void light_level_changed()
</pre></br>
This method tells us that the light levels have changed and should
be recalculated when queried.
<br/><ul>
<li><b>See also:</b>
<br/><a href="#inform_of_light_level_change">inform_of_light_level_change()
</a></dl>

<ul><a name="new_recalc_light">
new_recalc_light</a><pre>
varargs void new_recalc_light()
</pre></br>
This method forces a recalculation of the current light level in this
object.


<ul><a name="query_light">
query_light</a><pre>
int query_light()
</pre></br>
This returns the total light level of the object.   This includes the
light levels of anything that happens to be inside us.
<br/><ul>
<li><b>Returns:</b>
<br/>current light level
<li><b>See also:</b>
<br/><a href="#query_my_light">query_my_light()</a> and <a href="#set_light">set_light()
</a></dl>

<ul><a name="query_light_needs_inform">
query_light_needs_inform</a><pre>
int query_light_needs_inform()
</pre>
<ul><a name="query_my_light">
query_my_light</a><pre>
int query_my_light()
</pre></br>
This method returns the light associated with this object.   This does
not count the light levels of anything inside us.


<ul><a name="query_opaque">
query_opaque</a><pre>
int query_opaque()
</pre></br>
This method checks to see if the object is opaque or not.
<br/><ul>
<li><b>Returns:</b>
<br/>1 if it is opaque, 0 if not

</dl>

<ul><a name="remove_inform_light_change">
remove_inform_light_change</a><pre>
void remove_inform_light_change(object ob)
</pre></br>
This method removes an object from the current list of things to
be informed of a light change.
<br/><ul>
<li><b>Parameters:</b>
<br/>ob - the object to remove from the inform list

</dl>

<ul><a name="reset_opaque">
reset_opaque</a><pre>
void reset_opaque()
</pre></br>
This method makes the object transparent (default).   This means that the
light from items inside does escape.
<br/><ul>
<li><b>See also:</b>
<br/><a href="#set_opaque">set_opaque()</a> and <a href="#set_light">set_light()
</a></dl>

<ul><a name="set_light">
set_light</a><pre>
int set_light(int number)
</pre></br>
This sets the current light level.   This method calls adjust_light() 
with the correct value to set the light level.
<BR><BR>
Light Levels:
<BR>
   Magically Darkened Room   0-
<BR>
   Absolutely Dark Room      0
<BR>
   Standard Dark Room        5
<BR>
   Dimly Lit Room            20
<BR>
   Mine Shaft with Candles   30
<BR>
   Partially Lit Room        50
<BR>
   Well Lit Room             60
<BR>
   Shaded Forest             60
<BR>
   Brightly Lit Room         80
<BR>
   Direct Sunlight           100
<BR>
   Explosion or flash        200+
<BR>
<br/><ul>
<li><b>Parameters:</b>
<br/>number - The new light level.
<li><b>See also:</b>
<br/><a href="#query_my_light">query_my_light()</a> and <a href="#query_light">query_light()
</a></dl>

<ul><a name="set_opaque">
set_opaque</a><pre>
void set_opaque()
</pre></br>
This method makes this object opaque.   This means that light does not
escpae from it.
<br/><ul>
<li><b>See also:</b>
<br/><a href="#not_obscured_object">not_obscured_object()</a> and <a href="#set_light">set_light()
</a></dl>


[an error occurred while processing this directive]

