Difference between revisions of "Template:Moddef"
From DoomRL Wiki
Game Hunter (Talk | contribs) m (wat) |
Game Hunter (Talk | contribs) m (anchor was added) |
||
Line 3: | Line 3: | ||
#Sets the type of expression. Currently there are two cases: | #Sets the type of expression. Currently there are two cases: | ||
#*<tt>list</tt> is what's used in the table: it automatically comes with the necessary link for the description's anchor. | #*<tt>list</tt> is what's used in the table: it automatically comes with the necessary link for the description's anchor. | ||
− | #*<tt>desc</tt> is what's used underneath the table: | + | #*<tt>desc</tt> is what's used underneath the table: this provides the anchor that is linked to the list. |
#Sets the function name. For example, if the function is called <tt>Level.place_tile</tt>, then this should be set to <tt>place_tile</tt>. | #Sets the function name. For example, if the function is called <tt>Level.place_tile</tt>, then this should be set to <tt>place_tile</tt>. | ||
#Determines the function type. There are two cases: | #Determines the function type. There are two cases: |
Revision as of 01:13, 27 January 2012
This is the prototypical template for expressing API functions. It works with the following args:
- 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: this provides the anchor that is linked to the list.
- Sets the function name. For example, if the function is called Level.place_tile, then this should be set to place_tile.
- Determines the function type. There are two cases:
- dot is the dot form
- cln is the colon form
- 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.
- 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.
( )