0.4 - @FUNCTIONS: No, no! Not TH@!
Submitted by Trispis on Fri, 2006-09-15 04:02.
@FUNCTIONS
The WARPEDcore creates and utilizes two libraries of custom @functions, generally categorized as core functions (~functions) and module functions (.functions).
- ~functions
- The Tilde (~): Functions which have been incorporated into the WARPEDcore either as a primary distribution function or as one of the various primary module add-ons will have the tilde (~) as their first character. This is the only unique and/or mandatory feature of these functions. (i.e., on the WARPEDcore, their attributes will be named in the format: FN_~<name>)
- The List: Below is a list of all known functions currently included in the WARPEDcore and/or it's primary modules.
- ~([version|indate|update]) - This is the primary WARPEDcore function. If no argument is given, simply returns the WARPEDcore #dbref. If one of the optional arguments is input, it returns information about the WARPEDcore accordingly. Any other input results in a #-1 error.
- ~db(<module>[, <element>]) - This function returns the primary (aka first, aka main) #dbref of any registered <module>. If the optional <element> (single integer only) is provided it can be used to return other subsequent registered #dbrefs for <module>.
- ~ldb(<module>) - This returns all #dbrefs registered for <module>.
- .functions
- The Dot (.): Functions which are added by modules other than the primary WARPEDcore should use the dot (.) as their first character. This is the only unique and/or recommended feature of these functions. Ideally, these @functions will be installed on one of the 3 @function THINGs described in the DESIGN section (above). (i.e., on the various @function objects, their attributes will be named in the format: FN_.<name>)
- Examples: Below are some fictitious examples for how one might use this aspect of the WARPEDcore.
- .weather(<season|short|long>) - this is an example of how one might implement a custom function for accessing some known features of "Keran's Weather".
- .bb(<hdr|bdy>,<groupname|groupnum>,<messagetitle|messagenum>) - this is an example of how one might implement a custom function for accessing messages from "Myrddin's Bulletin Board".
- +functions
- The Plus (+): Functions which are added by the game maintainers and which are unique to the particular game on which they are installed, should use the plus (+) as their first character. This is the only unique and/or recommended feature of these functions. Ideally, these @functions will be installed on one of the 3 @function THINGs described in the DESIGN section (above) using attribute names such as: FN_+<name>.
- Examples:
- +space2tilde(<string>) - it seems every MUSH has a @function similar to this, to convert "something like this" into "something~like~this"
- +tilde2space(<string>) - and, of course, the reverse, to convert "this~string" into "this string"
»
- Printer-friendly version
- Login or register to post comments

Click 
