Template:BSLfuncinfo: Difference between revisions
Jump to navigation
Jump to search
(we have to escape the newlines or they pile up; create newlines inside the #ifs using the break tag?) |
(applying same method to next row) |
||
Line 28: | Line 28: | ||
{{Pipe}}[[{{{name}}}|[edit]]]}}|}} | {{Pipe}}[[{{{name}}}|[edit]]]}}|}} | ||
|- | |- | ||
|'''{{{name}}}(''' | |'''{{{name}}}('''<!-- | ||
{{#if:{{{arg1name|}}}|<!-- | -->{{#if:{{{arg1name|}}}|<br /><!-- if this arg exists... --> | ||
{{Pipe}}align="center"{{Pipe}}'''<!-- create a cell, then... | {{Pipe}}align="center"{{Pipe}}'''<!-- create a cell, then... | ||
-->{{#if:{{{arg1optional|}}}|''|}}<!-- start italics if optional arg | -->{{#if:{{{arg1optional|}}}|''|}}<!-- start italics if optional arg | ||
Line 35: | Line 35: | ||
-->{{#if:{{{arg1altname|}}}| <u>or</u> {{{arg1altname|}}}}}<!-- print " or " and alternate arg name if supplied | -->{{#if:{{{arg1altname|}}}| <u>or</u> {{{arg1altname|}}}}}<!-- print " or " and alternate arg name if supplied | ||
-->{{#if:{{{arg1optional|}}}|''|}}<!-- end italics if optional arg | -->{{#if:{{{arg1optional|}}}|''|}}<!-- end italics if optional arg | ||
-->{{#if:{{{arg2name|}}}|, |}}|<!-- | -->{{#if:{{{arg2name|}}}|, |}}|<br /><!-- and if there is a next arg, print a comma --> | ||
{{Pipe}} );}}<!-- else if no args, just close parentheses | {{Pipe}} );}}<!-- else if no args, just close parentheses | ||
--> | -->{{#if:{{{arg2name|}}}|<br /> | ||
{{#if:{{{arg2name|}}}| | |||
{{Pipe}}align="center"{{Pipe}}'''<!-- | {{Pipe}}align="center"{{Pipe}}'''<!-- | ||
-->{{#if:{{{arg2optional|}}}|''|}}<!-- | -->{{#if:{{{arg2optional|}}}|''|}}<!-- | ||
Line 44: | Line 43: | ||
-->{{#if:{{{arg2altname|}}}| <u>or</u> {{{arg2altname|}}}}}<!-- | -->{{#if:{{{arg2altname|}}}| <u>or</u> {{{arg2altname|}}}}}<!-- | ||
-->{{#if:{{{arg2optional|}}}|''|}}<!-- | -->{{#if:{{{arg2optional|}}}|''|}}<!-- | ||
-->{{#if:{{{arg3name|}}}|, |}}| | -->{{#if:{{{arg3name|}}}|, |}}|<br /> | ||
{{Pipe}}{{#if:{{{arg1name|}}}| ); |}}}}<!-- if this was last arg, close parentheses | {{Pipe}}{{#if:{{{arg1name|}}}| ); |}}}}<!-- if this was last arg, close parentheses | ||
--> | -->{{#if:{{{arg3name|}}}|<br /> | ||
{{#if:{{{arg3name|}}}| | |||
{{Pipe}}align="center"{{Pipe}}'''<!-- | {{Pipe}}align="center"{{Pipe}}'''<!-- | ||
-->{{#if:{{{arg3optional|}}}|''|}}<!-- | -->{{#if:{{{arg3optional|}}}|''|}}<!-- | ||
Line 53: | Line 51: | ||
-->{{#if:{{{arg3altname|}}}| <u>or</u> {{{arg3altname|}}}}}<!-- | -->{{#if:{{{arg3altname|}}}| <u>or</u> {{{arg3altname|}}}}}<!-- | ||
-->{{#if:{{{arg3optional|}}}|''|}}<!-- | -->{{#if:{{{arg3optional|}}}|''|}}<!-- | ||
-->{{#if:{{{arg4name|}}}|, |}}| | -->{{#if:{{{arg4name|}}}|, |}}|<br /> | ||
{{Pipe}}{{#if:{{{arg2name|}}}| ); |}}}}<!-- | {{Pipe}}{{#if:{{{arg2name|}}}| ); |}}}}<!-- | ||
--> | -->{{#if:{{{arg4name|}}}|<br /> | ||
{{#if:{{{arg4name|}}}| | |||
{{Pipe}}align="center"{{Pipe}}'''<!-- | {{Pipe}}align="center"{{Pipe}}'''<!-- | ||
-->{{#if:{{{arg4optional|}}}|''|}}<!-- | -->{{#if:{{{arg4optional|}}}|''|}}<!-- | ||
Line 62: | Line 59: | ||
-->{{#if:{{{arg4altname|}}}| <u>or</u> {{{arg4altname|}}}}}<!-- | -->{{#if:{{{arg4altname|}}}| <u>or</u> {{{arg4altname|}}}}}<!-- | ||
-->{{#if:{{{arg4optional|}}}|''|}}<!-- | -->{{#if:{{{arg4optional|}}}|''|}}<!-- | ||
-->{{#if:{{{arg5name|}}}|, |}}| | -->{{#if:{{{arg5name|}}}|, |}}|<br /> | ||
{{Pipe}}{{#if:{{{arg3name|}}}| ); |}}}}<!-- | {{Pipe}}{{#if:{{{arg3name|}}}| ); |}}}}<!-- | ||
--> | -->{{#if:{{{arg5name|}}}|<br /> | ||
{{#if:{{{arg5name|}}}| | |||
{{Pipe}}align="center"{{Pipe}}'''<!-- | {{Pipe}}align="center"{{Pipe}}'''<!-- | ||
-->{{#if:{{{arg5optional|}}}|''|}}<!-- | -->{{#if:{{{arg5optional|}}}|''|}}<!-- | ||
Line 71: | Line 67: | ||
-->{{#if:{{{arg5altname|}}}| <u>or</u> {{{arg5altname|}}}}}<!-- | -->{{#if:{{{arg5altname|}}}| <u>or</u> {{{arg5altname|}}}}}<!-- | ||
-->{{#if:{{{arg5optional|}}}|''|}}<!-- | -->{{#if:{{{arg5optional|}}}|''|}}<!-- | ||
-->{{#if:{{{arg6name|}}}|, |}}| | -->{{#if:{{{arg6name|}}}|, |}}|<br /> | ||
{{Pipe}}{{#if:{{{arg4name|}}}| ); |}}}}<!-- | {{Pipe}}{{#if:{{{arg4name|}}}| ); |}}}}<!-- | ||
--> | -->{{#if:{{{arg6name|}}}|<br /> | ||
{{#if:{{{arg6name|}}}| | |||
{{Pipe}}align="center"{{Pipe}}'''<!-- | {{Pipe}}align="center"{{Pipe}}'''<!-- | ||
-->{{#if:{{{arg6optional|}}}|''|}}<!-- | -->{{#if:{{{arg6optional|}}}|''|}}<!-- | ||
Line 80: | Line 75: | ||
-->{{#if:{{{arg6altname|}}}| <u>or</u> {{{arg6altname|}}}}}<!-- | -->{{#if:{{{arg6altname|}}}| <u>or</u> {{{arg6altname|}}}}}<!-- | ||
-->{{#if:{{{arg6optional|}}}|''|}}<!-- | -->{{#if:{{{arg6optional|}}}|''|}}<!-- | ||
-->{{#if:{{{arg7name|}}}|, |}}| | -->{{#if:{{{arg7name|}}}|, |}}|<br /> | ||
{{Pipe}}{{#if:{{{arg5name|}}}| ); |}}}}<!-- | {{Pipe}}{{#if:{{{arg5name|}}}| ); |}}}}<!-- | ||
--> | -->{{#if:{{{arg7name|}}}|<br /> | ||
{{#if:{{{arg7name|}}}| | |||
{{Pipe}}align="center"{{Pipe}}'''<!-- | {{Pipe}}align="center"{{Pipe}}'''<!-- | ||
-->{{#if:{{{arg7optional|}}}|''|}}<!-- | -->{{#if:{{{arg7optional|}}}|''|}}<!-- | ||
Line 89: | Line 83: | ||
-->{{#if:{{{arg7altname|}}}| <u>or</u> {{{arg7altname|}}}}}<!-- | -->{{#if:{{{arg7altname|}}}| <u>or</u> {{{arg7altname|}}}}}<!-- | ||
-->{{#if:{{{arg7optional|}}}|''|}}<!-- | -->{{#if:{{{arg7optional|}}}|''|}}<!-- | ||
-->{{#if:{{{arg8name|}}}|, |}}| | -->{{#if:{{{arg8name|}}}|, |}}|<br /> | ||
{{Pipe}}{{#if:{{{arg6name|}}}| ); |}}}}<!-- | {{Pipe}}{{#if:{{{arg6name|}}}| ); |}}}}<!-- | ||
--> | -->{{#if:{{{arg8name|}}}|<br /> | ||
{{#if:{{{arg8name|}}}| | |||
{{Pipe}}align="center"{{Pipe}}'''<!-- | {{Pipe}}align="center"{{Pipe}}'''<!-- | ||
-->{{#if:{{{arg8optional|}}}|''|}}<!-- | -->{{#if:{{{arg8optional|}}}|''|}}<!-- | ||
-->{{{arg8name|}}}<!-- | -->{{{arg8name|}}}<!-- | ||
-->{{#if:{{{arg8altname|}}}| <u>or</u> {{{arg8altname|}}}}}<!-- | -->{{#if:{{{arg8altname|}}}| <u>or</u> {{{arg8altname|}}}}}<!-- | ||
-->{{#if:{{{arg8optional|}}}|''|}}<!-- | -->{{#if:{{{arg8optional|}}}|''|}}|<br /><!-- | ||
{{Pipe}}{{#if:{{{arg7name|}}}| ); |}}}} | {{Pipe}}{{#if:{{{arg7name|}}}| ); |}}}} | ||
|- | |- |
Revision as of 04:55, 22 December 2015
BSLfuncinfo allows for standardized listing of BSL functions. Since BSL allows for functions to take up to eight arguments, and each argument can be described here by up to six parameters, this makes BSLfuncinfo the most complex template on the wiki. However, you'll rarely need to use more than a few of these parameters to describe an average function.
Parameters:
- type
- Return type of function; should be "int", "string", "float", "bool", or "void".
- default
- Default return value of function, if there is one at the time the level starts.
- name
- Name of function.
- mac, win
- You don't have to use these unless the function is not available and working on one platform; set the appropriate parameter(s) to "no" if that is the case.
- arg[1-8]optional
- If this argument can be omitted, set this to "yes".
- arg[1-8]default
- Optional arguments have default assumed values that are used when the argument is not provided; give those values here.
- arg[1-8]type
- If these arguments to the BSL function exist, give their types here.
- arg[1-8]name
- If these arguments to the BSL function exist, give their names here.
- arg[1-8]alttype
- If a BSL function can take more than one kind of data in a given argument position, give the second argument type here.
- arg[1-8]altname
- If a BSL function can take more than one kind of data in a given argument position, give the second argument name here.
Below is a default blank call for all parameters up through the fourth function argument, to save some time. You can omit any parameters you don't need when adding this template to a page. However, you may find it easier to use the GUI for this template that is provided by XEB.
{{BSLfuncinfo |type= |default= |name= |mac= |win=
|arg1optional= |arg1default= |arg1type= |arg1name= |arg1alttype= |arg1altname=
|arg2optional= |arg2default= |arg2type= |arg2name= |arg2alttype= |arg2altname=
|arg3optional= |arg3default= |arg3type= |arg3name= |arg3alttype= |arg3altname=
|arg4optional= |arg4default= |arg4type= |arg4name= |arg4alttype= |arg4altname= }}