[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/transport_handler.c</h2>
A Transport Handler
<p>
This keeps track of transports unsurprisingly
<p>Written by Goldenthread/runtime<p>Started 16 Aug y2k2

<h2>Inherits</h2>
This class inherits the following classes /global/auto_load.c<h2>Includes</h2>
This class includes the following files /include/player_handler.h, /include/login.h, /include/move_failures.h, /include/login_handler.h and /include/npc/transport.h<h2>Method index</h2>
<ul>
<li><a href="#add_allowed_rider">add_allowed_rider</a>(int, string)<br/>
Adds a new rider as allowed to use the transport

<li><a href="#add_transport">add_transport</a>(object, string, mixed, string, string)<br/>
Registers a transport with the handler

<li><a href="#create_transport">create_transport</a>(int)<br/>
This creates the transport with a particular id

<li><a href="#query_allowed_riders">query_allowed_riders</a>(int)<br/>
Queries the riders allowed to use the transport associated with an id
number

<li><a href="#query_gender">query_gender</a>(int)<br/>
Queries the gender of the transport with a particular id number

<li><a href="#query_height_in_hands">query_height_in_hands</a>(int)<br/>
Queries the transport's height in hands associated with an id number

<li><a href="#query_inventory">query_inventory</a>(int)<br/>
Queries the paths of all the inventory of the transport

<li><a href="#query_owned_transports">query_owned_transports</a>(string)<br/>
Queries the transports owned by a particular player

<li><a href="#query_owner">query_owner</a>(int)<br/>
Queries the owner of the transport associated with an id number

<li><a href="#query_stabled">query_stabled</a>(int)<br/>
Returns the stabled time of the transport

<li><a href="#query_starting_location">query_starting_location</a>(int)<br/>
Queries the transport's starting location

<li><a href="#query_time_stabled">query_time_stabled</a>(int)<br/>
Returns the time the transport has been stabled in seconds

<li><a href="#query_transport_base_name">query_transport_base_name</a>(int)<br/>
Queries the transport base name

<li><a href="#query_transport_class">query_transport_class</a>(int)<br/>
Queries the class associated with an id number

<li><a href="#query_transport_coat">query_transport_coat</a>(int)<br/>
Queries the coat type associated with an id number

<li><a href="#query_transport_colour">query_transport_colour</a>(int)<br/>
Queries the transport colour associated with an id number

<li><a href="#query_transport_desc">query_transport_desc</a>(int)<br/>
Gets the basic desc of the transport

<li><a href="#query_transport_name">query_transport_name</a>(int)<br/>
Queries the transport name associated with an id number

<li><a href="#query_transport_type">query_transport_type</a>(int)<br/>
Queries the type of transport

<li><a href="#query_transports">query_transports</a>()<br/>
Queries the transports registered with the handler

<li><a href="#remove_allowed_rider">remove_allowed_rider</a>(int, string)<br/>
Removes a rider as allowed to use the transport

<li><a href="#remove_transport">remove_transport</a>(int)<br/>
Removes a transport from the handler

<li><a href="#set_allowed_riders">set_allowed_riders</a>(int, string *)<br/>
Sets the allowed riders for the transport

<li><a href="#set_not_stabled">set_not_stabled</a>(int)<br/>
Sets the stabled state of the transport to false.
<li><a href="#set_stabled">set_stabled</a>(int)<br/>
Sets the stabled state of the transport to true.
<li><a href="#set_starting_location">set_starting_location</a>(int, string)<br/>
Sets the transport's starting location

<li><a href="#set_transport_base_name">set_transport_base_name</a>(int, string)<br/>
Sets the transport name

<li><a href="#set_transport_colour">set_transport_colour</a>(int, string)<br/>
Sets the transport colour

<li><a href="#set_transport_owner">set_transport_owner</a>(int, string)<br/>
Sets the transport's owner

<li><a href="#set_transport_short">set_transport_short</a>(int)<br/>
Sets the short of the transport referenced by the id passed in

<li><a href="#toggle_stabled">toggle_stabled</a>(int)<br/>
Toggles the stabled state of the transport

</ul>
<h2>Public Functions</h2>
These are functions that everyone can access.<p>
<dl>
<dt class="autodocfuncname"><a name="add_allowed_rider">
add_allowed_rider</a><pre class="autodocfuncdef">
int add_allowed_rider(int trans_id,
                      string new_rider)
</pre><dd><br />
Adds a new rider as allowed to use the transport
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
trans_id - the id of the transport<br />
new_rider - the new addition to the allowed rider array
<br />
<br />
<dd><b>Returns:</b>
<br />1 on success and 0 on failure
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="add_transport">
add_transport</a><pre class="autodocfuncdef">
int add_transport(object ob,
                  string trans_name,
                  mixed trans_owner,
                  string col,
                  string coat)
</pre><dd><br />
Registers a transport with the handler
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
ob - the transport object<br />
trans_name - the name of the transport ( if set )<br />
trans_owner - the owner of the transport<br />
col - the transport colour<br />
coat - the type of coat the transport has<br />
<br />
<dd><b>Returns:</b>
<br />the id of the new transport
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="create_transport">
create_transport</a><pre class="autodocfuncdef">
object create_transport(int trans_id)
</pre><dd><br />
This creates the transport with a particular id
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
trans_id - the transport id<br />
<br />
<dd><b>Returns:</b>
<br />the transport object
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_allowed_riders">
query_allowed_riders</a><pre class="autodocfuncdef">
string * query_allowed_riders(int trans_id)
</pre><dd><br />
Queries the riders allowed to use the transport associated with an id
number
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
trans_id - the id number of the transport<br />
<br />
<dd><b>Returns:</b>
<br />the riders allowed to use the transport associated with the id
number
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_gender">
query_gender</a><pre class="autodocfuncdef">
int query_gender(int trans_id)
</pre><dd><br />
Queries the gender of the transport with a particular id number
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
trans_id - the id number of the transport<br />
<br />
<dd><b>Returns:</b>
<br />the transport gender
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_height_in_hands">
query_height_in_hands</a><pre class="autodocfuncdef">
string query_height_in_hands(int trans_id)
</pre><dd><br />
Queries the transport's height in hands associated with an id number
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
trans_id - the id number of the transport<br />
<br />
<dd><b>Returns:</b>
<br />the transport's height in hands associated with the id number
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_inventory">
query_inventory</a><pre class="autodocfuncdef">
string * query_inventory(int trans_id)
</pre><dd><br />
Queries the paths of all the inventory of the transport
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
trans_id - the id number of the transport<br />
<br />
<dd><b>Returns:</b>
<br />the transport's inventory
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_owned_transports">
query_owned_transports</a><pre class="autodocfuncdef">
class transport * query_owned_transports(string owner)
</pre><dd><br />
Queries the transports owned by a particular player
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
owner - the name of the player to query<br />
<br />
<dd><b>Returns:</b>
<br />the transports owned by the player
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_owner">
query_owner</a><pre class="autodocfuncdef">
string query_owner(int trans_id)
</pre><dd><br />
Queries the owner of the transport associated with an id number
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
trans_id - the id number of the transport<br />
<br />
<dd><b>Returns:</b>
<br />the owner of the transport associated with the id number
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_stabled">
query_stabled</a><pre class="autodocfuncdef">
int query_stabled(int trans_id)
</pre><dd><br />
Returns the stabled time of the transport
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
trans_id - the id of the transport<br />
<br />
<dd><b>Returns:</b>
<br />the stabled time: 0 if the transport is not stabled
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_starting_location">
query_starting_location</a><pre class="autodocfuncdef">
string query_starting_location(int trans_id)
</pre><dd><br />
Queries the transport's starting location
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
trans_id - the id of the transport<br />
<br />
<dd><b>Returns:</b>
<br />the starting location
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_time_stabled">
query_time_stabled</a><pre class="autodocfuncdef">
int query_time_stabled(int trans_id)
</pre><dd><br />
Returns the time the transport has been stabled in seconds
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
trans_id - the id of the transport<br />
<br />
<dd><b>Returns:</b>
<br />the time the transport has been stabled for
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_transport_base_name">
query_transport_base_name</a><pre class="autodocfuncdef">
string query_transport_base_name(int trans_id)
</pre><dd><br />
Queries the transport base name
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
trans_id - the id number of the transport<br />
<br />
<dd><b>Returns:</b>
<br />the transport base name
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_transport_class">
query_transport_class</a><pre class="autodocfuncdef">
class transport query_transport_class(int trans_id)
</pre><dd><br />
Queries the class associated with an id number
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
trans_id - the id number of the transport<br />
<br />
<dd><b>Returns:</b>
<br />the transport associated with the id number
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_transport_coat">
query_transport_coat</a><pre class="autodocfuncdef">
string query_transport_coat(int trans_id)
</pre><dd><br />
Queries the coat type associated with an id number
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
trans_id - the id number of the transport<br />
<br />
<dd><b>Returns:</b>
<br />the transport coat type associated with the id number
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_transport_colour">
query_transport_colour</a><pre class="autodocfuncdef">
string query_transport_colour(int trans_id)
</pre><dd><br />
Queries the transport colour associated with an id number
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
trans_id - the id number of the transport<br />
<br />
<dd><b>Returns:</b>
<br />the transport colour associated with the id number
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_transport_desc">
query_transport_desc</a><pre class="autodocfuncdef">
string query_transport_desc(int trans_id)
</pre><dd><br />
Gets the basic desc of the transport
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
trans_id - the id number<br />
<br />
<dd><b>Returns:</b>
<br />the basic desc
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_transport_name">
query_transport_name</a><pre class="autodocfuncdef">
string query_transport_name(int trans_id)
</pre><dd><br />
Queries the transport name associated with an id number
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
trans_id - the id number of the transport<br />
<br />
<dd><b>Returns:</b>
<br />the transport name associated with the id number
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_transport_type">
query_transport_type</a><pre class="autodocfuncdef">
string query_transport_type(int trans_id)
</pre><dd><br />
Queries the type of transport
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
trans_id - the id number of the transport<br />
<br />
<dd><b>Returns:</b>
<br />the transport type
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_transports">
query_transports</a><pre class="autodocfuncdef">
class transport * query_transports()
</pre><dd><br />
Queries the transports registered with the handler
<br />
<br /><dl>
<dd><b>Returns:</b>
<br />the transports registered with the handler
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="remove_allowed_rider">
remove_allowed_rider</a><pre class="autodocfuncdef">
int remove_allowed_rider(int trans_id,
                         string rider)
</pre><dd><br />
Removes a rider as allowed to use the transport
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
trans_id - the id of the transport<br />
new_rider_arr - the player to remove from the allowed rider array
<br />
<br />
<dd><b>Returns:</b>
<br />1 on success and 0 on failure
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="remove_transport">
remove_transport</a><pre class="autodocfuncdef">
int remove_transport(int trans_id)
</pre><dd><br />
Removes a transport from the handler
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
trans_id - the transport id to remove<br />
<br />
<dd><b>Returns:</b>
<br />1 on success and 0 on failure
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="set_allowed_riders">
set_allowed_riders</a><pre class="autodocfuncdef">
int set_allowed_riders(int trans_id,
                       string * new_rider_arr)
</pre><dd><br />
Sets the allowed riders for the transport
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
trans_id - the id of the transport<br />
new_rider_arr - the new array of allowed riders
<br />
<br />
<dd><b>Returns:</b>
<br />1 on success and 0 on failure
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="set_not_stabled">
set_not_stabled</a><pre class="autodocfuncdef">
void set_not_stabled(int trans_id)
</pre><dd><br />
Sets the stabled state of the transport to false.
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
trans_id - the id of the transport
<br />
<br />
<br /></dl>

<dt class="autodocfuncname"><a name="set_stabled">
set_stabled</a><pre class="autodocfuncdef">
void set_stabled(int trans_id)
</pre><dd><br />
Sets the stabled state of the transport to true.
The stabled state holds the time of stabling
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
trans_id - the id of the transport
<br />
<br />
<br /></dl>

<dt class="autodocfuncname"><a name="set_starting_location">
set_starting_location</a><pre class="autodocfuncdef">
void set_starting_location(int trans_id,
                           string loc)
</pre><dd><br />
Sets the transport's starting location
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
trans_id - the id of the transport<br />
loc - the location to start in
<br />
<br />
<br /></dl>

<dt class="autodocfuncname"><a name="set_transport_base_name">
set_transport_base_name</a><pre class="autodocfuncdef">
int set_transport_base_name(int trans_id,
                            string new_name)
</pre><dd><br />
Sets the transport name
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
trans_id - the id of the transport<br />
new_name - the new name of the transport
<br />
<br />
<dd><b>Returns:</b>
<br />1 on success and 0 on failure
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="set_transport_colour">
set_transport_colour</a><pre class="autodocfuncdef">
int set_transport_colour(int trans_id,
                         string new_col)
</pre><dd><br />
Sets the transport colour
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
trans_id - the id of the transport<br />
new_col - the new colour of the transport
<br />
<br />
<dd><b>Returns:</b>
<br />1 on success and 0 on failure
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="set_transport_owner">
set_transport_owner</a><pre class="autodocfuncdef">
int set_transport_owner(int trans_id,
                        string new_owner)
</pre><dd><br />
Sets the transport's owner
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
trans_id - the id of the transport<br />
new_col - the new owner of the transport
<br />
<br />
<dd><b>Returns:</b>
<br />1 on success and 0 on failure
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="set_transport_short">
set_transport_short</a><pre class="autodocfuncdef">
string set_transport_short(int trans_id)
</pre><dd><br />
Sets the short of the transport referenced by the id passed in
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
trans_id - the id of the transport
<br />
<br />
<dd><b>Returns:</b>
<br />the new short
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="toggle_stabled">
toggle_stabled</a><pre class="autodocfuncdef">
int toggle_stabled(int trans_id)
</pre><dd><br />
Toggles the stabled state of the transport
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
trans_id - the id of the transport<br />
<br />
<dd><b>Returns:</b>
<br />the new stabled state
<br /><br />
<br /></dl>

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

