[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/engrave_inherit.c</h2>
This is a small inheritable to allow places to do engraving.  POut a
piece of code inthe init function which calls the engrave_init()
function.<p>Written by Macchirton<h3>Example</h3>
<pre>inherit "/std/room/basic_room";
inherit "/std/shops/engrave";

void init() {
   basic_room::init();
   engrave_init();
} /* init() */</pre>
<h2>Includes</h2>
This class includes the following files /include/shops/engrave.h, /include/shops/bank.h and <a href="include.money.h.shtml">/include/money.h</a><h2>Method index</h2>
<dl><ul>
<li><a href="#do_engrave">do_engrave</a>(object *, string)<br/>
This method does the actual engraving.
<li><a href="#engrave_init">engrave_init</a>()<br/>
This method should be called in the inheriting room's init function.
<li><a href="#engrave_living">engrave_living</a>(object *)<br/>
This method is called when a living object is attempted to be engraved.
<li><a href="#engrave_no_money">engrave_no_money</a>(object *, int)<br/>
This method is called if the player does not have enough money to
complete the engraving.
<li><a href="#engrave_objects">engrave_objects</a>(object *, int)<br/>
This method is called when the engrave is successful.
<li><a href="#engrave_wrong_items">engrave_wrong_items</a>(object *)<br/>
This method is called if the objects in question are unable to be
engraved.
<li><a href="#set_engrave_language">set_engrave_language</a>(string)<br/>
This method sets which language (for example, "agatean", or
"morporkian") to be used when engraving.
</ul><h2>Public Functions</h2>
These are functions that everyone can access.<p>
.<ul><a name="engrave_init">
engrave_init</a><pre>
void engrave_init()
</pre></br>
This method should be called in the inheriting room's init function.  IUt
will setup the commands to allow the object to be engraved.
<br/><ul>
<li><b>See also:</b>
<br/><a href="#do_engrave">do_engrave()
</a></dl>

<ul><a name="engrave_objects">
engrave_objects</a><pre>
int engrave_objects(object * obs,
                    int cost)
</pre></br>
This method is called when the engrave is successful.
This should be overridden in the inheritable to print out the
message you wish to say.  If this function returns 1 then the
default failed message is not used.
<br/><ul>
<li><b>See also:</b>
<br/><a href="#do_engrave">do_engrave()
</a></dl>

<ul><a name="set_engrave_language">
set_engrave_language</a><pre>
void set_engrave_language(string lang)
</pre></br>
This method sets which language (for example, "agatean", or
"morporkian") to be used when engraving.  It defaults to "general",
which is not to be recommended. 
<br/><ul>
<li><b>See also:</b>
<br/><a href="#do_engrave">do_engrave()
</a></dl>


<h2>Protected Functions</h2>
These are functions that only objects inheriting the class can access.<p>
<ul><a name="do_engrave">
do_engrave</a><pre>
int do_engrave(object * things,
               string message)
</pre></br>
This method does the actual engraving.
<br/><ul>
<li><b>Parameters:</b>
<br/>things - the things to get engraved.
<br/>message - the message to engarve on the objects
<li><b>See also:</b>
<br/><a href="#engrave_init">engrave_init()
</a></dl>

<ul><a name="engrave_living">
engrave_living</a><pre>
int engrave_living(object * obs)
</pre></br>
This method is called when a living object is attempted to be engraved.
This should be overridden in the inheritable to print out the
message you wish to say.  If this function returns 1 then the
default failed message is not used.
<br/><ul>
<li><b>Parameters:</b>
<br/>liv - the living objects
<li><b>Returns:</b>
<br/>0 use default fail mesasage, 1 override default fail message
<li><b>See also:</b>
<br/><a href="#do_engrave">do_engrave()
</a></dl>

<ul><a name="engrave_no_money">
engrave_no_money</a><pre>
int engrave_no_money(object * obs,
                     int cost)
</pre></br>
This method is called if the player does not have enough money to
complete the engraving.
This should be overridden in the inheritable to print out the
message you wish to say.  If this function returns 1 then the
default failed message is not used.
<br/><ul>
<li><b>Parameters:</b>
<br/>obs - the objects which were unable to be engraved
<br/>cost - the cost of the objects to be engraved
<li><b>Returns:</b>
<br/>0 use default fail mesasage, 1 override default fail message
<li><b>See also:</b>
<br/><a href="#do_engrave">do_engrave()
</a></dl>

<ul><a name="engrave_wrong_items">
engrave_wrong_items</a><pre>
int engrave_wrong_items(object * obs)
</pre></br>
This method is called if the objects in question are unable to be
engraved.
This should be overridden in the inheritable to print out the
message you wish to say.  If this function returns 1 then the
default failed message is not used.
<br/><ul>
<li><b>Parameters:</b>
<br/>obs - the objects which could not be engraved.
<li><b>Returns:</b>
<br/>0 use default fail mesasage, 1 override default fail message
<li><b>See also:</b>
<br/><a href="#do_engrave">do_engrave()
</a></dl>


[an error occurred while processing this directive]

