Difference between revisions of "Template:Modarg"

From DoomRL Wiki

Jump to: navigation, search
m (test test test)
 
(19 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
<noinclude>
 
<noinclude>
 
Whenever an input or output argument is required for an API function, one should use <nowiki>{{modarg|arg}}</nowiki> to express it. This also handles cases where links are required. Some examples:
 
Whenever an input or output argument is required for an API function, one should use <nowiki>{{modarg|arg}}</nowiki> to express it. This also handles cases where links are required. Some examples:
*<nowiki>{{modarg|integer}}</nowiki> &rarr; {{modarg|integer}}
+
*<nowiki>{{modarg|integer}}</nowiki> &rarr; '''integer'''
*<nowiki>{{modarg|Being}}</nowiki> &rarr; {{modarg|Being}}
+
*<nowiki>{{modarg|Being}}</nowiki> &rarr; '''[[Modding:Being|Being]]'''
*<nowiki>{{modarg|CoordList}}</nowiki> &rarr; {{modarg|CoordList}}
+
*<nowiki>{{modarg|CoordList}}</nowiki> &rarr; '''[[Modding:Coord|CoordList]]'''
 
If there are more links required, feel free to add a line to the template.
 
If there are more links required, feel free to add a line to the template.
</noinclude>
+
</noinclude>{{#switch: {{{1}}}
<!--
+
  | {{#if: {{#pos:{{{1}}}|Affect}}      |{{{1}}} }} =  '''[[Modding:Affect|{{{1}}}]]'''
{{#switch: {{{1}}}
+
  | {{#if: {{#pos:{{{1}}}|affect}}      |{{{1}}} }} =  '''[[Modding:Affect|{{{1}}}]]'''
<noinclude>
+
  | {{#if: {{#pos:{{{1}}}|AI}}          |{{{1}}} }} =  '''[[Modding:AI|{{{1}}}]]'''
Whenever an input or output argument is required for an API function, one should use <nowiki>{{modarg|arg}}</nowiki> to express it. This also handles cases where links are required. Some examples:
+
  | {{#if: {{#pos:{{{1}}}|ai}}           |{{{1}}} }} =  '''[[Modding:AI|{{{1}}}]]'''
*<nowiki>{{modarg|integer}}</nowiki> &rarr; {{modarg|integer}}
+
  | {{#if: {{#pos:{{{1}}}|AltFire}}     |{{{1}}} }} =  '''[[Modding:Constants#AltFire|{{{1}}}]]'''
*<nowiki>{{modarg|Being}}</nowiki> &rarr; {{modarg|Being}}
+
  | {{#if: {{#pos:{{{1}}}|altfire}}     |{{{1}}} }} =  '''[[Modding:Constants#AltFire|{{{1}}}]]'''
*<nowiki>{{modarg|CoordList}}</nowiki> &rarr; {{modarg|CoordList}}
+
  | {{#if: {{#pos:{{{1}}}|AltReload}}   |{{{1}}} }} =  '''[[Modding:Constants#AltReload|{{{1}}}]]'''
If there are more links required, feel free to add a line to the template.
+
  | {{#if: {{#pos:{{{1}}}|altreload}}    |{{{1}}} }} =  '''[[Modding:Constants#AltReload|{{{1}}}]]'''
</noinclude>
+
  | {{#if: {{#pos:{{{1}}}|Area}}        |{{{1}}} }} =  '''[[Modding:Area|{{{1}}}]]'''
{{#switch: {{{1}}}
+
  | {{#if: {{#pos:{{{1}}}|area}}        |{{{1}}} }} =  '''[[Modding:area|{{{1}}}]]'''
 +
  | {{#if: {{#pos:{{{1}}}|Badge}}        |{{{1}}} }} =  '''[[Modding:Badge|{{{1}}}]]'''
 +
  | {{#if: {{#pos:{{{1}}}|badge}}        |{{{1}}} }} =  '''[[Modding:Badge|{{{1}}}]]'''
 +
  | {{#if: {{#pos:{{{1}}}|Being Flag}}  |{{{1}}} }} =  '''[[Modding:Constants#Being Flag|{{{1}}}]]'''
 +
  | {{#if: {{#pos:{{{1}}}|being flag}}  |{{{1}}} }} =  '''[[Modding:Constants#Being Flag|{{{1}}}]]'''
 
   | {{#if: {{#pos:{{{1}}}|Being}}        |{{{1}}} }} =  '''[[Modding:Being|{{{1}}}]]'''
 
   | {{#if: {{#pos:{{{1}}}|Being}}        |{{{1}}} }} =  '''[[Modding:Being|{{{1}}}]]'''
 +
  | {{#if: {{#pos:{{{1}}}|being}}        |{{{1}}} }} =  '''[[Modding:being|{{{1}}}]]'''
 +
  | {{#if: {{#pos:{{{1}}}|Cell Flags}}  |{{{1}}} }} =  '''[[Modding:Cell#Flags|{{{1}}}]]'''
 +
  | {{#if: {{#pos:{{{1}}}|cell flags}}  |{{{1}}} }} =  '''[[Modding:Cell#Flags|{{{1}}}]]'''
 +
  | {{#if: {{#pos:{{{1}}}|Cellset}}      |{{{1}}} }} =  '''[[Modding:Constants#Cellsets|{{{1}}}]]'''
 +
  | {{#if: {{#pos:{{{1}}}|cellset}}      |{{{1}}} }} =  '''[[Modding:Constants#Cellsets|{{{1}}}]]'''
 +
  | {{#if: {{#pos:{{{1}}}|Cell}}        |{{{1}}} }} =  '''[[Modding:Cell|{{{1}}}]]'''
 +
  | {{#if: {{#pos:{{{1}}}|cell}}        |{{{1}}} }} =  '''[[Modding:cell|{{{1}}}]]'''
 +
  | {{#if: {{#pos:{{{1}}}|Color Set}}    |{{{1}}} }} =  '''[[Modding:Color#Color Sets|{{{1}}}]]'''
 +
  | {{#if: {{#pos:{{{1}}}|color set}}    |{{{1}}} }} =  '''[[Modding:Color#Color Sets|{{{1}}}]]'''
 +
  | {{#if: {{#pos:{{{1}}}|Color}}        |{{{1}}} }} =  '''[[Modding:Color#Console Colors|{{{1}}}]]'''
 +
  | {{#if: {{#pos:{{{1}}}|color}}        |{{{1}}} }} =  '''[[Modding:Color#Console Colors|{{{1}}}]]'''
 
   | {{#if: {{#pos:{{{1}}}|Coord}}        |{{{1}}} }} =  '''[[Modding:Coord|{{{1}}}]]'''
 
   | {{#if: {{#pos:{{{1}}}|Coord}}        |{{{1}}} }} =  '''[[Modding:Coord|{{{1}}}]]'''
   | '''{{{1}}}'''
+
   | {{#if: {{#pos:{{{1}}}|coord}}        |{{{1}}} }} =  '''[[Modding:coord|{{{1}}}]]'''
}}
+
  | {{#if: {{#pos:{{{1}}}|DamageType}}  |{{{1}}} }} =  '''[[Modding:Constants#DamageType|{{{1}}}]]'''
 
+
  | {{#if: {{#pos:{{{1}}}|damagetype}}  |{{{1}}} }} =  '''[[Modding:Constants#DamageType|{{{1}}}]]'''
   | '''{{{1}}}'''
+
   | {{#if: {{#pos:{{{1}}}|Empty Flag}}  |{{{1}}} }} =  '''[[Modding:Constants#Empty Flags|{{{1}}}]]'''
 +
  | {{#if: {{#pos:{{{1}}}|empty flag}}  |{{{1}}} }} =  '''[[Modding:Constants#Empty Flags|{{{1}}}]]'''
 +
  | {{#if: {{#pos:{{{1}}}|Explosion Flag}}|{{{1}}} }} =  '''[[Modding:Constants#ExplosionFlag|{{{1}}}]]'''
 +
  | {{#if: {{#pos:{{{1}}}|fxplosion flag}}|{{{1}}} }} =  '''[[Modding:Constants#ExplosionFlag|{{{1}}}]]'''
 +
  | {{#if: {{#pos:{{{1}}}|Flag}}        |{{{1}}} }} =  '''[[Modding:Constants#Flags|{{{1}}}]]'''
 +
  | {{#if: {{#pos:{{{1}}}|flag}}        |{{{1}}} }} =  '''[[Modding:Constants#Flags|{{{1}}}]]'''
 +
  | {{#if: {{#pos:{{{1}}}|Item Flag}}    |{{{1}}} }} =  '''[[Modding:Item#Flags|{{{1}}}]]'''
 +
  | {{#if: {{#pos:{{{1}}}|item flag}}    |{{{1}}} }} =  '''[[Modding:Item#Flags|{{{1}}}]]'''
 +
  | {{#if: {{#pos:{{{1}}}|ItemSet}}      |{{{1}}} }} =  '''[[Modding:ItemSet|{{{1}}}]]'''
 +
  | {{#if: {{#pos:{{{1}}}|itemset}}      |{{{1}}} }} =  '''[[Modding:ItemSet|{{{1}}}]]'''
 +
  | {{#if: {{#pos:{{{1}}}|ItemType}}    |{{{1}}} }} =  '''[[Modding:Constants#ItemType|{{{1}}}]]'''
 +
  | {{#if: {{#pos:{{{1}}}|itemtype}}    |{{{1}}} }} =  '''[[Modding:Constants#ItemType|{{{1}}}]]'''
 +
  | {{#if: {{#pos:{{{1}}}|Item}}        |{{{1}}} }} =  '''[[Modding:Item|{{{1}}}]]'''
 +
  | {{#if: {{#pos:{{{1}}}|item}}        |{{{1}}} }} =  '''[[Modding:item|{{{1}}}]]'''
 +
  | {{#if: {{#pos:{{{1}}}|Klass}}        |{{{1}}} }} =  '''[[Modding:Klass|{{{1}}}]]'''
 +
  | {{#if: {{#pos:{{{1}}}|klass}}        |{{{1}}} }} =  '''[[Modding:Klass|{{{1}}}]]'''
 +
  | {{#if: {{#pos:{{{1}}}|Level Flag}}  |{{{1}}} }} =  '''[[Modding:Constants#Level Flag|{{{1}}}]]'''
 +
  | {{#if: {{#pos:{{{1}}}|level flag}}  |{{{1}}} }} =  '''[[Modding:Constants#Level Flag|{{{1}}}]]'''
 +
  | {{#if: {{#pos:{{{1}}}|Light Flag}}  |{{{1}}} }} =  '''[[Modding:Constants#Light Flag|{{{1}}}]]'''
 +
  | {{#if: {{#pos:{{{1}}}|light flag}}  |{{{1}}} }} =  '''[[Modding:Constants#Light Flag|{{{1}}}]]'''
 +
  | {{#if: {{#pos:{{{1}}}|Medal}}        |{{{1}}} }} =  '''[[Modding:Medal|{{{1}}}]]'''
 +
  | {{#if: {{#pos:{{{1}}}|medal}}        |{{{1}}} }} =  '''[[Modding:Medal|{{{1}}}]]'''
 +
  | {{#if: {{#pos:{{{1}}}|Missile Flag}} |{{{1}}} }} =  '''[[Modding:Missile#Flags|{{{1}}}]]'''
 +
  | {{#if: {{#pos:{{{1}}}|missile flag}} |{{{1}}} }} =  '''[[Modding:Missile#Flags|{{{1}}}]]'''
 +
  | {{#if: {{#pos:{{{1}}}|Missile}}      |{{{1}}} }} =  '''[[Modding:Missile|{{{1}}}]]'''
 +
  | {{#if: {{#pos:{{{1}}}|missile}}      |{{{1}}} }} =  '''[[Modding:Missile|{{{1}}}]]'''
 +
  | {{#if: {{#pos:{{{1}}}|ModArray}}    |{{{1}}} }} =  '''[[Modding:ModArray|{{{1}}}]]'''
 +
  | {{#if: {{#pos:{{{1}}}|modArray}}    |{{{1}}} }} =  '''[[Modding:ModArray|{{{1}}}]]'''
 +
  | {{#if: {{#pos:{{{1}}}|Player}}      |{{{1}}} }} =  '''[[Modding:Player|{{{1}}}]]'''
 +
  | {{#if: {{#pos:{{{1}}}|player}}      |{{{1}}} }} =  '''[[Modding:Player|{{{1}}}]]'''
 +
  | {{#if: {{#pos:{{{1}}}|Range}}        |{{{1}}} }} =  '''[[Modding:core/functions:resolverange|{{{1}}}]]'''
 +
  | {{#if: {{#pos:{{{1}}}|range}}        |{{{1}}} }} =  '''[[Modding:core/functions:resolverange|{{{1}}}]]'''
 +
  | {{#if: {{#pos:{{{1}}}|Resistance}}  |{{{1}}} }} =  '''[[Modding:Constants#Resistance|{{{1}}}]]'''
 +
  | {{#if: {{#pos:{{{1}}}|resistance}}  |{{{1}}} }} =  '''[[Modding:Constants#Resistance|{{{1}}}]]'''
 +
  | {{#if: {{#pos:{{{1}}}|Room}}        |{{{1}}} }} =  '''[[Modding:Generator|{{{1}}}]]'''
 +
  | {{#if: {{#pos:{{{1}}}|room}}        |{{{1}}} }} =  '''[[Modding:Generator|{{{1}}}]]'''
 +
  | {{#if: {{#pos:{{{1}}}|Sprite}}      |{{{1}}} }} =  '''[[Modding:Sprites|{{{1}}}]]'''
 +
  | {{#if: {{#pos:{{{1}}}|sprite}}      |{{{1}}} }} =  '''[[Modding:Sprites|{{{1}}}]]'''
 +
  | {{#if: {{#pos:{{{1}}}|StatusEffect}} |{{{1}}} }} =  '''[[Modding:Constants#StatusEffect|{{{1}}}]]'''
 +
  | {{#if: {{#pos:{{{1}}}|Trait}}        |{{{1}}} }} =  '''[[Modding:Trait|{{{1}}}]]'''
 +
  | {{#if: {{#pos:{{{1}}}|trait}}        |{{{1}}} }} =  '''[[Modding:Trait|{{{1}}}]]'''
 +
  | <b>{{{1}}}</b>
 
}}
 
}}
-->
 

Latest revision as of 22:47, 21 April 2013

Whenever an input or output argument is required for an API function, one should use {{modarg|arg}} to express it. This also handles cases where links are required. Some examples:

  • {{modarg|integer}} → integer
  • {{modarg|Being}} → Being
  • {{modarg|CoordList}} → CoordList

If there are more links required, feel free to add a line to the template. {{{1}}}

Personal tools