Difference between revisions of "Template:IO"

From Valve Developer Community
Jump to: navigation, search
(Added support for Template:Removed)
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<noinclude>
+
; {{#if: {{{deprecated|}}} | <del> }}<code>{{{1}}}</code> {{#if: {{{to|}}} | <span style="font-weight: normal;">to</span> <code>{{{to}}}</code>}}{{#if: {{{param|}}} | {{KV Type|{{{param}}}}} }}{{#if: {{{deprecated|}}} | </del> }}{{#if: {{{only|}}} | &nbsp;{{#ifexist: Template:{{{only}}} only | {{{{{only}}} only}} | {{only|{{{only}}}}}}} }}{{#if: {{{since|}}} | &nbsp;{{#ifexist: Template:{{{since}}} add | {{{{{since}}} add}} | {{since|{{{since}}}}}}} }}{{#if: {{{removed|}}} | &nbsp;{{removed|{{{removed}}}}} }}{{#if: {{{also|}}} | &nbsp;{{#ifexist: Template:{{{also}}} also | {{{{{also}}} also}} | {{also|{{{also}}}}}}} }}{{#if: {{{nofgd|}}} | &nbsp;{{Not in FGD}} }}{{#if: {{{deprecated|}}} | &nbsp;{{obs}} }}
This template is used to generate input/output definitions on entity pages.
 
 
 
== Basic usage ==
 
<nowiki>{{IO|<name>|<description>}}</nowiki>
 
 
 
{{note|Don't forget to use [[Template:=]] to escape any "{{=}}" characters in the text.}}
 
 
 
== Named parameters ==
 
{| class=standard-table
 
! Parameter || Description || Example || Preview
 
|-
 
| <code>deprecated</code> || 这个输出或者输入已经被弃用。|| <code><nowiki>{{IO|已作废|说真的,请不要再用我啦!|deprecated=1}}</nowiki></code> || {{IO|OnDeprecated|Really, don't use me anymore!|deprecated=1}}
 
|-
 
| <code>nofgd</code> || This input/output isn't available in the official FGD. || <code><nowiki>{{IO|AddFGD|Because I'm not there!|nofgd=1}}</nowiki></code> || {{IO|AddFGD|Because I'm not there!|nofgd=1}}
 
|-
 
| <code>param</code> || Optional variable type for parameters. || <code><nowiki>{{IO|SetString|Updates the string.|param=string}}</nowiki></code> || {{IO|SetString|Updates the string.|param=string}}
 
|-
 
| <code>since</code> || This input/output is available since this game. Uses the template <nowiki>{{<game> add}}</nowiki>. || <code><nowiki>{{IO|OnAlienSwarm|I'm available in Portal 2, too!|since=AS}}</nowiki></code> || {{IO|OnAlienSwarm|I'm available in Portal 2, too!|since=AS}}
 
|-
 
| <code>also</code> || This input/output is also available in this game. Uses the template <nowiki>{{<game> also}}</nowiki>. || <code><nowiki>{{IO|OnAlienSwarm|I'm also available in Garry's Mod!|since=AS|also=GMOD}}</nowiki></code> || {{IO|OnAlienSwarm|I'm also available in Garry's Mod!|since=AS|also=GMOD}}
 
|-
 
| <code>only</code> || This input/output is available only in this game. Uses the template <nowiki>{{<game> only}}</nowiki>. || <code><nowiki>{{IO|OnAlienSwarm|I'm only available in Alien Swarm!|only=AS}}</nowiki></code> || {{IO|OnAlienSwarm|I'm only available in Alien Swarm!|only=AS}}
 
|-
 
| <code>to</code> || Use this to define a set of inputs/outputs with very similar names. || <code><nowiki>{{IO|Sound01|to=Sound24|There are many of us...}}</nowiki></code> || {{IO|Sound01|to=Sound24|There are many of us...}}
 
|}
 
 
 
== See also ==
 
* [[Template:KV]]
 
* [[Template:MatParam]]
 
 
 
<hr>
 
</noinclude>; {{#if: {{{deprecated|}}} | <del> }}<code>{{{1}}}</code> {{#if: {{{to|}}} | <span style="font-weight: normal;">to</span> <code>{{{to}}}</code>}}{{#if: {{{param|}}} | &nbsp;{{KV Type|{{{param}}}}} }}{{#if: {{{deprecated|}}} | </del> }}{{#if: {{{since|}}} | &nbsp;{{{{{since}}} add}} }}{{#if: {{{only|}}} | &nbsp;{{{{{only}}} only}} }}{{#if: {{{also|}}} | &nbsp;{{{{{also}}} also}} }}{{#if: {{{nofgd|}}} | &nbsp;{{Not in FGD}} }}{{#if: {{{deprecated|}}} | &nbsp;{{obs}} }}
 
 
: {{#if: {{{deprecated|}}} | Deprecated.&nbsp; }}{{#if: {{{2|}}} | {{{2}}}}}<noinclude>
 
: {{#if: {{{deprecated|}}} | Deprecated.&nbsp; }}{{#if: {{{2|}}} | {{{2}}}}}<noinclude>
[[Category:FGD Templates]]
+
{{documentation}}
 +
<!-- Add categories to the /doc subpage, not here -->
 
</noinclude>
 
</noinclude>

Latest revision as of 15:40, 8 May 2020

{{{1}}}
Template icon Template documentation[view] [edit] [history] [purge]

This template is used to generate input/output definitions on entity pages.

Usage

{{IO|<name>|<description>}}

Note:Don't forget to use Template:= to escape any "=" characters in the text.

Examples and Parameters

Parameter Description Example Preview
deprecated This input/output is deprecated and should no longer be used. {{IO|OnDeprecated|Really, don't use me anymore!|deprecated=1}}
OnDeprecated  <Obsolete>
Deprecated. Really, don't use me anymore!
nofgd This input/output isn't available in the official FGD. {{IO|AddFGD|Because I'm not there!|nofgd=1}}
AddFGD  !FGD
Because I'm not there!
param Optional variable type for parameters. {{IO|SetString|Updates the string.|param=string}}
SetString <string>
Updates the string.
since This input/output is available since this game. Can use either {{<game> add}} or {{Since}} templates. {{IO|OnAlienSwarm|I'm available in Portal 2, too!|since=AS}}
OnAlienSwarm  (in all games since <Alien Swarm>)
I'm available in Portal 2, too!
also This input/output is also available in this game. Can use either {{<game> also}} or {{Also}} templates. {{IO|OnAlienSwarm|I'm also available in Garry's Mod!|since=AS|also=GMOD}}
OnAlienSwarm  (in all games since <Alien Swarm>) (also in <Garry's Mod>)
I'm also available in Garry's Mod!
only This input/output is available only in this game. Can use either {{<game> only}} or {{Only}} templates. {{IO|OnAlienSwarm|I'm only available in Alien Swarm!|only=AS}}
OnAlienSwarm  (only in <Alien Swarm>)
I'm only available in Alien Swarm!
removed This input/output was removed in this game. Only uses the template {{Removed}}. {{IO|OnAlienSwarm|I'm available in Portal 2 too, but not in CS:GO!|since={{as}}|removed={{csgo}}}}
OnAlienSwarm  (in all games since <Alien Swarm>) (removed in <Counter-Strike: Global Offensive>)
I'm available in Portal 2 too, but not in CS:GO!
to Use this to define a set of inputs/outputs with very similar names. {{IO|Sound01|to=Sound24|There are many of us...}}
Sound01 to Sound24
There are many of us...

See also