[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/player_shop/office.c</h2>
The standard inheritable object for player-run shop offices.

<p><b>Description</b></p>
<p>This office is the nerve centre of the shop. Most of the data
structures are defined and maintained from here, and virtually all
of the managerial functions are forwarded here. It is this object
that passes the common variables across to other files as they call
for them. This minimises the complexity of setting up each object - as
long as they point to this object, and this object is correctly set up,
the objects will know which shop they belong to, who the employees are,
who the proprietor is etc.
</p>
<p>Before the shop will function correctly, it must be registered with
the handler - see set_very_short()
</p>
<p>Most of the functions defined in the office are not needed by
creators. Those that are needed are shown in the examples. Other
functions are not necessary, but may be useful.
</p>
<p>The source to this object is split into 15 different files. The
main file, office.c includes the other files under the office_code
directory. This is intended to ease code maintenance as the total
size of the office code (as of December 2000) is around 165k.
</p>
<p>In general, the functions contained in office.c are those intended
to be used directly by creators. The other functions are called
internally by the shop.
</p>
<p>The data itself is also saved into several files. The data is
arranged into these files to minimise the amount of disk activity
when changes are made. For example, employee data changes every time an
employee does something. The list of applicants, however, changes only
when an application status changes. They are, therefore, saved into
seperate files. Also, each save call is subject to a callout, and will
limit the amount of disk writing actually done. The only data not stored
by this file is the stock data, which is saved by each cabinet
individually. All data and logs are saved into several files within
a directory "/d/(domain)/save/player_shops/(shop_very_short)/".
In addition, some data are cleared if it hasn't been used for a while.
This will typically save up to 100k of memory for a store the size of
Tarnach's.
</p>
<p>The shop supports notice boards, posting all hirings, promotions,
bonus amounts in addition to any posts requested in the inheriting
object. In the absence of a board, all posts are mailed to each employee
and each employee will have access to an additional "memo" command in
the office.
</p>
<p>Applications are handled automatically, with managers voting whether
to accept or reject an application. On gaining positive votes from at
least 50% of the managers, an applicant is hired. If they receive more
than 50% negative votes, they are rejected. If there are insufficient
votes to settle the decision, an applicant will be hired if more managers
have voted for than against. Policy suggestions are handled in a similar
way.
</p>
<p>The shop's two main administration routines are run on a regular
basis. The first of these is run every day and is responsible for
checking that employees are still valid players (not deleted chars or
creators). It conducts automatic promotions, and handles demotions for
inactive employees. It also updates the lists of declined applicants
and banned people and removes that status if applicable. Finally, it
calls the check_hire_list() function to see if we can hire any new
employees.
</p>
<p>The second is run every Discworld month. This review involves paying
employees directly into their nominated bank account, and awarding
bonuses based on the current value of the bonus fund.
</p>
<p><b>See also:</b><br><a href="include.player_shop.h.shtml">/include/player_shop.h</a>, <a href="std.shops.player_shop.mgr_office.c.shtml">/std/shops/player_shop/mgr_office.c</a>, <a href="std.shops.player_shop.counter.c.shtml">/std/shops/player_shop/counter.c</a>, <a href="std.shops.player_shop.storeroom.c.shtml">/std/shops/player_shop/storeroom.c</a>, <a href="std.shops.player_shop.shop_front.c.shtml">/std/shops/player_shop/shop_front.c</a> and <a href="std.shops.player_shop.shopkeeper.c.shtml">/std/shops/player_shop/shopkeeper.c</a><p>Written by Ringo<p>Started 1st August 1999
<h3>Example</h3>
<pre>#include "path.h"

inherit "/std/shops/player_shop/office";

void setup()
{
   set_light(60);
   set_place("Lancre");
   set_language("morporkian");
   set_proprietor("Tarnach Fendertwin");
   set_shop_name("Tarnach Fendertwin's Quality Consumables (Creel Springs)");
   set_very_short("TFQC-CS", PATH + "save/");
   set_channel("tarnachcs", 0);
   set_stock_policy("magical spell components");

   set_shop_front(PATH+ "front");
   set_counter(PATH+ "counter");
   set_storeroom(PATH+ "storeroom");
   set_directions("east", "east", "east");

   set_shopkeeper(PATH + "shopkeeper");

   set_short("office of Tarnach's shop");
   set_long("This room is the office of the Creel Springs branch of "
     "Tarnach Fendertwin's Quality Consumables.  There is a door to the "
     "managers' office in the south wall.\n");
   add_sign("The sign is a small piece of paper stuck to the wall.\n",
     "This seems to be a handwritten note from Tarnach himself.  "
     "The handwriting, not to mention the spelling and the grammar, "
     "is appalling, so it's difficult to make out much.  All you "
     "can understand is something about what the \"office\" is for.",
     "sign", "sign" )->add_property( "there", "on one wall");
   add_exit("east", PATH+ "counter", "door");
   add_manager_exit("south", PATH + "mgr_office");
}
</pre>
<h2>Inherits</h2>
This class inherits the following classes <a href="std.room.basic_room.c.shtml">/std/room/basic_room.c</a><h2>Includes</h2>
This class includes the following files <a href="include.refresh.h.shtml">/include/refresh.h</a>, <a href="include.money.h.shtml">/include/money.h</a>, <a href="include.board.h.shtml">/include/board.h</a>, /std/shops/player_shop/office_code/stock.c, /std/shops/player_shop/office_code/policies.c, /std/shops/player_shop/office_code/personnel.c, /std/shops/player_shop/office_code/logging.c, /std/shops/player_shop/office_code/lists.c, /std/shops/player_shop/office_code/cabinets.c, /std/shops/player_shop/office_code/applications.c, /std/shops/player_shop/office_code/admin.c, <a href="include.move_failures.h.shtml">/include/move_failures.h</a>, <a href="include.mail.h.shtml">/include/mail.h</a>, /std/shops/player_shop/office_code/save.c, /std/shops/player_shop/office_code/review.c, /std/shops/player_shop/office_code/memo.c, /std/shops/player_shop/office_code/masked.c, /std/shops/player_shop/office_code/emp_cmd.c, /std/shops/player_shop/office_code/baddies.c, /std/shops/player_shop/office.h, /include/shops/bank.h and <a href="include.player_shop.h.shtml">/include/player_shop.h</a><h2>Method index</h2>
<dl><ul>
<li><a href="#add_manager_exit">add_manager_exit</a>(string, string)<br/>
Set the exit to the managers' office.
<li><a href="#get_applicants">get_applicants</a>()<br/>
Query the list of applicants.
<li><a href="#get_baddies">get_baddies</a>()<br/>
Query the people banned from the shop.
<li><a href="#get_employees">get_employees</a>()<br/>
Query the list of employees.
<li><a href="#get_managers">get_managers</a>()<br/>
Query the list of managers.
<li><a href="#get_new_policies">get_new_policies</a>()<br/>
Query the policy suggestions.
<li><a href="#get_policies">get_policies</a>(int)<br/>
Query the policies.
<li><a href="#get_retired">get_retired</a>()<br/>
Query the list of retired managers.
<li><a href="#get_supervisors">get_supervisors</a>()<br/>
Query the list of supervisors.
<li><a href="#num_employees_in">num_employees_in</a>()<br/>
Query the number of employees currently clocked in.
<li><a href="#query_applicant">query_applicant</a>(string)<br/>
Determine if this person has applied for a job.
<li><a href="#query_baddie">query_baddie</a>(string)<br/>
Determine if this person is banned from the shop.
<li><a href="#query_bonus">query_bonus</a>()<br/>
Query the value of the bonus account.
<li><a href="#query_channel">query_channel</a>()<br/>
Query the channel used by the shop.
<li><a href="#query_counter">query_counter</a>()<br/>
Query the path to the shop counter.
<li><a href="#query_creator">query_creator</a>(string)<br/>
Query the maintainer of this shop's files.
<li><a href="#query_declined">query_declined</a>(string)<br/>
Determine if a player was declined for a job.
<li><a href="#query_employee">query_employee</a>(string)<br/>
Determine if this person is an employee of the shop.
<li><a href="#query_employees">query_employees</a>()<br/>
Return the employee data.
<li><a href="#query_language">query_language</a>()<br/>
Query the language used in communications with this shop.
<li><a href="#query_list_array">query_list_array</a>()<br/>
Query the list of items sold by the shop.
<li><a href="#query_list_mapping">query_list_mapping</a>()<br/>
Query the list of items sold by the shop.
<li><a href="#query_list_string">query_list_string</a>()<br/>
Query the list of items sold by the shop.
<li><a href="#query_manager">query_manager</a>(string)<br/>
Determine if this person is a manager of this shop.
<li><a href="#query_maxemp">query_maxemp</a>()<br/>
Query the maximum number of employees.
<li><a href="#query_mgr_office">query_mgr_office</a>()<br/>
Query the path to the managers' office.
<li><a href="#query_num_cabinets">query_num_cabinets</a>()<br/>
Query the number of storeroom cabinets.
<li><a href="#query_pay">query_pay</a>()<br/>
Query the base pay rate.
<li><a href="#query_place">query_place</a>()<br/>
Query the location of this shop.
<li><a href="#query_policy">query_policy</a>(string)<br/>
Determine if a shop policy exists.
<li><a href="#query_profit">query_profit</a>()<br/>
Query the value of the profit account.
<li><a href="#query_proprietor">query_proprietor</a>()<br/>
Query the name of the proprietor.
<li><a href="#query_retired">query_retired</a>(string)<br/>
Determine if this person is a retired manager of this shop.
<li><a href="#query_shop_front">query_shop_front</a>()<br/>
Query the path to the shop front.
<li><a href="#query_shop_name">query_shop_name</a>()<br/>
Query the full name of the shop.
<li><a href="#query_shopkeeper">query_shopkeeper</a>()<br/>
Query the shopkeeper name.
<li><a href="#query_stock">query_stock</a>(string)<br/>
Query number of items in stock.
<li><a href="#query_storeroom">query_storeroom</a>()<br/>
Query the path to the storeroom.
<li><a href="#query_supervisor">query_supervisor</a>(string)<br/>
Determine if this person is a supervisor of this shop.
<li><a href="#save_emps">save_emps</a>()<br/>
Save the employee data file.
<li><a href="#save_me">save_me</a>()<br/>
Save the shop data file.
<li><a href="#set_channel">set_channel</a>(string, int)<br/>
Set the channel used by the shop.
<li><a href="#set_counter">set_counter</a>(string)<br/>
Set the path to the counter.
<li><a href="#set_creator">set_creator</a>(string)<br/>
Set the creator of this shop.
<li><a href="#set_directions">set_directions</a>(string, string, string)<br/>
Set the directions to other parts of the shop.
<li><a href="#set_language">set_language</a>(string)<br/>
Set the language for all communications with this shop.
<li><a href="#set_place">set_place</a>(string)<br/>
Set the location of the shop.
<li><a href="#set_proprietor">set_proprietor</a>(string)<br/>
Set the name of the proprietor.
<li><a href="#set_shop_front">set_shop_front</a>(string)<br/>
Set the path to the customer area.
<li><a href="#set_shop_name">set_shop_name</a>(string)<br/>
Set the full name of the shop.
<li><a href="#set_shopkeeper">set_shopkeeper</a>(string)<br/>
Set the npc shopkeeper object.
<li><a href="#set_stock_policy">set_stock_policy</a>(string)<br/>
Set the stock's main policy.
<li><a href="#set_storeroom">set_storeroom</a>(string)<br/>
Set the path to the storeroom.
<li><a href="#set_very_short">set_very_short</a>(string, string)<br/>
Set the very short name of the shop.
<li><a href="#shop_very_short">shop_very_short</a>()<br/>
Query the very short name of the shop.
</ul><h2>Public Functions</h2>
These are functions that everyone can access.<p>
.<ul><a name="get_applicants">
get_applicants</a><pre>
mapping get_applicants()
</pre></br>
Query the list of applicants.
This method returns the list of applicants as a mapping formatted
as follows:<br>
([ "name": type, time, ({ for }), ({ against }), ({ abstain }), ])
<br/><ul>
<li><b>Returns:</b>
<br/>the applicants mapping formatted as above.

</dl>

<ul><a name="get_baddies">
get_baddies</a><pre>
mapping get_baddies()
</pre></br>
Query the people banned from the shop.
This method returns a mapping of the people banned from this shop, along
with the time that they were banned, the person banning them, and the
reason they were banned.  The format for this mapping is:<br>
([ person:({ reason, banner, time }) ])
<br/><ul>
<li><b>Returns:</b>
<br/>the mapping, formatted as above.

</dl>

<ul><a name="get_employees">
get_employees</a><pre>
string * get_employees()
</pre></br>
Query the list of employees.
This method returns the list of employees, sorted alphabetically.
<br/><ul>
<li><b>Returns:</b>
<br/>the sorted array of employees.

<li><b>See also:</b>
<br/><a href="#get_supervisors">get_supervisors()</a>, <a href="#get_managers">get_managers()</a> and <a href="#get_retired">get_retired()</a></dl>

<ul><a name="get_managers">
get_managers</a><pre>
string * get_managers()
</pre></br>
Query the list of managers.
This method returns the list of managers, sorted alphabetically.
<br/><ul>
<li><b>Returns:</b>
<br/>the sorted array of managers.

<li><b>See also:</b>
<br/><a href="#get_employees">get_employees()</a>, <a href="#get_supervisors">get_supervisors()</a> and <a href="#get_retired">get_retired()</a></dl>

<ul><a name="get_new_policies">
get_new_policies</a><pre>
mapping get_new_policies()
</pre></br>
Query the policy suggestions.
These are the policies that have been proposed but not yet implemented.
<br/><ul>
<li><b>Returns:</b>
<br/>a mapping of the suggested shop policies.

<li><b>See also:</b>
<br/><a href="#get_policies">get_policies()</a> and <a href="#query_policy">query_policy()</a></dl>

<ul><a name="get_policies">
get_policies</a><pre>
mapping get_policies(int type)
</pre></br>
Query the policies.
These are the policies currently in effect.
<br/><ul>
<li><b>Returns:</b>
<br/>a mapping of the shop policies.

<li><b>See also:</b>
<br/><a href="#get_new_policies">get_new_policies()</a> and <a href="#query_policy">query_policy()</a></dl>

<ul><a name="get_retired">
get_retired</a><pre>
string * get_retired()
</pre></br>
Query the list of retired managers.
This method returns the list of retired managers, sorted alphabetically.
<br/><ul>
<li><b>Returns:</b>
<br/>the sorted array of retired managers.

<li><b>See also:</b>
<br/><a href="#get_employees">get_employees()</a>, <a href="#get_supervisors">get_supervisors()</a> and <a href="#get_managers">get_managers()</a></dl>

<ul><a name="get_supervisors">
get_supervisors</a><pre>
string * get_supervisors()
</pre></br>
Query the list of supervisors.
This method returns the list of supervisors, sorted alphabetically.
<br/><ul>
<li><b>Returns:</b>
<br/>the sorted array of supervisors.

<li><b>See also:</b>
<br/><a href="#get_employees">get_employees()</a>, <a href="#get_managers">get_managers()</a> and <a href="#get_retired">get_retired()</a></dl>

<ul><a name="num_employees_in">
num_employees_in</a><pre>
int num_employees_in()
</pre></br>
Query the number of employees currently clocked in.
This function will also clock out any employees that are no longer on DW.
<br/><ul>
<li><b>Returns:</b>
<br/>the number of employees clocked in.

</dl>

<ul><a name="query_applicant">
query_applicant</a><pre>
int query_applicant(string player)
</pre></br>
Determine if this person has applied for a job.
<br/><ul>
<li><b>Parameters:</b>
<br/>player - the player to query.
<li><b>Returns:</b>
<br/>APPLIED if applied, HIRED if voted in, AWAITING if awaiting
a vacancy.  Otherwise, will return FALSE.

</dl>

<ul><a name="query_baddie">
query_baddie</a><pre>
int query_baddie(string player)
</pre></br>
Determine if this person is banned from the shop.
<br/><ul>
<li><b>Parameters:</b>
<br/>player - the player to query.
<li><b>Returns:</b>
<br/>the time of the ban if banned, FALSE if not banned.

</dl>

<ul><a name="query_bonus">
query_bonus</a><pre>
int query_bonus()
</pre></br>
Query the value of the bonus account.
This is the current value of the bonus account.  Will need converting to
local currency if it is to be displayed.
<br/><ul>
<li><b>Returns:</b>
<br/>the value of the bonus account.

<li><b>See also:</b>
<br/><a href="#query_profit">query_profit()</a></dl>

<ul><a name="query_channel">
query_channel</a><pre>
string query_channel()
</pre></br>
Query the channel used by the shop.
<br/><ul>
<li><b>Returns:</b>
<br/>the channel in use by this shop

<li><b>See also:</b>
<br/><a href="#set_channel">set_channel()</a></dl>

<ul><a name="query_counter">
query_counter</a><pre>
string query_counter()
</pre></br>
Query the path to the shop counter.
<br/><ul>
<li><b>Returns:</b>
<br/>the path to the counter.

<li><b>See also:</b>
<br/><a href="#set_counter">set_counter()</a></dl>

<ul><a name="query_creator">
query_creator</a><pre>
void query_creator(string creator)
</pre></br>
Query the maintainer of this shop's files.
<br/><ul>
<li><b>Returns:</b>
<br/>the person responsible for this shop.

<li><b>See also:</b>
<br/><a href="#set_creator">set_creator()</a></dl>

<ul><a name="query_declined">
query_declined</a><pre>
int query_declined(string player)
</pre></br>
Determine if a player was declined for a job.
This method is used to determine if there is a declined application
registered for a player.
<br/><ul>
<li><b>Parameters:</b>
<br/>player - the player to query.
<li><b>Returns:</b>
<br/>FALSE, or the time at which the applicant was declined.

</dl>

<ul><a name="query_employee">
query_employee</a><pre>
int query_employee(string player)
</pre></br>
Determine if this person is an employee of the shop.
<br/><ul>
<li><b>Parameters:</b>
<br/>player - the player to query.
<li><b>Returns:</b>
<br/>the employee's points, or FALSE if not an employee.

<li><b>See also:</b>
<br/><a href="#query_supervisor">query_supervisor()</a>, <a href="#query_manager">query_manager()</a> and <a href="#query_retired">query_retired()</a></dl>

<ul><a name="query_employees">
query_employees</a><pre>
mapping query_employees()
</pre></br>
Return the employee data.
This includes only active employees - retired managers are not included.
The data is formatted as:<br>
([ employee:({ points, time, bank, pay, inactive, nobonus, nopromote }) ])<br>
<br/><ul>
<li><b>Returns:</b>
<br/>the employee mapping, formatted as above.

</dl>

<ul><a name="query_language">
query_language</a><pre>
string query_language()
</pre></br>
Query the language used in communications with this shop.
Useful for signs, books, etc.
<br/><ul>
<li><b>Returns:</b>
<br/>the language used in communications with this shop.

<li><b>See also:</b>
<br/><a href="#set_language">set_language()</a></dl>

<ul><a name="query_list_array">
query_list_array</a><pre>
string * query_list_array()
</pre></br>
Query the list of items sold by the shop.
Generates an array of the keys to the list mapping.
<br/><ul>
<li><b>Returns:</b>
<br/>the list of items in array form.

<li><b>See also:</b>
<br/><a href="#query_list_mapping">query_list_mapping()</a> and <a href="#query_list_string">query_list_string()</a></dl>

<ul><a name="query_list_mapping">
query_list_mapping</a><pre>
mapping query_list_mapping()
</pre></br>
Query the list of items sold by the shop.
<br/><ul>
<li><b>Returns:</b>
<br/>the list of items in mapping form.

<li><b>See also:</b>
<br/><a href="#query_list_array">query_list_array()</a> and <a href="#query_list_string">query_list_string()</a></dl>

<ul><a name="query_list_string">
query_list_string</a><pre>
string query_list_string()
</pre></br>
Query the list of items sold by the shop.
Generates a list of all items bought & sold by this shop, and outputs a
multiple short string for use in displays.
<br/><ul>
<li><b>Returns:</b>
<br/>the list of items.

<li><b>See also:</b>
<br/><a href="#query_list_array">query_list_array()</a> and <a href="#query_list_mapping">query_list_mapping()</a></dl>

<ul><a name="query_manager">
query_manager</a><pre>
int query_manager(string player)
</pre></br>
Determine if this person is a manager of this shop.
<br/><ul>
<li><b>Parameters:</b>
<br/>player - the player to query.
<li><b>Returns:</b>
<br/>TRUE or FALSE

<li><b>See also:</b>
<br/><a href="#query_employee">query_employee()</a>, <a href="#query_supervisor">query_supervisor()</a> and <a href="#query_retired">query_retired()</a></dl>

<ul><a name="query_maxemp">
query_maxemp</a><pre>
int query_maxemp()
</pre></br>
Query the maximum number of employees.
<br/><ul>
<li><b>Returns:</b>
<br/>the maximum number of employees allowed at this shop.

</dl>

<ul><a name="query_mgr_office">
query_mgr_office</a><pre>
string query_mgr_office()
</pre></br>
Query the path to the managers' office.
<br/><ul>
<li><b>Returns:</b>
<br/>the path to the managers' office.

</dl>

<ul><a name="query_num_cabinets">
query_num_cabinets</a><pre>
int query_num_cabinets()
</pre></br>
Query the number of storeroom cabinets.
<br/><ul>
<li><b>Returns:</b>
<br/>the number of cabinets in the storeroom.

</dl>

<ul><a name="query_pay">
query_pay</a><pre>
int query_pay()
</pre></br>
Query the base pay rate.
This is the base pay rate set by the managers; the amount each employee
will receive for a single transaction.
<br/><ul>
<li><b>Returns:</b>
<br/>the value of the base pay rate

</dl>

<ul><a name="query_place">
query_place</a><pre>
string query_place()
</pre></br>
Query the location of this shop.
<br/><ul>
<li><b>Returns:</b>
<br/>the location of the shop

<li><b>See also:</b>
<br/><a href="#set_place">set_place()</a></dl>

<ul><a name="query_policy">
query_policy</a><pre>
int query_policy(string policy)
</pre></br>
Determine if a shop policy exists.
<br/><ul>
<li><b>Parameters:</b>
<br/>policy - The name of the policy to query.
<li><b>Returns:</b>
<br/>2 if it is already policy, 1 if it is a proposal, else 0

<li><b>See also:</b>
<br/><a href="#get_policies">get_policies()</a> and <a href="#get_new_policies">get_new_policies()</a></dl>

<ul><a name="query_profit">
query_profit</a><pre>
int query_profit()
</pre></br>
Query the value of the profit account.
This is the current value of the profit account.  Will need converting to
local currency if it is to be displayed.
<br/><ul>
<li><b>Returns:</b>
<br/>the value of the profit account

<li><b>See also:</b>
<br/><a href="#query_bonus">query_bonus()</a></dl>

<ul><a name="query_proprietor">
query_proprietor</a><pre>
string query_proprietor()
</pre></br>
Query the name of the proprietor.
<br/><ul>
<li><b>Returns:</b>
<br/>the name of the proprietor

<li><b>See also:</b>
<br/><a href="#set_proprietor">set_proprietor()</a></dl>

<ul><a name="query_retired">
query_retired</a><pre>
int query_retired(string player)
</pre></br>
Determine if this person is a retired manager of this shop.
<br/><ul>
<li><b>Parameters:</b>
<br/>player - The player to query.
<li><b>Returns:</b>
<br/>TRUE or FALSE

<li><b>See also:</b>
<br/><a href="#query_employee">query_employee()</a>, <a href="#query_supervisor">query_supervisor()</a> and <a href="#query_manager">query_manager()</a></dl>

<ul><a name="query_shop_front">
query_shop_front</a><pre>
string query_shop_front()
</pre></br>
Query the path to the shop front.
<br/><ul>
<li><b>Returns:</b>
<br/>the path to the shop front

<li><b>See also:</b>
<br/><a href="#set_shop_front">set_shop_front()</a></dl>

<ul><a name="query_shop_name">
query_shop_name</a><pre>
string query_shop_name()
</pre></br>
Query the full name of the shop.
<br/><ul>
<li><b>Returns:</b>
<br/>the full name of the shop

<li><b>See also:</b>
<br/><a href="#set_shop_name">set_shop_name()</a></dl>

<ul><a name="query_shopkeeper">
query_shopkeeper</a><pre>
string query_shopkeeper()
</pre></br>
Query the shopkeeper name.
<br/><ul>
<li><b>Returns:</b>
<br/>the name of the shopkeeper

<li><b>See also:</b>
<br/><a href="#set_shopkeeper">set_shopkeeper()</a></dl>

<ul><a name="query_stock">
query_stock</a><pre>
int query_stock(string items)
</pre></br>
Query number of items in stock.
Determines the number of a specific item currently held by this shop.
<br/><ul>
<li><b>Parameters:</b>
<br/>items - the item to query
<li><b>Returns:</b>
<br/>the number of 'items' in stock

</dl>

<ul><a name="query_storeroom">
query_storeroom</a><pre>
string query_storeroom()
</pre></br>
Query the path to the storeroom.
<br/><ul>
<li><b>Returns:</b>
<br/>the path to the storeroom

<li><b>See also:</b>
<br/><a href="#set_storeroom">set_storeroom()</a></dl>

<ul><a name="query_supervisor">
query_supervisor</a><pre>
int query_supervisor(string player)
</pre></br>
Determine if this person is a supervisor of this shop.
<br/><ul>
<li><b>Parameters:</b>
<br/>player - The player to query.
<li><b>Returns:</b>
<br/>TRUE or FALSE

<li><b>See also:</b>
<br/><a href="#query_employee">query_employee()</a>, <a href="#query_manager">query_manager()</a> and <a href="#query_retired">query_retired()</a></dl>

<ul><a name="shop_very_short">
shop_very_short</a><pre>
string shop_very_short()
</pre></br>
Query the very short name of the shop.
<br/><ul>
<li><b>Returns:</b>
<br/>the very short name of the shop.

<li><b>See also:</b>
<br/><a href="#set_very_short">set_very_short()</a></dl>


<h2>Protected Functions</h2>
These are functions that only objects inheriting the class can access.<p>
<ul><a name="add_manager_exit">
add_manager_exit</a><pre>
void add_manager_exit(string dir,
                      string path)
</pre></br>
Set the exit to the managers' office.
This method also modifies the exit to allow only managers to enter the
managers' office.
<br/><ul>
<li><b>Parameters:</b>
<br/>dir - the direction of the exit.
<br/>path - the full path and filename to the managers' office of the shop.

<li><b>Example:</b>
<br/><pre>add_manager_exit( "east", PATH + "tarnach's_man_office" );</pre></dl>

<ul><a name="save_emps">
save_emps</a><pre>
void save_emps()
</pre></br>
Save the employee data file.
This method uses a call_out to help minimise the amount of disk activity
during normal operations of the shop.  The very short name of the shop
must have been set previously.
<br/><ul>
<li><b>See also:</b>
<br/><a href="#save_me">save_me()</a> and <a href="#set_very_short">set_very_short()
</a></dl>

<ul><a name="save_me">
save_me</a><pre>
void save_me()
</pre></br>
Save the shop data file.
This method uses a call_out to help minimise the amount of disk activity
during normal operations of the shop.  The very short name of the shop
must have been set previously.
<br/><ul>
<li><b>See also:</b>
<br/><a href="#save_emps">save_emps()</a> and <a href="#set_very_short">set_very_short()
</a></dl>

<ul><a name="set_channel">
set_channel</a><pre>
void set_channel(string name,
                 int board)
</pre></br>
Set the channel used by the shop.
This sets the channel used by the employees' badges, and also the
name of the board.  If a board has been set-up for this shop, this
function will also add the board into the room.
<br/><ul>
<li><b>Parameters:</b>
<br/>name - the name of the channel.
<br/>board - non-zero if a board exists for this shop.

<li><b>See also:</b>
<br/><a href="#query_channel">query_channel()</a><li><b>Example:</b>
<br/><pre>set_channel( "tarnachcs", 0 );</pre></dl>

<ul><a name="set_counter">
set_counter</a><pre>
void set_counter(string path)
</pre></br>
Set the path to the counter.
This is the full path and filename of the counter object to be used by this
shop.
<br/><ul>
<li><b>Parameters:</b>
<br/>path - The full path and filename to the shop's counter.

<li><b>See also:</b>
<br/><a href="#query_counter">query_counter()</a><li><b>Example:</b>
<br/><pre>set_counter( PATH + "counter" );</pre></dl>

<ul><a name="set_creator">
set_creator</a><pre>
void set_creator(string creator)
</pre></br>
Set the creator of this shop.
This person will receive all applications, complaints, suggestions
etc in the absence of any managers.  Default is set by CREATOR in
<player_shop.h>
<br/><ul>
<li><b>Parameters:</b>
<br/>creator - The person responsible for this shop.

<li><b>See also:</b>
<br/><a href="#query_creator">query_creator()</a><li><b>Example:</b>
<br/><pre>set_creator( "ringo" );</pre></dl>

<ul><a name="set_directions">
set_directions</a><pre>
void set_directions(string store,
                    string counter,
                    string shop)
</pre></br>
Set the directions to other parts of the shop.
This function is used by the npc shopkeeper to navigate around the shop,
using the exits at the given directions.  These directions should be the
standard "north", "south", "up" etc.
<br/><ul>
<li><b>Parameters:</b>
<br/>store - the direction to the storeroom.
<br/>counter - the direction to the counter.
<br/>shop - the direction to the shop front.

<li><b>Example:</b>
<br/><pre>set_directions( "southeast", "southeast", "southeast" );</pre></dl>

<ul><a name="set_language">
set_language</a><pre>
void set_language(string language)
</pre></br>
Set the language for all communications with this shop.
This is used by signs, books, and all sorts of other readable and
listenable things.
<br/><ul>
<li><b>Parameters:</b>
<br/>language - the language of this shop.

<li><b>See also:</b>
<br/><a href="#query_language">query_language()</a><li><b>Example:</b>
<br/><pre>set_language( "djelian" );</pre></dl>

<ul><a name="set_place">
set_place</a><pre>
void set_place(string place)
</pre></br>
Set the location of the shop.
This is used by the money handling functions to determine which
currency to use and therefore should be one of the locations returned
by the query_all_places() function in /obj/handlers/money_handler
<br/><ul>
<li><b>Parameters:</b>
<br/>place - the location of this shop.

<li><b>See also:</b>
<br/><a href="#query_location">query_location()</a><li><b>Example:</b>
<br/><pre>set_place( "Lancre" );</pre></dl>

<ul><a name="set_proprietor">
set_proprietor</a><pre>
void set_proprietor(string name)
</pre></br>
Set the name of the proprietor.
A fictional name; the owner of this establishment.  All administration
board posts & mudmails will be sent by this name.
<br/><ul>
<li><b>Parameters:</b>
<br/>name - the name of the proprietor.

<li><b>See also:</b>
<br/><a href="#query_proprietor">query_proprietor()</a><li><b>Example:</b>
<br/><pre>set_proprietor( "Tarnach Fendertwin" );</pre></dl>

<ul><a name="set_shop_front">
set_shop_front</a><pre>
void set_shop_front(string path)
</pre></br>
Set the path to the customer area.
<br/><ul>
<li><b>Parameters:</b>
<br/>path - the full path and filename to the customer area of the shop.

<li><b>See also:</b>
<br/><a href="#query_shop_front">query_shop_front()</a><li><b>Example:</b>
<br/><pre>set_shop_front( PATH + "shopfront" );</pre></dl>

<ul><a name="set_shop_name">
set_shop_name</a><pre>
void set_shop_name(string name)
</pre></br>
Set the full name of the shop.
This is used throughout the shop, and passed to the shop front as the
short description for the shop.
<br/><ul>
<li><b>Parameters:</b>
<br/>name - the name of the shop.

<li><b>See also:</b>
<br/><a href="#query_shop_name">query_shop_name()</a><li><b>Example:</b>
<br/><pre>set_shop_name( "Tarnach Fendertwin's Quality Consumables (Creel Springs)" );</pre></dl>

<ul><a name="set_shopkeeper">
set_shopkeeper</a><pre>
void set_shopkeeper(string path)
</pre></br>
Set the npc shopkeeper object.
Call this <i>after</i> setting up the shop's paths (i.e. to the
front room, stock room, etc.), because the shopkeeper has to know
where these things are!
<br/><ul>
<li><b>Parameters:</b>
<br/>path - the full path to the shopkeeper.

<li><b>See also:</b>
<br/><a href="std.shops.player_shop.shopkeeper.c.shtml">/std/shops/player_shop/shopkeeper.c</a><li><b>Example:</b>
<br/><pre>set_shopkeeper( PATH + "shopkeeper" );</pre></dl>

<ul><a name="set_stock_policy">
set_stock_policy</a><pre>
void set_stock_policy(string desc)
</pre></br>
Set the stock's main policy.
This is a general description of the items that this store deals in.
<br/><ul>
<li><b>Parameters:</b>
<br/>desc - the main stock description.

<li><b>Example:</b>
<br/><pre>set_stock_policy( "magical spell components" );</pre></dl>

<ul><a name="set_storeroom">
set_storeroom</a><pre>
void set_storeroom(string path)
</pre></br>
Set the path to the storeroom.
<br/><ul>
<li><b>Parameters:</b>
<br/>path - the full path and filename to the storeroom of the shop.

<li><b>See also:</b>
<br/><a href="#query_storeroom">query_storeroom()</a><li><b>Example:</b>
<br/><pre>set_storeroom( PATH + "storeroom" );</pre></dl>

<ul><a name="set_very_short">
set_very_short</a><pre>
void set_very_short(string name,
                    string savedir)
</pre></br>
Set the very short name of the shop.
This is used in many places including save-file names, setting up
player-titles, and mail headers.  It should be no more than around
4 or 5 chars in length.  This function also restores all saved data.
You must register this name by calling add_shop() in the handler.
<br/><ul>
<li><b>Parameters:</b>
<br/>name - the very short name.
<br/>savedir - the directory to save shop data to.

<li><b>See also:</b>
<br/><a href="#shop_very_short">shop_very_short()</a> and <a href="obj.handlers.player_shop.c.shtml">/obj/handlers/player_shop.c</a><li><b>Example:</b>
<br/><pre>set_very_short( "TFQC-CS", PATH + "save/" );</pre></dl>


[an error occurred while processing this directive]

