Template:KV:zh-cn: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Update page)
(Undo revision 245757 by 1416006136 (talk))
Tag: Undo
Line 1: Line 1:
<includeonly>
<noinclude>
; {{#if: {{{deprecated|}}} | <del> }}{{{1}}} {{#if: {{{intn|}}} | <span style="font-weight: normal;"><code>{{Hover info|dotted=no|此键值的内部名称;这就是引擎知道这个键值的原因。当 SmartEdit 被禁用时,这些键值会在 Hammer 中显示,或者对于不在 FGD 中的键值。|({{{intn}}})}}</code></span> }} {{#if: {{{to|}}}{{{intn2|}}} | <span style="font-weight: normal;">to</span> {{{to}}}{{#if:{{{intn2|}}} | &nbsp;<span style="font-weight: normal;"><code>{{Hover info|dotted=no|此键值的内部名称;这就是引擎知道这个键值的原因。当 SmartEdit 被禁用时,这些键值会在 Hammer 中显示,或者对于不在 FGD 中的键值。|({{{intn2}}})}}</code></span>}} }} {{#if: {{{2|}}} | {{KV Type|{{{2}}}}} }}{{#if: {{{deprecated|}}} | </del> }}{{#if: {{{only|}}} | &nbsp;{{only:zh-cn|{{{{{only}}}}}}} }}{{#if: {{{since|}}} | &nbsp;{{since:zh-cn|{{{{{since}}}}}}} }}{{#if: {{{removed|}}} | &nbsp;{{removed:zh-cn|{{{{{removed}}}}}}} }}{{#if: {{{not|}}} | &nbsp;{{#ifexist: Template:{{{not}}} not | {{{{{not}}} not}} | {{not|{{{not}}}}}}} }}{{#if: {{{also|}}} | &nbsp;{{also:zh-cn|{{{{{also}}}}}}} }}{{#if: {{{nofgd|}}} | &nbsp;{{Not in FGD}} }}{{#if: {{{deprecated|}}} | &nbsp;{{obs}} }}
: {{#if: {{{deprecated|}}} | Deprecated.&nbsp; }}{{#if: {{{3|}}} | {{{3}}}}}</includeonly><noinclude>
{{lang|Template:KV}}
{{lang|Template:KV}}
{{documentation}}
本模板是用于实体页面生成键值定义的。
<!-- Add categories to the /doc subpage, not here -->
 
== 基本用法 ==
<nowiki>{{KV:zh-cn|名称|变量类型|描述}}</nowiki>
 
{{note:zh-cn|记得使用[[Template:=]]来转义所有的「{{=}}」字符。}}
 
== 预设的参数 ==
{| class=standard-table
! 参数 || 描述 || 例子 || 预览
|-
| <code>deprecated</code> || 该键值已作废,不宜继续使用。 || <code><nowiki>{{KV:zh-cn|I'm deprecated|字符串|真的,不要再用我啦!|deprecated=1}}</nowiki></code> || {{KV:zh-cn|I'm deprecated|字符串|真的,不要再用我啦!|deprecated=1}}
|-
| <code>nofgd</code> || 该键值没有包含在官方FGD中。 || <code><nowiki>{{KV:zh-cn|Add me to the FGD|布尔值|因为我不在那里!|nofgd=1}}</nowiki></code> || {{KV:zh-cn|Add me to the FGD|布尔值|因为我不在那里!|nofgd=1}}
|-
| <code>since</code> || 该键值自该游戏起可以使用。它使用了模板<nowiki>{{<game> add}}</nowiki>。 || <code><nowiki>{{KV:zh-cn|I like Alien Swarm|整数|我也可以在Portal 2中使用!|since=AS}}</nowiki></code> || {{KV:zh-cn|I like Alien Swarm|整数|我也可以在Portal 2中使用!|since=AS}}
|-
| <code>also</code> || 该材质参数在该游戏中也可以使用。它使用了模板<nowiki>{{<game> also}}</nowiki>。 || <code><nowiki>{{KV:zh-cn|I like Alien Swarm|整数|我也可以在Garry's Mod中使用!|since=AS|also=GMOD}}</nowiki></code> || {{KV:zh-cn|I like Alien Swarm|整数|我也可以在Garry's Mod中使用!|since=AS|also=GMOD}}
|-
| <code>only</code> || 该材质参数只能在该游戏中使用。它使用了模板<nowiki>{{<game> only}}</nowiki>。 || <code><nowiki>{{KV:zh-cn|I love Alien Swarm|整数|我只能在Alien Swarm中使用!|only=AS}}</nowiki></code> || {{KV:zh-cn|I love Alien Swarm|整数|我只能在Alien Swarm中使用!|only=AS}}
|-
| <code>to</code> || 使用这个来定义一系列名字很相似的键值。 || <code><nowiki>{{KV:zh-cn|Sound 01|to=Sound 24|字符串|我们有许多……}}</nowiki></code> || {{KV:zh-cn|Sound 01|to=Sound 24|字符串|我们有许多……}}
|}
 
== 参见 ==
* [[Template:MatParam:zh-cn]]
* [[Template:IO:zh-cn]]
 
<hr>
</noinclude>; {{#if: {{{deprecated|}}} | <del> }} {{{1}}} {{#if: {{{to|}}} | <span style="font-weight: normal;">到</span> {{{to}}} }} {{#if: {{{2|}}} | {{KV Type:zh-cn|{{{2}}} }} }} {{#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|}}} | 已作废。&nbsp; }} {{#if: {{{3|}}} | {{{3}}} }}<noinclude>
[[Category:FGD Templates:zh-cn]]
</noinclude>
</noinclude>

Revision as of 01:46, 28 August 2021

本模板是用于实体页面生成键值定义的。

基本用法

{{KV:zh-cn|名称|变量类型|描述}}

Template:Note:zh-cn

预设的参数

参数 描述 例子 预览
deprecated 该键值已作废,不宜继续使用。 {{KV:zh-cn|I'm deprecated|字符串|真的,不要再用我啦!|deprecated=1}}
I'm deprecated <字符串 >  Obsolete
已作废。  真的,不要再用我啦!
nofgd 该键值没有包含在官方FGD中。 {{KV:zh-cn|Add me to the FGD|布尔值|因为我不在那里!|nofgd=1}}
Add me to the FGD <布尔值 >  !FGD
因为我不在那里!
since 该键值自该游戏起可以使用。它使用了模板{{<game> add}}。 {{KV:zh-cn|I like Alien Swarm|整数|我也可以在Portal 2中使用!|since=AS}}
I like Alien Swarm <整数 >  Template:AS add
我也可以在Portal 2中使用!
also 该材质参数在该游戏中也可以使用。它使用了模板{{<game> also}}。 {{KV:zh-cn|I like Alien Swarm|整数|我也可以在Garry's Mod中使用!|since=AS|also=GMOD}}
I like Alien Swarm <整数 >  Template:AS add  Template:GMOD also
我也可以在Garry's Mod中使用!
only 该材质参数只能在该游戏中使用。它使用了模板{{<game> only}}。 {{KV:zh-cn|I love Alien Swarm|整数|我只能在Alien Swarm中使用!|only=AS}}
I love Alien Swarm <整数 >  Template:AS only
我只能在Alien Swarm中使用!
to 使用这个来定义一系列名字很相似的键值。 {{KV:zh-cn|Sound 01|to=Sound 24|字符串|我们有许多……}}
Sound 01 Sound 24 <字符串 >
我们有许多……

参见


{{{1}}}