[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/furnitures/misc/newspaper_box.c</h2>
Newspaper box furniture object.
This object has to be set to a specific paper and only works for a certain
number of issues.  It only works for the owner of the house it is placed in,
and only when it is actually placed.
It checks for a new release every hour until it's depleted.<p>Written by Wirble<p>Started August 2001
<h2>Inherits</h2>
This class inherits the following classes <a href="std.room.furniture.storage.c.shtml">/std/room/furniture/storage.c</a><h2>Includes</h2>
This class includes the following files <a href="include.player_handler.h.shtml">/include/player_handler.h</a>, <a href="include.room.newspaper.h.shtml">/include/room/newspaper.h</a>, <a href="include.housing.h.shtml">/include/housing.h</a> and <a href="include.move_failures.h.shtml">/include/move_failures.h</a><h2>Method index</h2>
<dl><ul>
<li><a href="#check_for_new_papers">check_for_new_papers</a>()<br/>
This function is called after the box loads and then again every hour.
<li><a href="#query_international">query_international</a>()<br/>
This queries if the box will work if it's in a house outside the newspaper's
region.
<li><a href="#query_issues_left">query_issues_left</a>()<br/>
This queries how many issues are left before the box is used up.
<li><a href="#query_last_issue">query_last_issue</a>()<br/>
This queries the last issue of the paper.
<li><a href="#query_paper">query_paper</a>()<br/>
This queries what paper the box is set to.
<li><a href="#set_international">set_international</a>(int)<br/>
This sets the box to international or not.
<li><a href="#set_issues_left">set_issues_left</a>(int)<br/>
This sets the number of issues the box will handle.
<li><a href="#set_last_issue">set_last_issue</a>(int)<br/>
This sets the last issue that was delivered.
<li><a href="#set_paper">set_paper</a>(string)<br/>
This sets the newspaper the box is dedicated to.
</ul><h2>Public Functions</h2>
These are functions that everyone can access.<p>
.<ul><a name="check_for_new_papers">
check_for_new_papers</a><pre>
void check_for_new_papers()
</pre></br>
This function is called after the box loads and then again every hour.
If any new issues of the newspaper are available while the box is placed,
the necessary property is added to the house's owner and the
newspaper-object is put into the box.
Once all issues are delivered, the call-out won't reoccur.


<ul><a name="query_international">
query_international</a><pre>
int query_international()
</pre></br>
This queries if the box will work if it's in a house outside the newspaper's
region.
<br/><ul>
<li><b>Returns:</b>
<br/>1 if international, 0 if not

</dl>

<ul><a name="query_issues_left">
query_issues_left</a><pre>
int query_issues_left()
</pre></br>
This queries how many issues are left before the box is used up.
<br/><ul>
<li><b>Returns:</b>
<br/>the number of issues left

</dl>

<ul><a name="query_last_issue">
query_last_issue</a><pre>
int query_last_issue()
</pre></br>
This queries the last issue of the paper.
<br/><ul>
<li><b>Returns:</b>
<br/>the number of the last delivered issue

</dl>

<ul><a name="query_paper">
query_paper</a><pre>
string query_paper()
</pre></br>
This queries what paper the box is set to.
<br/><ul>
<li><b>Returns:</b>
<br/>the name of the paper

</dl>

<ul><a name="set_international">
set_international</a><pre>
void set_international(int i)
</pre></br>
This sets the box to international or not.
<br/><ul>
<li><b>Parameters:</b>
<br/>i - 1 for international, 0 for not.

</dl>

<ul><a name="set_issues_left">
set_issues_left</a><pre>
void set_issues_left(int _issues)
</pre></br>
This sets the number of issues the box will handle.  This shouldn't be
used after the initial creation of the box.
<br/><ul>
<li><b>Parameters:</b>
<br/>_issues - The new number of issues

</dl>

<ul><a name="set_last_issue">
set_last_issue</a><pre>
void set_last_issue(int _issue)
</pre></br>
This sets the last issue that was delivered.  Since it should only be called
when the box is created, it makes sure that the player doesn't get issues
that have been published before the box was purchased.
<br/><ul>
<li><b>Parameters:</b>
<br/>_issue - The latest issue at the time of purchase

</dl>

<ul><a name="set_paper">
set_paper</a><pre>
void set_paper(string new_paper)
</pre></br>
This sets the newspaper the box is dedicated to.
<br/><ul>
<li><b>Parameters:</b>
<br/>new_paper - The newspaper

</dl>


[an error occurred while processing this directive]

