#/obj/handlers/autodoc/autodoc_file.c public_functions (["query_delivery_delay":({({"int",}),({}),(["main":({" This method returns how long after the login an item is delivered to the recipient.",}),"return":({"the number of seconds unt ",}),]),}),"query_delivery_mess":({({"string",}),({}),(["main":({" This returns the current delivery message that is displayed to the recipient of a delivery. ",}),"see":({"set_delivery_mess()",}),"return":({"the delivery message ",}),]),}),"setup_delivery":({({"void",}),({}),(["main":({" This method adds the object into the login handler's static login calls list. It only ever needs to be called _once_, and doesn't need to be called every time the object loads. <p> Once this is done, the object will automatically be loaded whenever someone logs on. <p> This must be called in order for the delivery system to work at all. ",}),]),}),"load_file":({({"void",}),({}),(["main":({" This method loads retrieves data from the save file, and handles the autoloading of the items. ",}),]),}),"query_save_file":({({"string",}),({}),(["main":({" This method is used to query the save file in which the delivery data is stored. ",}),"return":({" the path of the save file used to store delivery details. ",}),]),}),"clean_delivery_mapping":({({"void",}),({}),([]),}),"save_file":({({"void",}),({}),(["main":({" This method saves all of the delivery data into the save file, handling saving of the auto loading as well. ",}),]),}),"add_delivery":({({"void",}),({({"mixed",}),"who",({"mixed",}),"sender",({"object",}),"item",({"int",}),"delay",}),(["main":({" This method adds a new item to the delivery mapping for the specified recipient. This should always be used instead of set_delivery(), as it makes sure that all the data structures have been configured correctly. ",}),"see":({"check_delivery() ",}),"example":({" add_delivery(this_player(), \"taffyd\", frog, 360);",}),"param":({"who the person to receive the item. ","sender the person sending the file. ","item the item to be sent","delay how many seconds to wait before delivering item on the next login. ",}),]),}),"query_delivery":({({"varargs","mixed",}),({({"string",}),"person",}),(["main":({" This method returns the delivery details for a particular person, or the entire delivery mapping of one doesn't exist. <p>",}),"param":({"person the person's delivery details to query. ",}),]),}),"clear_delivery":({({"void",}),({}),(["main":({" This method is used to remove all deliveries currently stored within the delivery system. <p> Be very careful when using this function! It will save the cleared delivery mapping after it has been called. ",}),]),}),"query_burdened_mess":({({"string",}),({}),(["main":({" This returns the current delivery message that is displayed to the recipient of a delivery, if it is too heavy go to in their inventory. <p>",}),"see":({"set_burdened_mess()","query_delivery_mess()",}),"return":({"the delivery message ",}),]),}),"check_delivery":({({"void",}),({({"mixed",}),"person",({"string",}),"type",}),(["main":({" This method is called by the login handler every time someone logs on to the Disc. It handles the delivery of items and all sorts of nifty things. <p>",}),"param":({"person the name of the person logging on","type the type of login event ",}),]),}),]) protected_functions (["set_delivery_delay":({({"void",}),({({"int",}),"new_time",}),(["main":({" This method is used to specify how many seconds to wait after login until the item is delivered. Note that if this is too long, then the receipient may log out before you can give them the item. If the receipient logs out, then the item will be destroyed. <p> This is set to 5 by default. <p>",}),"param":({"new_time the time in seconds after log in to deliver the message. ",}),]),}),"deliver_item":({({"void",}),({({"string",}),"who",({"object",}),"ob",({"string",}),"sent_by",}),(["main":({" This method is called when an item is being delivered to a player. The delivery message or the burdened mess is used depending on how the item is delivered, and then it is removed from the delivery mapping. <p> Note that this routine uses add_message() to display movement messages to the player, instead of tell_object() or a traditional move message. This is so that the messages can be 'clumped' together properly, otherwise it just doesn't work. <p>",}),"param":({"who the person to deliver to","ob the object to deliver","sent_by the person that send the parcel","position its location in the recepient's delivery mapping. ",}),]),}),"set_burdened_mess":({({"void",}),({({"string",}),"s",}),(["main":({" This method sets the message that is displayed when an item is too heavy to be placed in the victim's inventory. This uses the same format as the normal delivery message. <p>",}),"see":({"set_delivery_mess()","query_burdened_mess() ",}),"param":({"s message to display",}),]),}),"set_delivery_mess":({({"void",}),({({"string",}),"s",}),(["main":({" This method sets the delivery message that is displayed to the player when they log on. $S is substituted in the string with the name of the player who sent the message, $N is replaced with the a_short() of the item being sent. ",}),"see":({"query_delivery_mess()","/std/basic/desc->a_short()",}),"example":({" set_delivery_mess(\"A small frog hops up to you, and thrusts $N \" \"into your arms. He holds up a large sign that reads: \\\"\" \"From $S\\\", and then runs away.\\n\"); // Recipient sees: A small frog hops up to you, and thrusts a large blue box into your arms. He holds up a large sign that reads: \\\"From Taffyd!\\\", and then runs away. ",}),"param":({"s the new delivery string",}),]),}),"set_save_file":({({"void",}),({({"string",}),"str",}),(["main":({" This method sets the save file to a file name so that auto loading and delivery details can be successfully saved.",}),"param":({"str the new path. ",}),]),}),"set_delivery":({({"void",}),({({"mapping",}),"x",}),(["main":({" This is used to set all of the delivery mapping manually. You should not use this method. ",}),"see":({"add_delivery() ",}),"param":({"x the new delivery mapping.",}),]),}),"valid_delivery":({({"int",}),({({"class","delivery_item",}),"delivery",({"string",}),"person",}),(["main":({" This method is called by the check_delivery() function when it validates someone's deliveries. It is used to determine whether or not it's time for a delivery to be delivered, and whether or not to remove it. <p>",}),"return":({"1 if the delivery is not ready, 0 if it is. (yes, this is kind of backwards.) ",}),"param":({"delivery the delivery item to be tested","person the person to deliver the item to. <p>",}),]),}),]) inherits (["/global/auto_load":({}),]) main_docs (["main":({" Inheritable Delivery System <p> This object provides a way of storing and sending objects to players while they are not online. It is roughly based on the concepts found in Post Offices that support parcel depositing, and also Bernita's Flower Shop. (Which delivers flowers to people when they log on.) <p> This object is easy to use, and can be combined with most other objects on the Disc. (ie, /obj/monster and /std/room). See delivery_room.c for a pre-made room which handles the delivery of objects. <p> Note that this system uses static login calls. These must be configured first and turned on manually in order for the delivery system to work. <p> In order to use this inheritable the following things must be done: <ul> <li>The object that uses it created, and this object inherited. <li>The save file set using set_save_file(). <li>Any extra settings such as delivery message and delay configured. <li>setup_delivery() called on the object to finalize setup. </ul>",}),"author":({"Taffyd ",}),]) define_docs ([]) includes (["/include/move_failures.h":1059516192,"/include/login_handler.h":1059516191,"/include/login.h":1059516192,"/include/player_handler.h":1059516191,]) class_docs (["delivery_item":({0,({({"delivery_ob",({"object",}),}),({"sent_by",({"string",}),}),({"submit_time",({"int",}),}),({"delay_time",({"int",}),}),}),([]),}),]) file_name "/std/delivery.c" last_changed 1059516249