Template:Moddef

From DoomRL Wiki

Revision as of 20:04, 26 January 2012 by Game Hunter (Talk | contribs)

Jump to: navigation, search

This is the prototypical template for expressing API functions. It works with the following args:

  1. Sets the type of expression. Currently there are two cases:
    • list is what's used in the table: it automatically comes with the necessary link for the description's anchor.
    • desc is what's used underneath the table: no link here (currently no anchor provided but this is on the TODO).
  2. Sets the function name. For example, if the function is called Level.place_tile, then this should be set to place_tile.
  3. Determines the function type. There are two cases:
    • dot is the dot form
    • cln is the colon form
  4. Sets the output argument, if any. Leaving this blank should always be done for list functions. You can include up to two comma-separated outputs.
  5. From here, input arguments are set. These are be handled in pairs: the first should be the arg type, while the second should be the arg name. You can include up to eight arg pairs in this manner.

Please note that this template is set up to include information based on the page name, so they can only be used on their appropriate pages. Thus, you can write being API functions using this template for the being page, but not for the coord page. See Template:Modarg for argument handling.


Personal tools