[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 /d/am/buildings/dysk_dev/inherits/theatre_control.c</h2>
 An inherit for managerial rooms for Theatres.
 @author Gin
 @started 31/05/2002

<h2>Inherits</h2>
This class inherits the following classes .c<h2>Includes</h2>
This class includes the following files <a href="include.money.h.shtml">/include/money.h</a>, /include/shops/bank.h, /d/am/buildings/dysk_dev/inherits/path.h, <a href="include.mail.h.shtml">/include/mail.h</a>, <a href="include.player_handler.h.shtml">/include/player_handler.h</a> and <a href="include.move_failures.h.shtml">/include/move_failures.h</a><h2>Class Index</h2>
<ul><li><a href="#class_playwright">playwright</a>
</ul><h2>Method index</h2>
<dl><ul>
<li><a href="#add_playwright">add_playwright</a>(string, int)<br/>This method is used to add a playwright to the theatre's list of 
official playwrights.
<li><a href="#convert_file">convert_file</a>(string)<br/>This method converts a save file for a script into an array
 containing the author and title.
<li><a href="#do_accept">do_accept</a>()<br/>
This method accepts a script as valid for the theatre.
<li><a href="#do_add">do_add</a>()<br/>
This method adds a script to the current lineup of scripts to be performed.
<li><a href="#do_collect">do_collect</a>()<br/>
This method is used to collect royalties for players

<li><a href="#do_demote">do_demote</a>(string, string)<br/>This method is used to demote a manager back to playwright
<li><a href="#do_fine">do_fine</a>(string, string, string)<br/>
This method is used to fine a playwright of royalties.
<li><a href="#do_fire">do_fire</a>(string, string)<br/>This method fires a playwright or manager.
<li><a href="#do_hire">do_hire</a>(string, int)<br/>This method hires a person to the theatre, either as a playwright or 
 * manager.
<li><a href="#do_list">do_list</a>(int)<br/>This method lists the avaliable scripts.
<li><a href="#do_pay">do_pay</a>(string, string, string)<br/>
This method is used to pay a playwright a bonus.
<li><a href="#do_play">do_play</a>()<br/>
This method plays a script for a manager.
<li><a href="#do_reject">do_reject</a>()<br/>
This method rejects a script, returning it to the owner.
<li><a href="#do_remove">do_remove</a>()<br/>
This method removes a script from the current lineup of scripts to be 
performed.
<li><a href="#do_retrieve">do_retrieve</a>(int)<br/>
This method is used to retrieve a script in object form
<li><a href="#do_set">do_set</a>(string, int, int)<br/>
This method sets the pay rat (in terms of a percentage of the takings of
takings for their plays) for a particular person, the default payrat, or 
that for all the playwrights.
<li><a href="#do_transfer_ownership">do_transfer_ownership</a>(string)<br/>
This method transfers control of the theatre to a new owner.
<li><a href="#do_view">do_view</a>()<br/>
This method is used to view a script's file.
<li><a href="#employee_details">employee_details</a>(string)<br/>
This method returns details on an employee
<li><a href="#get_details">get_details</a>(string)<br/>
This method gives a list of details on an employee, such as the level
at which they have been employed, the date on which they were employed,
their current royalties, plays approved and their pay percentage.
<li><a href="#is_hired">is_hired</a>(string)<br/>
This method is used to identify if someone is an employee
<li><a href="#is_owner">is_owner</a>(string)<br/>
This method is used to identify if someone is the owner of the theatre
<li><a href="#list_d_employees">list_d_employees</a>()<br/>
This method produces a detailed list of the employees

<li><a href="#list_employees">list_employees</a>()<br/>
this method lists all employees along with their levels within the 
organisation

<li><a href="#list_managers">list_managers</a>()<br/>
This method produces a list of the managers

<li><a href="#pay_royalties">pay_royalties</a>(string, float)<br/>
This method pays royalties to the author of a play.
<li><a href="#query_owner">query_owner</a>()<br/>
This method returns the current owner of the theatre.
<li><a href="#reject_this_script">reject_this_script</a>(class h_script)<li><a href="#return_script">return_script</a>(object)<br/>
This method returns a script object to the theatre
<li><a href="#set_theatre_log">set_theatre_log</a>(string)<li><a href="#set_theatre_name">set_theatre_name</a>(string, string)<br/>
This method sets the theatre name
<li><a href="#view_log">view_log</a>()<br/>This method displays the log file for the theatre.
<li><a href="#view_td">view_td</a>()<br/>
This method gives a nice message with the details of the theatre

<li><a href="#write_scripts">write_scripts</a>(class h_script *)<br/>
This method writes an array of scripts to the player.
</ul><h2>Public Functions</h2>
These are functions that everyone can access.<p>
.<ul><a name="add_playwright">
add_playwright</a><pre>
void add_playwright(string name,
                    int level)
</pre></br>This method is used to add a playwright to the theatre's list of 
official playwrights.
<br/><ul>
<li><b>Parameters:</b>
<br/>name - The name of the person to add
<br/>level - The level at which they are to be added.

</dl>

<ul><a name="convert_file">
convert_file</a><pre>
string * convert_file(string file)
</pre></br>This method converts a save file for a script into an array
 containing the author and title.
 @param file the file to convert
 @return returns a 2-3 part array of author, title and number 


<ul><a name="do_accept">
do_accept</a><pre>
int do_accept()
</pre></br>
This method accepts a script as valid for the theatre.


<ul><a name="do_add">
do_add</a><pre>
int do_add()
</pre></br>
This method adds a script to the current lineup of scripts to be performed.


<ul><a name="do_collect">
do_collect</a><pre>
int do_collect()
</pre></br>
This method is used to collect royalties for players


<ul><a name="do_demote">
do_demote</a><pre>
int do_demote(string name,
              string reason)
</pre></br>This method is used to demote a manager back to playwright
<br/><ul>
<li><b>Parameters:</b>
<br/>name - the name of the person to demote
<br/>reason - the reason for which they are to be demoted.

</dl>

<ul><a name="do_fine">
do_fine</a><pre>
int do_fine(string name,
            string amount,
            string reason)
</pre></br>
This method is used to fine a playwright of royalties.  The fine itself
 is not regained by the theatre, in order to prevent abuse.
<br/><ul>
<li><b>Parameters:</b>
<br/>name - The person to pay
<br/>amount - The amount to pay
<br/>reason - The reason, used in log files.

</dl>

<ul><a name="do_fire">
do_fire</a><pre>
int do_fire(string name,
            string reason)
</pre></br>This method fires a playwright or manager.
<br/><ul>
<li><b>Parameters:</b>
<br/>name - The name of the person to fire
<br/>reason - Why they have been fired.

</dl>

<ul><a name="do_hire">
do_hire</a><pre>
int do_hire(string name,
            int flag)
</pre></br>This method hires a person to the theatre, either as a playwright or 
 * manager.
 *
 * The flag determines if it is a hire from nothing to playwright or manager,
 * or if it is a promotion to manager for a current playwright.
 * @param name The name of the person to demote
 * @param flag Flag determining what type of hiring is taking place.
 

<ul><a name="do_list">
do_list</a><pre>
int do_list(int type)
</pre></br>This method lists the avaliable scripts.
 * @param type the type of script to list
 

<ul><a name="do_pay">
do_pay</a><pre>
int do_pay(string name,
           string amount,
           string reason)
</pre></br>
This method is used to pay a playwright a bonus.
<br/><ul>
<li><b>Parameters:</b>
<br/>name - The person to pay
<br/>amount - The amount to pay
<br/>reason - The reason, used in log files.

</dl>

<ul><a name="do_play">
do_play</a><pre>
int do_play()
</pre></br>
This method plays a script for a manager.


<ul><a name="do_reject">
do_reject</a><pre>
int do_reject()
</pre></br>
This method rejects a script, returning it to the owner.


<ul><a name="do_remove">
do_remove</a><pre>
int do_remove()
</pre></br>
This method removes a script from the current lineup of scripts to be 
performed.


<ul><a name="do_retrieve">
do_retrieve</a><pre>
int do_retrieve(int type)
</pre></br>
This method is used to retrieve a script in object form
<br/><ul>
<li><b>Parameters:</b>
<br/>type - the type of script to get, e.g. accepted.

</dl>

<ul><a name="do_set">
do_set</a><pre>
int do_set(string name,
           int percent,
           int flag)
</pre></br>
This method sets the pay rat (in terms of a percentage of the takings of
takings for their plays) for a particular person, the default payrat, or 
that for all the playwrights.

The flag argument determines if the payrate to be set is the default,
that of a particular person, or that of a particular person to a default
rate, 1, 2, or 3 respectively.

<br/><ul>
<li><b>Parameters:</b>
<br/>name - The name of the person for which to set the pay rate, or all
<br/>percent - The percentage to set the payrate to.

</dl>

<ul><a name="do_transfer_ownership">
do_transfer_ownership</a><pre>
int do_transfer_ownership(string new_owner)
</pre></br>
This method transfers control of the theatre to a new owner.
<br/><ul>
<li><b>Parameters:</b>
<br/>new_owner - the new owner of the theatre

</dl>

<ul><a name="do_view">
do_view</a><pre>
int do_view()
</pre></br>
This method is used to view a script's file.


<ul><a name="employee_details">
employee_details</a><pre>
int employee_details(string name)
</pre></br>
This method returns details on an employee
<br/><ul>
<li><b>Parameters:</b>
<br/>name - the person to get details on

</dl>

<ul><a name="get_details">
get_details</a><pre>
string get_details(string name)
</pre></br>
This method gives a list of details on an employee, such as the level
at which they have been employed, the date on which they were employed,
their current royalties, plays approved and their pay percentage.
<br/><ul>
<li><b>Parameters:</b>
<br/>name - the person to get details about.

</dl>

<ul><a name="is_hired">
is_hired</a><pre>
int is_hired(string name)
</pre></br>
This method is used to identify if someone is an employee
<br/><ul>
<li><b>Returns:</b>
<br/>returns 1 or 0, depending on whether someone is employed

</dl>

<ul><a name="is_owner">
is_owner</a><pre>
int is_owner(string word)
</pre></br>
This method is used to identify if someone is the owner of the theatre
<br/><ul>
<li><b>Parameters:</b>
<br/>word - the name to check against
<li><b>Returns:</b>
<br/>returns 1 or 0, depending on whether the person is the owner

</dl>

<ul><a name="list_d_employees">
list_d_employees</a><pre>
int list_d_employees()
</pre></br>
This method produces a detailed list of the employees


<ul><a name="list_employees">
list_employees</a><pre>
int list_employees()
</pre></br>
this method lists all employees along with their levels within the 
organisation


<ul><a name="list_managers">
list_managers</a><pre>
int list_managers()
</pre></br>
This method produces a list of the managers


<ul><a name="pay_royalties">
pay_royalties</a><pre>
void pay_royalties(string author,
                   float amount)
</pre></br>
This method pays royalties to the author of a play.
<br/><ul>
<li><b>Parameters:</b>
<br/>author - the author of the play
<br/>amount - the amount to pay them

</dl>

<ul><a name="query_owner">
query_owner</a><pre>
string query_owner()
</pre></br>
This method returns the current owner of the theatre.
<br/><ul>
<li><b>Returns:</b>
<br/>returns the current owner of the theatre

</dl>

<ul><a name="reject_this_script">
reject_this_script</a><pre>
void reject_this_script(class h_script the_script)
</pre>
<ul><a name="return_script">
return_script</a><pre>
int return_script(object thing)
</pre></br>
This method returns a script object to the theatre
<br/><ul>
<li><b>Parameters:</b>
<br/>thing - The script to return

</dl>

<ul><a name="set_theatre_log">
set_theatre_log</a><pre>
void set_theatre_log(string path)
</pre>
<ul><a name="set_theatre_name">
set_theatre_name</a><pre>
void set_theatre_name(string name,
                      string stage)
</pre></br>
This method sets the theatre name
<br/><ul>
<li><b>Parameters:</b>
<br/>name - name of the the theatre
<br/>stage - the path of the main stage

</dl>

<ul><a name="view_log">
view_log</a><pre>
int view_log()
</pre></br>This method displays the log file for the theatre. *

<ul><a name="view_td">
view_td</a><pre>
int view_td()
</pre></br>
This method gives a nice message with the details of the theatre


<ul><a name="write_scripts">
write_scripts</a><pre>
void write_scripts(class h_script * scripts)
</pre></br>
This method writes an array of scripts to the player.
<br/><ul>
<li><b>Parameters:</b>
<br/>scripts - the scripts to write

</dl>


<h2>Classes</h2>
These are nice data types for dealing with...  Data!<p>
<ul>
<li><a name="class_playwright">
playwright</a><pre>
class playwright {
                   int date_hired;
                   int number_plays;
                   int total_paid;
                   int employee_level;
                   int pay_percent;
}

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

