[Package Index | Mudlib Index | Effect Index]
File /obj/furnitures/misc/newspaper_box.c
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.Written by Wirble
Started August 2001
Inherits
This class inherits the following classes /std/room/furniture/storage.cIncludes
This class includes the following files /include/player_handler.h, /include/room/newspaper.h, /include/housing.h and /include/move_failures.hMethod index
Public Functions
These are functions that everyone can access.
.
void check_for_new_papers()
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.
int query_international()
This queries if the box will work if it's in a house outside the newspaper's
region.
- Returns:
1 if international, 0 if not
int query_issues_left()
This queries how many issues are left before the box is used up.
- Returns:
the number of issues left
int query_last_issue()
This queries the last issue of the paper.
- Returns:
the number of the last delivered issue
string query_paper()
This queries what paper the box is set to.