[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/shops/inherit/commercial.c</h2>
This is the file that is the basic inheritable for commercial
properties.  The only different between commercial properties and
player housing properties is that commerical ones can deal with
signs and commercial furniture.<p>Written by Pinkfish<p>Started Fri Apr 21 13:37:44 PDT 2000
<h2>Inherits</h2>
This class inherits the following classes <a href="std.shops.inherit.person_expressions.c.shtml">/std/shops/inherit/person_expressions.c</a>, <a href="std.room.player_housing.c.shtml">/std/room/player_housing.c</a> and <a href="std.shops.inherit.expression_util.c.shtml">/std/shops/inherit/expression_util.c</a><h2>Includes</h2>
This class includes the following files <a href="include.player.h.shtml">/include/player.h</a>, <a href="include.mail.h.shtml">/include/mail.h</a>, <a href="include.player_handler.h.shtml">/include/player_handler.h</a>, /include/shops/bank.h, <a href="include.money.h.shtml">/include/money.h</a>, <a href="include.expressions.h.shtml">/include/expressions.h</a>, <a href="include.move_failures.h.shtml">/include/move_failures.h</a> and <a href="include.playtesters.h.shtml">/include/playtesters.h</a><h2>Class Index</h2>
<ul><li><a href="#class_float_withdrawls">float_withdrawls</a>
<li><a href="#class_royalty_data">royalty_data</a>
<li><a href="#class_weekly_status">weekly_status</a>
</ul><h2>Method index</h2>
<dl><ul>
<li><a href="#add_commercial_thing">add_commercial_thing</a>(object)<br/>
This method adds a commercial thing into the list of current
commercial things.
<li><a href="#adjust_royalty">adjust_royalty</a>(string, int)<br/>
This method adds money into the specified person's royalty
float.
<li><a href="#do_add_royalties">do_add_royalties</a>(string)<br/>
Adds money into the float for the shop.
<li><a href="#do_black_list_add">do_black_list_add</a>(string)<br/>
This method adds the person to the black list.
<li><a href="#do_black_list_add_ignore">do_black_list_add_ignore</a>()<br/>
This method adds their ignore list to the black list

<li><a href="#do_black_list_remove">do_black_list_remove</a>(string)<br/>
This method removes the person from the black list.
<li><a href="#do_collect">do_collect</a>()<br/>
This method shows the current royalties you can pick up.
<li><a href="#do_collect_partial_royalties">do_collect_partial_royalties</a>(string)<br/>
This method collects royalities up to a certain amount.
<li><a href="#do_deposit">do_deposit</a>(object *)<br/>
This method deposits money into the float
<li><a href="#do_measure">do_measure</a>()<li><a href="#do_name_property">do_name_property</a>(string)<br/>
This method gives the property a name.
<li><a href="#do_pay_entry">do_pay_entry</a>()<br/>
This method lets the person pay for entry into the premesis.
<li><a href="#do_purchase">do_purchase</a>()<br/>
This methof calls ups the estate person to purchase stuff off.
<li><a href="#do_remove_sign">do_remove_sign</a>()<br/>
This method removes the sign from the property.
<li><a href="#do_royalties">do_royalties</a>()<br/>
This method shows any royalties that you might be able to collect.
<li><a href="#do_royalty_list">do_royalty_list</a>()<br/>
This method shows any royalties that you might be able to collect.
<li><a href="#do_set_sign">do_set_sign</a>(object *)<br/>
This method sets the sign you wish to use for your property.
<li><a href="#do_use_expression">do_use_expression</a>(string)<br/>
This method sets up the expression to use when calculating the
ability to use the shop.
<li><a href="#do_use_expression_type">do_use_expression_type</a>(string, string)<br/>
This method sets up the expression to use when calculating the
ability to use the shop.
<li><a href="#find_commercial_items">find_commercial_items</a>(string)<br/>
This function will try and track down a specific type of commercial
object in the current location.
<li><a href="#find_next_commercial_id">find_next_commercial_id</a>()<br/>
This method finds a unique commercial id in the room to use as new
save file.
<li><a href="#is_open_for">is_open_for</a>(string, string)<br/>
This method is called to try and see if the property is open for
the specific type of thingy attempted.
<li><a href="#long">long</a>(string, int)<br/>
This gets round the problems with setting the property name before
we have a save file.
<li><a href="#mail_weekly_status">mail_weekly_status</a>()<br/>
This method will mail out the weekly status for the shop.
<li><a href="#query_commercial_property">query_commercial_property</a>()<br/>
This method returns true for any commercial property.
<li><a href="#query_commercial_things">query_commercial_things</a>()<br/>
This method returns the current list of commercial things in
the room.
<li><a href="#query_commercial_type">query_commercial_type</a>()<br/>
This method returns the commercial type of the property.
<li><a href="#query_float">query_float</a>()<br/>
This method returns the float of the property.
<li><a href="#query_language">query_language</a>()<br/>
This method returns the language items in the shop should use if they
need to use a language.
<li><a href="#query_main_room">query_main_room</a>()<br/>
This method checks returns the main room.
<li><a href="#query_owners_money">query_owners_money</a>()<br/>
This method figures out how much float the owner has in the current
property.
<li><a href="#query_parcel_post">query_parcel_post</a>()<br/>
This method tells us the current parcel post used for rejecting items.
<li><a href="#query_property_name">query_property_name</a>()<br/>
This method returns the name of the property.
<li><a href="#query_property_size">query_property_size</a>()<br/>
This method returns the size of the property.
<li><a href="#query_royalty">query_royalty</a>(string)<br/>
This method returns the amount of money in the specified person's
royalty float.
<li><a href="#query_save_dir">query_save_dir</a>()<br/>
This method returns the save directory for the room.
<li><a href="#query_sign_object">query_sign_object</a>()<br/>
This method returns the current sign object for the property.
<li><a href="#query_weekly_status_string">query_weekly_status_string</a>()<br/>
This method returns the string that will be sent to the owners at the
end of the week.
<li><a href="#register_use_types">register_use_types</a>(string *)<br/>
This registers a set of use types so they can be seen and controlled.
<li><a href="#remove_commercial_thing">remove_commercial_thing</a>(object)<br/>
This method removes a commercil thing from the list of current
commercial things.
<li><a href="#reset_weekly_status">reset_weekly_status</a>()<br/>
This method resets the weekly status when the stats are mailed out.
<li><a href="#set_commercial_type">set_commercial_type</a>(string)<br/>
This method sets the commercial type of the property.
<li><a href="#set_language">set_language</a>(string)<br/>
This sets the language items in the shop should be displayed in,
if a language is required.
<li><a href="#set_parcel_post">set_parcel_post</a>(string)<br/>
This method sets the parcel post to use for rejecting items.
<li><a href="#set_property_name">set_property_name</a>(string)<br/>
This method sets the name of the property.
<li><a href="#set_property_size">set_property_size</a>(int)<br/>
This method sets the size of the property.
<li><a href="#set_save_dir">set_save_dir</a>(string)<br/>
This method sets the save directory for the the room.
<li><a href="#set_sign_object">set_sign_object</a>(object)<br/>
This method sets the current sign object.
<li><a href="#short">short</a>()<br/>
This gets round the problems with setting the property name before
we have a save file.
</ul><h2>Public Functions</h2>
These are functions that everyone can access.<p>
.<ul><a name="add_commercial_thing">
add_commercial_thing</a><pre>
void add_commercial_thing(object ob)
</pre></br>
This method adds a commercial thing into the list of current
commercial things.
<br/><ul>
<li><b>Parameters:</b>
<br/>thing - the thing to add

</dl>

<ul><a name="adjust_royalty">
adjust_royalty</a><pre>
void adjust_royalty(string person,
                    int amount)
</pre></br>
This method adds money into the specified person's royalty
float.
<br/><ul>
<li><b>Parameters:</b>
<br/>person - the person to add the royalty to
<br/>amount - the amount to add

</dl>

<ul><a name="do_add_royalties">
do_add_royalties</a><pre>
int do_add_royalties(string amount)
</pre></br>
Adds money into the float for the shop.
<br/><ul>
<li><b>Parameters:</b>
<br/>amount - the amount to add to the float

</dl>

<ul><a name="do_black_list_add">
do_black_list_add</a><pre>
int do_black_list_add(string name)
</pre></br>
This method adds the person to the black list.
<br/><ul>
<li><b>Parameters:</b>
<br/>person - the person to add to the black list

</dl>

<ul><a name="do_black_list_add_ignore">
do_black_list_add_ignore</a><pre>
int do_black_list_add_ignore()
</pre></br>
This method adds their ignore list to the black list


<ul><a name="do_black_list_remove">
do_black_list_remove</a><pre>
int do_black_list_remove(string name)
</pre></br>
This method removes the person from the black list.
<br/><ul>
<li><b>Parameters:</b>
<br/>person - the person to remove from the black list

</dl>

<ul><a name="do_collect">
do_collect</a><pre>
int do_collect()
</pre></br>
This method shows the current royalties you can pick up.


<ul><a name="do_collect_partial_royalties">
do_collect_partial_royalties</a><pre>
int do_collect_partial_royalties(string amount)
</pre></br>
This method collects royalities up to a certain amount.  This is
only usable by the owner of the shop.
<br/><ul>
<li><b>Parameters:</b>
<br/>amount - the amount to collect
<li><b>Returns:</b>
<br/>1 on success, 0 on failure

</dl>

<ul><a name="do_deposit">
do_deposit</a><pre>
int do_deposit(object * obs)
</pre></br>
This method deposits money into the float
<br/><ul>
<li><b>Parameters:</b>
<br/>obs - the objects which could be money

</dl>

<ul><a name="do_measure">
do_measure</a><pre>
int do_measure()
</pre>
<ul><a name="do_name_property">
do_name_property</a><pre>
int do_name_property(string name)
</pre></br>
This method gives the property a name.


<ul><a name="do_pay_entry">
do_pay_entry</a><pre>
int do_pay_entry()
</pre></br>
This method lets the person pay for entry into the premesis.


<ul><a name="do_purchase">
do_purchase</a><pre>
int do_purchase()
</pre></br>
This methof calls ups the estate person to purchase stuff off.


<ul><a name="do_remove_sign">
do_remove_sign</a><pre>
int do_remove_sign()
</pre></br>
This method removes the sign from the property.


<ul><a name="do_royalties">
do_royalties</a><pre>
int do_royalties()
</pre></br>
This method shows any royalties that you might be able to collect.
<br/><ul>
<li><b>Returns:</b>
<br/>1 on succes, 0 on failure

</dl>

<ul><a name="do_royalty_list">
do_royalty_list</a><pre>
int do_royalty_list()
</pre></br>
This method shows any royalties that you might be able to collect.
<br/><ul>
<li><b>Returns:</b>
<br/>1 on succes, 0 on failure

</dl>

<ul><a name="do_set_sign">
do_set_sign</a><pre>
int do_set_sign(object * obs)
</pre></br>
This method sets the sign you wish to use for your property.
The sign will be displayed outside the property for passer bys.
<br/><ul>
<li><b>Parameters:</b>
<br/>obs - the sign

</dl>

<ul><a name="do_use_expression">
do_use_expression</a><pre>
int do_use_expression(string str)
</pre></br>
This method sets up the expression to use when calculating the
ability to use the shop.


<ul><a name="do_use_expression_type">
do_use_expression_type</a><pre>
int do_use_expression_type(string type,
                           string str)
</pre></br>
This method sets up the expression to use when calculating the
ability to use the shop.


<ul><a name="find_commercial_items">
find_commercial_items</a><pre>
object * find_commercial_items(string type)
</pre></br>
This function will try and track down a specific type of commercial
object in the current location.  It will look into 'partitioned'
rooms for the item as well.
<br/><ul>
<li><b>Parameters:</b>
<br/>type - the type to look for
<li><b>Returns:</b>
<br/>the object found

</dl>

<ul><a name="find_next_commercial_id">
find_next_commercial_id</a><pre>
int find_next_commercial_id()
</pre></br>
This method finds a unique commercial id in the room to use as new
save file.
<br/><ul>
<li><b>Returns:</b>
<br/>a unique commercial id for the room

</dl>

<ul><a name="is_open_for">
is_open_for</a><pre>
int is_open_for(string type,
                string person)
</pre></br>
This method is called to try and see if the property is open for
the specific type of thingy attempted.
<br/><ul>
<li><b>Parameters:</b>
<br/>type - the type of thing

</dl>

<ul><a name="long">
long</a><pre>
string long(string word,
            int dark)
</pre></br>
This gets round the problems with setting the property name before
we have a save file.


<ul><a name="query_commercial_property">
query_commercial_property</a><pre>
int query_commercial_property()
</pre></br>
This method returns true for any commercial property.
<br/><ul>
<li><b>Returns:</b>
<br/>1 for commercial property

</dl>

<ul><a name="query_commercial_things">
query_commercial_things</a><pre>
object * query_commercial_things()
</pre></br>
This method returns the current list of commercial things in
the room.
<br/><ul>
<li><b>Returns:</b>
<br/>the list of commercial things

</dl>

<ul><a name="query_commercial_type">
query_commercial_type</a><pre>
string query_commercial_type()
</pre></br>
This method returns the commercial type of the property.
<br/><ul>
<li><b>Returns:</b>
<br/>the commercial type of the property

</dl>

<ul><a name="query_float">
query_float</a><pre>
int query_float()
</pre></br>
This method returns the float of the property.  The float is the
owner's current royalty balance.
<br/><ul>
<li><b>Returns:</b>
<br/>the float of the property

</dl>

<ul><a name="query_language">
query_language</a><pre>
string query_language()
</pre></br>
This method returns the language items in the shop should use if they
need to use a language.


<ul><a name="query_main_room">
query_main_room</a><pre>
object query_main_room()
</pre></br>
This method checks returns the main room.  THis is used when the
property can have multiple sub-rooms.
<br/><ul>
<li><b>Returns:</b>
<br/>the main room

</dl>

<ul><a name="query_owners_money">
query_owners_money</a><pre>
int query_owners_money()
</pre></br>
This method figures out how much float the owner has in the current
property.
<br/><ul>
<li><b>Returns:</b>
<br/>the current float

</dl>

<ul><a name="query_parcel_post">
query_parcel_post</a><pre>
string query_parcel_post()
</pre></br>
This method tells us the current parcel post used for rejecting items.
<br/><ul>
<li><b>Returns:</b>
<br/>the current parcel post

</dl>

<ul><a name="query_property_name">
query_property_name</a><pre>
string query_property_name()
</pre></br>
This method returns the name of the property.
<br/><ul>
<li><b>Returns:</b>
<br/>the name of the property

</dl>

<ul><a name="query_property_size">
query_property_size</a><pre>
int query_property_size()
</pre></br>
This method returns the size of the property.  The property size ranges
from 0 (no size) to 100 (big shop).
<br/><ul>
<li><b>Returns:</b>
<br/>the property size

</dl>

<ul><a name="query_royalty">
query_royalty</a><pre>
int query_royalty(string person)
</pre></br>
This method returns the amount of money in the specified person's
royalty float.


<ul><a name="query_save_dir">
query_save_dir</a><pre>
string query_save_dir()
</pre></br>
This method returns the save directory for the room.  This should be
used as a reference point for other save stuff.
<br/><ul>
<li><b>Returns:</b>
<br/>the save directory

</dl>

<ul><a name="query_sign_object">
query_sign_object</a><pre>
object query_sign_object()
</pre></br>
This method returns the current sign object for the property.
<br/><ul>
<li><b>Returns:</b>
<br/>the current sign object

</dl>

<ul><a name="query_weekly_status_string">
query_weekly_status_string</a><pre>
string query_weekly_status_string()
</pre></br>
This method returns the string that will be sent to the owners at the
end of the week.
<br/><ul>
<li><b>Returns:</b>
<br/>the weekly status

</dl>

<ul><a name="register_use_types">
register_use_types</a><pre>
void register_use_types(string * types)
</pre></br>
This registers a set of use types so they can be seen and controlled.
<br/><ul>
<li><b>Parameters:</b>
<br/>types - the list of types to register

</dl>

<ul><a name="remove_commercial_thing">
remove_commercial_thing</a><pre>
void remove_commercial_thing(object thing)
</pre></br>
This method removes a commercil thing from the list of current
commercial things.
<br/><ul>
<li><b>Parameters:</b>
<br/>thing - the thing to remove

</dl>

<ul><a name="reset_weekly_status">
reset_weekly_status</a><pre>
void reset_weekly_status()
</pre></br>
This method resets the weekly status when the stats are mailed out.
It will also reset all the commercial objects.


<ul><a name="set_commercial_type">
set_commercial_type</a><pre>
void set_commercial_type(string name)
</pre></br>
This method sets the commercial type of the property.
<br/><ul>
<li><b>Parameters:</b>
<br/>name - the commecial type

</dl>

<ul><a name="set_language">
set_language</a><pre>
void set_language(string language)
</pre></br>
This sets the language items in the shop should be displayed in,
if a language is required.
<br/><ul>
<li><b>Parameters:</b>
<br/>language - the language to use

</dl>

<ul><a name="set_parcel_post">
set_parcel_post</a><pre>
void set_parcel_post(string parcel)
</pre></br>
This method sets the parcel post to use for rejecting items.
<br/><ul>
<li><b>Parameters:</b>
<br/>parcel - the parcel post office

</dl>

<ul><a name="set_property_name">
set_property_name</a><pre>
void set_property_name(string name)
</pre></br>
This method sets the name of the property.
<br/><ul>
<li><b>Parameters:</b>
<br/>name - the name of the property

</dl>

<ul><a name="set_property_size">
set_property_size</a><pre>
void set_property_size(int size)
</pre></br>
This method sets the size of the property.  The property size ranges
from 0 (no size) to 100 (big shop).
<br/><ul>
<li><b>Parameters:</b>
<br/>size - the new size of the property

</dl>

<ul><a name="set_save_dir">
set_save_dir</a><pre>
void set_save_dir(string dir)
</pre></br>
This method sets the save directory for the the room.
<br/><ul>
<li><b>Parameters:</b>
<br/>dir - the directory to save stuff in

</dl>

<ul><a name="set_sign_object">
set_sign_object</a><pre>
void set_sign_object(object ob)
</pre></br>
This method sets the current sign object.
<br/><ul>
<li><b>Parameters:</b>
<br/>sign - the new sign object

</dl>

<ul><a name="short">
short</a><pre>
string short()
</pre></br>
This gets round the problems with setting the property name before
we have a save file.



<h2>Protected Functions</h2>
These are functions that only objects inheriting the class can access.<p>
<ul><a name="mail_weekly_status">
mail_weekly_status</a><pre>
void mail_weekly_status()
</pre></br>
This method will mail out the weekly status for the shop.



<h2>Classes</h2>
These are nice data types for dealing with...  Data!<p>
<ul>
<li><a name="class_float_withdrawls">
float_withdrawls</a><pre>
class float_withdrawls {
                         string person;
                         int amount;
                         int withdrawl_time;
}

</pre>
<li><a name="class_royalty_data">
royalty_data</a><pre>
class royalty_data {
                     int value;
                     int last_withdrawl;
}

</pre>
<li><a name="class_weekly_status">
weekly_status</a><pre>
class weekly_status {
                      int total_incoming;
                      int total_outgoing;
                      class float_withdrawls * withdrawls;
}

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

