Difference between revisions of "Template:Function"
Jump to navigation
Jump to search
added functionality for alts and 2nd alts to have different return values and reference parameters
imported>DragoonWraith |
imported>DragoonWraith (added functionality for alts and 2nd alts to have different return values and reference parameters) |
||
Line 9: | Line 9: | ||
valid values: CS1 (TES CS 1.0), CS1.1 (TES CS 1.1), CS1.2 (TES CS 1.2), OBSE | valid values: CS1 (TES CS 1.0), CS1.1 (TES CS 1.1), CS1.2 (TES CS 1.2), OBSE | ||
summary = description of the function | summary = description of the function | ||
''name'' = the name of the function. The page name is the default value. | ''name'' = the name of the function. The page name is the default value. | ||
''alias'' = An abbreviated version of the function name that can be | ''alias'' = An abbreviated version of the function name that can be | ||
used instead of the long name. | used instead of the long name. | ||
''returnVal '' = what the function returns. | ''returnVal '' = what the function returns. | ||
''returnType'' = the type of the returned value. | ''returnType'' = the type of the returned value. | ||
Line 23: | Line 20: | ||
''arguments'' = List of arguments specified using the {{[[:Template:FunctionArgument|FunctionArgument]]}} template, | ''arguments'' = List of arguments specified using the {{[[:Template:FunctionArgument|FunctionArgument]]}} template, | ||
or any other wiki syntax. | or any other wiki syntax. | ||
''altName'' = the name of an alternate version of a function (e.g. the "C" Magic Effect functions) | |||
''altAlias'' = the alias of the alternate function. | |||
''altRetVal'' = the return value of the alternate function, if different. Defaults to the same as the regular function. | |||
''altRetType'' = the return type of the alternate function, if different. Defaults to the same as the regular function. | |||
''altRefType'' = if different from the regular function, the reference used by the alternate version. | |||
''altRefOpt'' = whether the alternate's reference is optional. | |||
''altArgs'' = List of arguments for the alternate version of the function. | ''altArgs'' = List of arguments for the alternate version of the function. | ||
''alt2Args'' = List of arguments for the alternate version of the function. | |||
''alt2Name'' = the name of a second alternate version of a function | |||
''alt2Alias'' = the alias of any second alternate version of a function | |||
''alt2RetVal'' = the return value of the second alternate function, if different. Defaults to the same as the regular function. | |||
''alt2RetType'' = the return type of the second alternate function, if different. Defaults to the same as the regular function. | |||
''alt2RefType'' = if different from the regular function, the reference used by the second alternate version. | |||
''alt2RefOpt'' = whether the second alternate's reference is optional. | |||
''alt2Args'' = List of arguments for the second alternate version of the function. | |||
''example'' = optionally, the function used as part of a script to serve as an example | ''example'' = optionally, the function used as part of a script to serve as an example | ||
''CategoryList'' = the list of categories to which the page belongs | ''CategoryList'' = the list of categories to which the page belongs | ||
Line 119: | Line 131: | ||
-->{{ #if: {{{alt|{{{altName|}}}}}} | | -->{{ #if: {{{alt|{{{altName|}}}}}} | | ||
{{FunctionSyntax | name = {{{alt|{{{altName|}}}}}} | returnType = {{{returnType|void}}} | returnVal = {{{returnVal|}}} | referenceType = {{{referenceType|}}} | referenceOpt = {{{referenceOpt|}}} | arguments = {{{altArgs|}}} }}<!-- | {{FunctionSyntax | name = {{{alt|{{{altName|}}}}}} | returnType = {{{altRetType|{{{returnType|void}}} }}} | returnVal = {{{altRetVal|{{{returnVal|}}} }}} | referenceType = {{{altRefType|{{{referenceType|}}} }}} | referenceOpt = {{{altRefOpt|{{{referenceOpt|}}} }}} | arguments = {{{altArgs|}}} }}<!-- | ||
Alternate Alias: | Alternate Alias: | ||
-->{{ #if: {{{altAlias|}}} | | -->{{ #if: {{{altAlias|}}} | | ||
{{FunctionSyntax | name = {{{altAlias}}} | returnType = {{{returnType|void}}} | returnVal = {{{returnVal|}}} | referenceType = {{{referenceType|}}} | referenceOpt = {{{referenceOpt|}}} | arguments = {{{alt2Args|}}} }} | <!--no alt alias--> }} | <!--no alt--> }}<!-- | {{FunctionSyntax | name = {{{altAlias}}} | returnType = {{{altRetType|{{{returnType|void}}} }}} | returnVal = {{{altRetVal|{{{returnVal|}}} }}} | referenceType = {{{altRefType|{{{referenceType|}}} }}} | referenceOpt = {{{altRefOpt|{{{referenceOpt|}}} }}} | arguments = {{{alt2Args|}}} }} | <!--no alt alias--> }} | <!--no alt--> }}<!-- | ||
Second Alternate: | Second Alternate: | ||
-->{{ #if: {{{alt2|{{{alt2Name|}}}}}} | | -->{{ #if: {{{alt2|{{{alt2Name|}}}}}} | | ||
{{FunctionSyntax | name = {{{alt2|{{{alt2Name|}}}}}} | returnType = {{{returnType|void}}} | returnVal = {{{returnVal|}}} | referenceType = {{{referenceType|}}} | referenceOpt = {{{referenceOpt|}}} | arguments = {{{alt2Args|}}} }}<!-- | {{FunctionSyntax | name = {{{alt2|{{{alt2Name|}}}}}} | returnType = {{{alt2RetType|{{{returnType|void}}} }}} | returnVal = {{{alt2RetVal|{{{returnVal|}}} }}} | referenceType = {{{alt2RefType|{{{referenceType|}}} }}} | referenceOpt = {{{alt2RefOpt|{{{referenceOpt|}}} }}} | arguments = {{{alt2Args|}}} }}<!-- | ||
Second Alternate Alias: | Second Alternate Alias: | ||
-->{{ #if: {{{alt2Alias|}}} | | -->{{ #if: {{{alt2Alias|}}} | | ||
{{FunctionSyntax | name = {{{ | {{FunctionSyntax | name = {{{alt2Alias}}} | returnType = {{{alt2RetType|{{{returnType|void}}} }}} | returnVal = {{{alt2RetVal|{{{returnVal|}}} }}} | referenceType = {{{alt2RefType|{{{referenceType|}}} }}} | referenceOpt = {{{alt2RefOpt|{{{referenceOpt|}}} }}} | arguments = {{{alt2Args|}}} }} | <!--no alt alias--> }} | <!--no alt--> }}<!-- | ||
short summary of the function: --> | short summary of the function: --> |