[Package Index | Mudlib Index | Effect Index]
This can be divided up into two rooms, an office (where you pay for the printing to be done) and a collection room (where you do the collection). To enable this behaviour the collection room needs to know about the office. The office stores all the information, so you call set_office_room(room_path); on the collection room and set_no_collection() on the office.
See also:
set_office_room() and set_no_collection();
Written by Pinkfish
Started Thu Jan 29 17:55:47 CST 1998
.
void add_print_run(string name, object ob, int number, string language)This adds an object into the current set to be collected. This handles figuring out the nice number to use for the static and dynamic save numbers.
void add_translation_cost(string lang, int cost)This method will add the cost to translate from one language to another. The default is translating to the common language and this cost will be used in both directions. ie: the cost of translating from djelian to common is the same as translating from common to djelian. If translating between two languages that are not the default language, say the default is common and we want to translate from djelian to wombat, then the cost from djelian->common and then common->wombat will be used.
int check_for_magic_writing(object ob)Checks to see if the object has any magic writing on it.
int check_for_untranslatable_language(object ob)Checks to see if the book contains a language we cannot translate.
int do_print(object * obs, string language)This method will be called by the print add_command. It will print out the pricing schedule and how long the item will take to make.
int do_print_copies(object * obs, int number, string language)This method will be called when the player tries to print a certain number of copies of a book.
void do_print_run(object ob, int number, int cost, string language)This method does the actual print run. It creates all the objects and makes the player pay for them all.
object find_book_or_paper(object * obs)This method finds a single book or piece of paper to work on. It will return 0 if multiple objects are found, or none are found. It will set the error message appropriately.
void load_it()Loads the saved information off the disc.
int price_object(object ob, int num, string to_language)Figure out how much this object will cost to make.
void print_pricing(object ob, string language)This method will print out the pricing schedule for the object.
mapping query_all_translantion_costs()This method will return a mapping of all the translation costs. The keys are the languages and the values are the costs in terms of percentages.
string query_default_language()This method will return the current default language for the print shop.
mixed * query_discount_schedule()This method returns the discount schedule. There is a default discount schedule setup for printing shops. The discount schedule tells how much of a discount you get for certain numbers of a run. It returns an array of the form:
({ ({ numn1, dis1 }), ({ num2, dis2}), ... })Where each number is the discount amount for printing less than that number of items. The array must be sorted from the lowest number to the highest number.
mapping query_dynamic_auto_load_info(int num)This method returns dynamic the autoload information associated with the file.
int query_letter_cost()This queries the cost per letter.
int query_no_collection()This returns the no collection flag used by the room.
string query_office_room()Returns the current office room associated with this room.
function query_open_func()This method returns the current function which is used to check for the openness of the shop.
mixed * query_print_run(string name)This method returns the array of documents awaiting collection. If there are not documents this returns 0.
string query_print_shop_name()This method will return the current name of the print shop.
string query_save_dir()Returns the save file name
string query_static_auto_load_info(int num)This method returns static the autoload information associated with the file.
void remove_print_run(string name, mixed * info)This method will remove a players print run.
void remove_translation_cost(string lang)This method will remove the translation cost for a specific language.
void save_it()Saves the information to the disc.
void set_default_language(string lang)This method sets the default language to use in the print shop. Anything written in this language will cost nothing extra to duplicate.
void set_discount_schedule(mixed * value)Sets the discount schedule for this object. See the query_discount_schedule help for the format of the array.
void set_letter_cost(int value)This queries the cost per letter.
void set_no_collection(int collect)This sets the no collection flag. It makes it so this room cannot be used for collections. If this is set then there should be an associated collection room used to pick up the books from. This room should use the set_office_room() function to set the office room to use for the collections.
void set_office_room(string room)Sets the office room to which this collection room is associated. If this is set on a room, you cannot setup print jobs in the room and this room specified here is queried for the information about the jobs to collect.
void set_open_func(function func)This method sets the function to evaluate to check to see if the shop is open or not. This should set any error messages which are needed. The objects are passed in as an argument in the do_print functions and nothing is passed in for the collection check.
void set_print_shop_name(string name)This method sets the name of the print shop which will be used on books when they are printed. This is only needed in the collection room, this is the name that is placed on the fly leaf.
void set_save_dir(string name)Sets the save file name.
int add_auto_load_info(string static, string dynamic)This method saves the autoload information out to a file and returns the number associated with the file.
string copyright_holder(object book)This method returns the current copyright holder of the object.
int do_claim(object * obs)This method sets up the copyright for the objects. This will check for existing copyright status and then check with the book handler to see if it still fits the criteria. If it does not then it will add itself as a new book.
int do_collect()This is when the player comes back to collect the book they have printed.
int is_copyright(object book)This method checks to make sure that the player is the correct holder of the copyright and that the book is still copyright.