[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/room/inherit/player_housing.c</h2>
This is an inheritable for player-owned housing.<p>
It handles the internals for player housing. When creating a house you
should inherit "/std/room/player_housing" rather than this inheritable.
<p>Written by Belle, Gototh, Ceres
<h2>Inherits</h2>
This class inherits the following classes <a href="std.room.inherit.placement.c.shtml">/std/room/inherit/placement.c</a> and <a href="std.room.inherit.room_save.c.shtml">/std/room/inherit/room_save.c</a><h2>Includes</h2>
This class includes the following files <a href="include.player_handler.h.shtml">/include/player_handler.h</a>, <a href="include.housing.h.shtml">/include/housing.h</a>, <a href="include.dirs.h.shtml">/include/dirs.h</a> and <a href="include.login_handler.h.shtml">/include/login_handler.h</a><h2>Class Index</h2>
<ul><li><a href="#class_decoration">decoration</a>
<br/>
This class is used to store information on the decoration of this room (for
walls, floor etc.
<li><a href="#class_exit_data">exit_data</a>
<br/>
This class stores information that we need to save about exits.
<li><a href="#class_exit_shorts">exit_shorts</a>
<br/>
This class is used to cache short names for exits so we don't go loading
rooms all over the place.
</ul><h2>Method index</h2>
<dl><ul>
<li><a href="#add_allowed">add_allowed</a>(string)<br/>
This function adds a name to the allow list of this room.
<li><a href="#add_surface">add_surface</a>(string, string)<br/>
Add a surface (wall, floor etc.
<li><a href="#debug_log">debug_log</a>(string, mixed args)<br/>
This class is used to cache short names for exits so we don't go loading
rooms all over the place.
<li><a href="#decorate_surface">decorate_surface</a>(string, string)<br/>
Modify a surface (wall, floor etc.
<li><a href="#do_allow">do_allow</a>(object, string)<li><a href="#event_enter_checks">event_enter_checks</a>(object)<br/>
This method is used to setup things when someone enters the room.
<li><a href="#is_allowed">is_allowed</a>(string)<br/>
This method tells us if the person is allowed to use this room.
<li><a href="#ownership_change">ownership_change</a>(string, string)<br/>
This function informs the house that its owner has changed, it does not
actually change the owner since that is done in the handler.
<li><a href="#query_allowed">query_allowed</a>()<br/>
This method returns the current list of people allowed to modify this
room.
<li><a href="#query_base_desc">query_base_desc</a>()<br/>
Query the fixed part of the description.
<li><a href="#query_owner">query_owner</a>()<br/>
This method returns the current owner of the house.
<li><a href="#query_quit_handler">query_quit_handler</a>()<br/>
This method returns the room that people will be placed in if they logout
while in this room and not allowed to control this room.
<li><a href="#remove_allowed">remove_allowed</a>(string)<br/>
This function removes a name from the allow list of this room.
<li><a href="#set_base_desc">set_base_desc</a>(string)<br/>
Set the fixed part of the long description.
<li><a href="#set_owner">set_owner</a>(string)<br/>
This method locally sets the owner of the house.
<li><a href="#set_quit_handler">set_quit_handler</a>(string)<br/>
Set the room into which people should be placed if they quit in this room
but are not allowed to control this room.
<li><a href="#test_occupier">test_occupier</a>(string)<br/>
This function determines if a given individual can be considered to be the
occupier of this house.
</ul><h2>Public Functions</h2>
These are functions that everyone can access.<p>
.<ul><a name="add_allowed">
add_allowed</a><pre>
int add_allowed(string pname)
</pre></br>
This function adds a name to the allow list of this room.

<br/><ul>
<li><b>Parameters:</b>
<br/>pname - The name of a player.
<li><b>Returns:</b>
<br/>1 for success, 0 for failure

</dl>

<ul><a name="add_surface">
add_surface</a><pre>
void add_surface(string short,
                 string covering)
</pre></br>
Add a surface (wall, floor etc.) and give the basic covering the surface
has prior to decoration.

<br/><ul>
<li><b>Parameters:</b>
<br/>short - The short name of the surface (eg. north wall)
<br/>covering - The text of the covering (eg. finished pine board)

</dl>

<ul><a name="debug_log">
debug_log</a><pre>
void debug_log(string fmt,
               mixed args ...)
</pre></br>
This class is used to cache short names for exits so we don't go loading
rooms all over the place.


<ul><a name="decorate_surface">
decorate_surface</a><pre>
int decorate_surface(string short,
                     string covering)
</pre></br>
Modify a surface (wall, floor etc.) and give it a new covering.

<br/><ul>
<li><b>Parameters:</b>
<br/>short - The short of the surface.
<br/>covering - The new covering decsription.
<li><b>Returns:</b>
<br/>1 for success, 0 for failure

<li><b>See also:</b>
<br/>add_surface
.c</dl>

<ul><a name="do_allow">
do_allow</a><pre>
int do_allow(object player,
             string location)
</pre>
<ul><a name="is_allowed">
is_allowed</a><pre>
int is_allowed(string name)
</pre></br>
This method tells us if the person is allowed to use this room.
<br/><ul>
<li><b>Parameters:</b>
<br/>name - the name of the person

</dl>

<ul><a name="ownership_change">
ownership_change</a><pre>
int ownership_change(string old_owner,
                     string new_owner)
</pre></br>
This function informs the house that its owner has changed, it does not
actually change the owner since that is done in the handler.

<br/><ul>
<li><b>Parameters:</b>
<br/>old_owner - The name of the old owner
<br/>new_owner - The name of the new owner
<li><b>Returns:</b>
<br/>1 for success, 0 for failure.

</dl>

<ul><a name="query_allowed">
query_allowed</a><pre>
string * query_allowed()
</pre></br>
This method returns the current list of people allowed to modify this
room.
<br/><ul>
<li><b>Returns:</b>
<br/>the allowed people to change this room

</dl>

<ul><a name="query_base_desc">
query_base_desc</a><pre>
string query_base_desc()
</pre></br>
Query the fixed part of the description.
<br/><ul>
<li><b>Returns:</b>
<br/>the description

<li><b>See also:</b>
<br/>set_base_desc
.c</dl>

<ul><a name="query_owner">
query_owner</a><pre>
string query_owner()
</pre></br>
This method returns the current owner of the house.


<ul><a name="query_quit_handler">
query_quit_handler</a><pre>
string query_quit_handler()
</pre></br>
This method returns the room that people will be placed in if they logout
while in this room and not allowed to control this room.
<br/><ul>
<li><b>Returns:</b>
<br/>string the filename of the room.

<li><b>See also:</b>
<br/>set_quit_handler.c</dl>

<ul><a name="remove_allowed">
remove_allowed</a><pre>
int remove_allowed(string pname)
</pre></br>
This function removes a name from the allow list of this room.

<br/><ul>
<li><b>Parameters:</b>
<br/>pname - The name of a player.
<li><b>Returns:</b>
<br/>1 for success, 0 for failure

</dl>

<ul><a name="set_base_desc">
set_base_desc</a><pre>
void set_base_desc(string desc)
</pre></br>
Set the fixed part of the long description.
<br/><ul>
<li><b>Parameters:</b>
<br/>desc - The description. (eg. a small and cosy front room)

</dl>

<ul><a name="set_owner">
set_owner</a><pre>
string set_owner(string who)
</pre></br>
This method locally sets the owner of the house.


<ul><a name="set_quit_handler">
set_quit_handler</a><pre>
void set_quit_handler(string filename)
</pre></br>
Set the room into which people should be placed if they quit in this room
but are not allowed to control this room.

<br/><ul>
<li><b>Parameters:</b>
<br/>filename - the filename of a room.

</dl>

<ul><a name="test_occupier">
test_occupier</a><pre>
int test_occupier(string name)
</pre></br>
This function determines if a given individual can be considered to be the
occupier of this house. Normally this means the person currently renting or
owning this house.

For shared ownership houses simply mask this function and do whatever you
have to. :)

<br/><ul>
<li><b>Parameters:</b>
<br/>name - The person to be tested
<li><b>Returns:</b>
<br/>1 if they are the occupier, 0 if not.

</dl>


<h2>Protected Functions</h2>
These are functions that only objects inheriting the class can access.<p>
<ul><a name="event_enter_checks">
event_enter_checks</a><pre>
void event_enter_checks(object ob)
</pre></br>
This method is used to setup things when someone enters the room.
<br/><ul>
<li><b>Parameters:</b>
<br/>ob - the object that entered the room

</dl>


<h2>Classes</h2>
These are nice data types for dealing with...  Data!<p>
<ul>
<li><a name="class_decoration">
decoration</a><pre>
class decoration {
                   string short;
                   string covering;
}

</pre><br/>
This class is used to store information on the decoration of this room (for
walls, floor etc.)
<p>

<li><a name="class_exit_data">
exit_data</a><pre>
class exit_data {
                  string long;
                  string key;
                  int difficulty;
                  int closed;
                  int locked;
                  int autolock;
                  int transparent;
                  mixed trap_data;
}

</pre><br/>
This class stores information that we need to save about exits.  For example
if the player has changed the lock or added a trap.
<p>

<li><a name="class_exit_shorts">
exit_shorts</a><pre>
class exit_shorts {
                    string one_short;
                    string a_short;
}

</pre><br/>
This class is used to cache short names for exits so we don't go loading
rooms all over the place.
<p>

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

