Difference between revisions of "Template:Moddef"
From DoomRL Wiki
Game Hunter (Talk | contribs) m (undid) |
Game Hunter (Talk | contribs) m (because Level.explosion has ten args holy shit) |
||
Line 26: | Line 26: | ||
| list = [[#{{lc:{{#sub:{{PAGENAME}}|8|0}}}}_{{{2}}}|{{{2}}}]] | | list = [[#{{lc:{{#sub:{{PAGENAME}}|8|0}}}}_{{{2}}}|{{{2}}}]] | ||
| desc = {{{2}}} | | desc = {{{2}}} | ||
− | }}({{#if: {{{5|}}}|{{#if: {{{6|}}} | {{modarg|{{{5}}}}} {{{6}}}}}{{#if:{{{7|}}}|<nowiki>, </nowiki>{{#if: {{{8|}}} |{{modarg|{{{7}}}}} {{{8}}}}}}}{{#if:{{{9|}}}|<nowiki>, </nowiki>{{#if: {{{10|}}} |{{modarg|{{{9}}}}} {{{10}}}}}}}{{#if:{{{11|}}}|<nowiki>, </nowiki>{{#if: {{{12|}}} |{{modarg|{{{11}}}}} {{{12}}}}}}}{{#if:{{{13|}}}|<nowiki>, </nowiki>{{#if: {{{14|}}} |{{modarg|{{{13}}}}} {{{14}}}}}}}{{#if:{{{15|}}}|<nowiki>, </nowiki>{{#if: {{{16|}}} |{{modarg|{{{15}}}}} {{{16}}}}}}}{{#if:{{{17|}}}|<nowiki>, </nowiki>{{#if: {{{18|}}} |{{modarg|{{{17}}}}} {{{18}}}}}}}{{#if:{{{19|}}}|<nowiki>, </nowiki>{{#if: {{{20|}}} |{{modarg|{{{19}}}}} {{{20}}}}}}}}}){{#if: {{{4|}}}|<nowiki> </nowiki>→ {{#if: {{#pos:{{{4}}}|,}}|{{modarg|{{#explode:{{{4}}}|,|0}}}},{{modarg|{{#explode:{{{4}}}|,|1}}}}|{{modarg|{{{4}}}}} }} }} | + | }}({{#if: {{{5|}}}|{{#if: {{{6|}}} | {{modarg|{{{5}}}}} {{{6}}}}}{{#if:{{{7|}}}|<nowiki>, </nowiki>{{#if: {{{8|}}} |{{modarg|{{{7}}}}} {{{8}}}}}}}{{#if:{{{9|}}}|<nowiki>, </nowiki>{{#if: {{{10|}}} |{{modarg|{{{9}}}}} {{{10}}}}}}}{{#if:{{{11|}}}|<nowiki>, </nowiki>{{#if: {{{12|}}} |{{modarg|{{{11}}}}} {{{12}}}}}}}{{#if:{{{13|}}}|<nowiki>, </nowiki>{{#if: {{{14|}}} |{{modarg|{{{13}}}}} {{{14}}}}}}}{{#if:{{{15|}}}|<nowiki>, </nowiki>{{#if: {{{16|}}} |{{modarg|{{{15}}}}} {{{16}}}}}}}{{#if:{{{17|}}}|<nowiki>, </nowiki>{{#if: {{{18|}}} |{{modarg|{{{17}}}}} {{{18}}}}}}}{{#if:{{{19|}}}|<nowiki>, </nowiki>{{#if: {{{20|}}} |{{modarg|{{{19}}}}} {{{20}}}}}}}}}{{#if:{{{21|}}}|<nowiki>, </nowiki>{{#if: {{{22|}}} |{{modarg|{{{21}}}}} {{{22}}}}}}}}}{{#if:{{{23|}}}|<nowiki>, </nowiki>{{#if: {{{24|}}} |{{modarg|{{{23}}}}} {{{24}}}}}}}}}){{#if: {{{4|}}}|<nowiki> </nowiki>→ {{#if: {{#pos:{{{4}}}|,}}|{{modarg|{{#explode:{{{4}}}|,|0}}}},{{modarg|{{#explode:{{{4}}}|,|1}}}}|{{modarg|{{{4}}}}} }} }} |
Revision as of 20:02, 28 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. (}}}})