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

<p><b>Description</b></p>
<p>As far as the customer is concerned, the shop front is the shop.
They will have no access to the other areas of the shop. In this room,
they can apply for a position, make a complaint or suggestion, as well
as buy and sell items. The main entrance is linked to a bell which will
'tinkle' throughout the shop. In the event that the npc shopkeeper is
not currently working, and no employees are currently in the shop, a
push-bell is provided to alert any employees who may be logged on. 
</p>
<p>Applicants who have had their application accepted can confirm their
employment here. Any applicant may also cancel their application.
</p>
<p>All suggestions and complaints are mailed to managers. All
applications are saved and managers are notified by e-mail.
</p>
<p>Note that the outside entrance to this room should be modified to
call the tinkle_bell() function. This will ensure that the shop's bell
alerts any employees within the shop whenever the door is opened/closed.
In the <i>setup()</i> function, the relevant exit should be modified
along these lines: 
</p>
<pre>
modify_exit( DIRECTION, ({ "open/close func", ({ this_object(),
   "shop_bell" }), "door short", "shop door", "door long",
   "This is a functional, if not terribly exciting door.  "
   "There is a sign hanging above it.\n" }) );
</pre>
<p>And the function shop_bell() which looks like this:</p> 
<pre>
int shop_bell(int opening)
{
    ( PATH_TO_SHOP_FRONT )->tinkle_bell(opening);
    return 1;
}
</pre>
<p><b>See also:</b><br><a href="include.player_shop.h.shtml">/include/player_shop.h</a>, <a href="std.shops.player_shop.office.c.shtml">/std/shops/player_shop/office.c</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> 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/shop_front";

void setup()
{
   set_light(60);
   set_office( PATH+ "office" );

   set_long( "This is the Creel Springs branch of Tarnach Fendertwin's "
      "Quality Consumables, a shop that acts as a trading post for magic "
      "spell components.  There is a small card and a push-bell on the "
      "counter to the east and a sign hanging from the front of it.  The "
      "door to the east leads out to the village lane.\n" );
   add_sign( "The sign is a piece of white card that hangs from the front "
     "of the counter.\n", "Welcomme to Tarnach's!  Pleese ask aboute "
     "our pryces for buying and selling: "+ query_office()->
     query_list_string() +".  Employement enquyries wellcome!" );
   set_exit_counter( "west" );
   set_exit_out( "east", "/d/ram/Lancre_Kingdom/Creel_Springs_pt/creel_springs02" );
}
</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.player_shop.h.shtml">/include/player_shop.h</a> and <a href="include.mail.h.shtml">/include/mail.h</a><h2>Method index</h2>
<dl><ul>
<li><a href="#query_office">query_office</a>()<br/>
Query the path to the office.
<li><a href="#query_outside">query_outside</a>()<br/>
Query the path to the room outside the shop.
<li><a href="#set_exit_counter">set_exit_counter</a>(string)<br/>
Add the exit to the counter.
<li><a href="#set_exit_out">set_exit_out</a>(string, string)<br/>
Add the exit to outside the shop.
<li><a href="#set_office">set_office</a>(string)<br/>
Set the path of the main office.
</ul><h2>Public Functions</h2>
These are functions that everyone can access.<p>
.<ul><a name="query_office">
query_office</a><pre>
string query_office()
</pre></br>
Query the path to the office.
<br/><ul>
<li><b>Returns:</b>
<br/>The path to the office.

</dl>

<ul><a name="query_outside">
query_outside</a><pre>
string query_outside()
</pre></br>
Query the path to the room outside the shop.
<br/><ul>
<li><b>Returns:</b>
<br/>The full path set by set_exit_out()

</dl>


<h2>Protected Functions</h2>
These are functions that only objects inheriting the class can access.<p>
<ul><a name="set_exit_counter">
set_exit_counter</a><pre>
void set_exit_counter(string direction)
</pre></br>
Add the exit to the counter.
Creates a hidden exit to the shop which will only allow employees to
pass.  This function must be called after the set_office function.
<br/><ul>
<li><b>Parameters:</b>
<br/>direction - The direction to the counter.

<li><b>Example:</b>
<br/><pre>set_exit_counter( "west" );</pre></dl>

<ul><a name="set_exit_out">
set_exit_out</a><pre>
void set_exit_out(string direction,
                  string path)
</pre></br>
Add the exit to outside the shop.
This exit will notify employees anywhere in the shop when
someone walks through it.  This function must be called after
the set_office function.
<br/><ul>
<li><b>Parameters:</b>
<br/>direction - The direction to outside the shop.
<br/>path - The path to outside the shop.

<li><b>Example:</b>
<br/><pre>set_exit_out( "east", "/d/ram/Lancre_Kingdom/Creel_Springs_pt/creel_springs02" );</pre></dl>

<ul><a name="set_office">
set_office</a><pre>
void set_office(string path)
</pre></br>
Set the path of the main office.
<br/><ul>
<li><b>Parameters:</b>
<br/>path - The full path & filename.

<li><b>Example:</b>
<br/><pre>set_office( PATH + "office" );</pre></dl>


[an error occurred while processing this directive]

