[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 /obj/vessel.c</h2>
This is a container specifically for holding liquids.  The hope is
to reduce the memory requirements by taking all of the liquid stuff
out of /obj/container, since most of the containers are sacks and
chests.  Also, the reaction handler will replace the potion space.
<p>
Some additional notes:
<ol>
   <li>As is (hopefully) documented elsewhere, the base units of
       volume for most continuous media are drops and pinches, both of
       which are roughly 1/4 of a cc.  This means that water has
       200 drops per weight unit (1g/cc).  Non-continuous objects
       are assumed to be the same density as water.
</ol><h2>Inherits</h2>
This class inherits the following classes <a href="obj.baggage.c.shtml">/obj/baggage.c</a><h2>Includes</h2>
This class includes the following files <a href="include.volumes.h.shtml">/include/volumes.h</a>, <a href="include.tasks.h.shtml">/include/tasks.h</a> and <a href="include.move_failures.h.shtml">/include/move_failures.h</a><h2>Method index</h2>
<ul>
<li><a href="#add_volume">add_volume</a>(int)<br/>
This method returns the amount of volume left for liquids to be
added into.
<li><a href="#calc_liquid">calc_liquid</a>()<li><a href="#cmp_amount_r">cmp_amount_r</a>(object, object)<li><a href="#cmp_weight_r">cmp_weight_r</a>(object, object)<li><a href="#drink_amount">drink_amount</a>(int, object)<br/>
This method drinks a certain amount of the liquid in the container.
<li><a href="#fullness_adjectives">fullness_adjectives</a>()<br/>
This returns an adjective for how full the current object is with
liquid.
<li><a href="#is_fighting_bottle_smashed">is_fighting_bottle_smashed</a>(object, object)<br/>
This method checks to see if the person doing the drinking can hold onto
their bottle without loosing it while in combat.
<li><a href="#query_cont_volume">query_cont_volume</a>()<li><a href="#query_fullness_desc">query_fullness_desc</a>()<br/>
This method returns the fullness description of the vessel.
<li><a href="#query_leak_rate">query_leak_rate</a>()<br/>
This method returns the leak rate of the container
<li><a href="#query_liquid">query_liquid</a>()<br/>
This method returns if this vessel is currenly a liquid.
<li><a href="#query_liquid_desc">query_liquid_desc</a>()<br/>
This method returns the description of the liquid inside the vessel.
<li><a href="#query_max_volume">query_max_volume</a>()<br/>
This method returns the current maxium volume associated with this
container.
<li><a href="#query_vessel">query_vessel</a>()<li><a href="#query_volume">query_volume</a>()<br/>
This method returns the current amount of liquid in the container.
<li><a href="#query_volume_left">query_volume_left</a>()<br/>
This method returns the amount of volume left for liquids to be
added into.
<li><a href="#remove_volume">remove_volume</a>(int)<br/>
This method removes some volume of liquid from the container.
<li><a href="#set_hide_fullness_desc">set_hide_fullness_desc</a>()<br/>
This method sets the fullness description to be hidden in verbose look.
<li><a href="#set_leak_rate">set_leak_rate</a>(int)<br/>
This method sets the leak rate of the container.
<li><a href="#set_max_volume">set_max_volume</a>(int)<br/>
This method sets the maximum volume of the container.
<li><a href="#set_show_fullness_desc">set_show_fullness_desc</a>()<br/>
This method sets the fullness description to be displayed in verbose look.
<li><a href="#xfer_volume">xfer_volume</a>(int, object)<br/>
This method transfers a given amount of a liquid to a new container.
</ul>
<h2>Public Functions</h2>
These are functions that everyone can access.<p>
<dl>
<dt class="autodocfuncname"><a name="add_volume">
add_volume</a><pre class="autodocfuncdef">
int add_volume(int vol)
</pre><dd><br />
This method returns the amount of volume left for liquids to be
added into.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
vol - the amount of volume added<br />
<br />
<dd><b>Returns:</b>
<br />1 if the addition was successful, 0 if not<br /><br />
<dd><b>See also:</b>
<br /><a href="#add_volume">add_volume() </a><br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="calc_liquid">
calc_liquid</a><pre class="autodocfuncdef">
void calc_liquid()
</pre>
<dt class="autodocfuncname"><a name="cmp_amount_r">
cmp_amount_r</a><pre class="autodocfuncdef">
int cmp_amount_r(object a,
                 object b)
</pre>
<dt class="autodocfuncname"><a name="cmp_weight_r">
cmp_weight_r</a><pre class="autodocfuncdef">
int cmp_weight_r(object a,
                 object b)
</pre>
<dt class="autodocfuncname"><a name="drink_amount">
drink_amount</a><pre class="autodocfuncdef">
int drink_amount(int drinking,
                 object player)
</pre><dd><br />
This method drinks a certain amount of the liquid in the container.
It will do all the fudging for being in combat and drinking too
much, as well as dropping the bottle and so on.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
drinking - the amount to drink<br />
player - the person doing the drinking
<br />
<br />
<br /></dl>

<dt class="autodocfuncname"><a name="fullness_adjectives">
fullness_adjectives</a><pre class="autodocfuncdef">
string * fullness_adjectives()
</pre><dd><br />
This returns an adjective for how full the current object is with
liquid.  This is used in the parse command handling code.<br />
<br /><dl>
<dd><b>Returns:</b>
<br />the fullness adjective<br /><br />
<dd><b>See also:</b>
<br /><a href="#query_max_volume">query_max_volume() </a><br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="is_fighting_bottle_smashed">
is_fighting_bottle_smashed</a><pre class="autodocfuncdef">
int is_fighting_bottle_smashed(object player,
                               object me)
</pre><dd><br />
This method checks to see if the person doing the drinking can hold onto
their bottle without loosing it while in combat.  Warning!  This code
may be used in other objects to deal with handling drinking while in
combat.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
player - the player doing the drinking<br />
me - the object being drunk <br />
<br />
<dd><b>Returns:</b>
<br />1 if the bottle is stopped, 0 if it is not<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_cont_volume">
query_cont_volume</a><pre class="autodocfuncdef">
int query_cont_volume()
</pre>
<dt class="autodocfuncname"><a name="query_fullness_desc">
query_fullness_desc</a><pre class="autodocfuncdef">
string query_fullness_desc()
</pre><dd><br />
This method returns the fullness description of the vessel.<br />
<br /><dl>
<dd><b>Returns:</b>
<br />the fullness description of the vessel <br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_leak_rate">
query_leak_rate</a><pre class="autodocfuncdef">
int query_leak_rate()
</pre><dd><br />
This method returns the leak rate of the container<br />
<br /><dl>
<dd><b>Returns:</b>
<br />the current leak rate <br /><br />
<dd><b>See also:</b>
<br /><a href="#set_leak_rate">set_leak_rate()</a><br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="query_liquid">
query_liquid</a><pre class="autodocfuncdef">
int query_liquid()
</pre><dd><br />
This method returns if this vessel is currenly a liquid.  This means
it has a liquid inside it.<br />
<br /><dl>
<dd><b>Returns:</b>
<br />1 if it is a liquid, 0 if not <br /><br />
<dd><b>See also:</b>
<br /><a href="#calc_liquid">calc_liquid()</a><br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="query_liquid_desc">
query_liquid_desc</a><pre class="autodocfuncdef">
string query_liquid_desc()
</pre><dd><br />
This method returns the description of the liquid inside the vessel.<br />
<br /><dl>
<dd><b>Returns:</b>
<br />the current liquids description <br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_max_volume">
query_max_volume</a><pre class="autodocfuncdef">
int query_max_volume()
</pre><dd><br />
This method returns the current maxium volume associated with this
container.<br />
<br /><dl>
<dd><b>Returns:</b>
<br />the current maximum volume <br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_vessel">
query_vessel</a><pre class="autodocfuncdef">
int query_vessel()
</pre>
<dt class="autodocfuncname"><a name="query_volume">
query_volume</a><pre class="autodocfuncdef">
int query_volume()
</pre><dd><br />
This method returns the current amount of liquid in the container.<br />
<br /><dl>
<dd><b>Returns:</b>
<br />the current amount of liquid in the container <br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_volume_left">
query_volume_left</a><pre class="autodocfuncdef">
int query_volume_left()
</pre><dd><br />
This method returns the amount of volume left for liquids to be
added into.<br />
<br /><dl>
<dd><b>Returns:</b>
<br />the amount of volume left<br /><br />
<dd><b>See also:</b>
<br /><a href="#add_volume">add_volume()</a> and <a href="#transfer_liquid_to">transfer_liquid_to() </a><br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="remove_volume">
remove_volume</a><pre class="autodocfuncdef">
int remove_volume(int vol_lost)
</pre><dd><br />
This method removes some volume of liquid from the container.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
vol_lost - the amount of volume removed<br />
<br />
<dd><b>See also:</b>
<br /><a href="#add_volume">add_volume()</a> and <a href="#query_volume">query_volume() </a><br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="set_hide_fullness_desc">
set_hide_fullness_desc</a><pre class="autodocfuncdef">
void set_hide_fullness_desc()
</pre><dd><br />
This method sets the fullness description to be hidden in verbose look.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
<br />
<dd><b>Returns:</b>
<br />void<br /><br />
<dd><b>See also:</b>
<br /><a href="#query_fullness_desc">query_fullness_desc(), query_fullness(), set_show_fullness_desc()
</a><br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="set_leak_rate">
set_leak_rate</a><pre class="autodocfuncdef">
void set_leak_rate(int i)
</pre><dd><br />
This method sets the leak rate of the container.  The leak rate is how
fast stuff leaks out of the container.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
i - the new leak rate of the container<br />
<br />
<dd><b>See also:</b>
<br /><a href="#query_leak_rate">query_leak_rate() </a><br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="set_max_volume">
set_max_volume</a><pre class="autodocfuncdef">
void set_max_volume(int v)
</pre><dd><br />
This method sets the maximum volume of the container.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
v - the new maximum volume<br />
<br />
<dd><b>See also:</b>
<br /><a href="#add_volume">add_volume()</a> and <a href="#query_max_volume">query_max_volume() </a><br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="set_show_fullness_desc">
set_show_fullness_desc</a><pre class="autodocfuncdef">
void set_show_fullness_desc()
</pre><dd><br />
This method sets the fullness description to be displayed in verbose look.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
<br />
<dd><b>Returns:</b>
<br />void<br /><br />
<dd><b>See also:</b>
<br /><a href="#query_fullness_desc">query_fullness_desc(), query_fullness(), set_hide_fullness_desc()
</a><br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="xfer_volume">
xfer_volume</a><pre class="autodocfuncdef">
int xfer_volume(int vol_xferred,
                object dest)
</pre><dd><br />
This method transfers a given amount of a liquid to a new container.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
dest - the destination of the liquid<br />
vol_xferred - the amount of volume transfered <br />
<br />
<br /></dl>

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

