“Template:Infobox fish”的版本间的差异

来自Stardew Valley Wiki
跳到导航 跳到搜索
(Add auto-translation of word "any" in parameter "time")
 
(未显示3个用户的14个中间版本)
第1行: 第1行:
<includeonly><!--
+
<includeonly>{{#switch:{{NAMESPACE}}
 
+
|{{ns:User}}|{{ns:User talk}}=
// TRANSLATIONS
+
|#default=<div id="infoboxborder">
-->{{#arraydefine:$lang_information  | 信息 }}<!--
+
{{{!}} id="infoboxtable"
-->{{#arraydefine:$lang_source     | 来源 }}<!--
+
{{!}} colspan="2" id="infoboxheader" {{!}} {{{name|{{PAGENAME}}}}}
-->{{#arraydefine:$lang_foundin    | 觅处 }}<!--
+
{{!}}-
-->{{#arraydefine:$lang_time      | 时间 }}<!--
+
{{!}}colspan="2" style="padding-bottom: 5px;"{{!}} [[File:{{{eng|Blank icon}}}.png|center]]
-->{{#arraydefine:$lang_season     | 季节 }}<!--
+
{{!}}-
-->{{#arraydefine:$lang_weather    | 天气 }}<!--
+
{{!}} colspan="2" id="infoboxdetail" style="text-align: center; padding-right: 3px;" {{!}} {{#if:{{{description|}}}|{{{description|}}}|{{Description|{{PAGENAME}}}}}}
-->{{#arraydefine:$lang_difficulty   | 难度 }}<!--
+
{{!}}-
-->{{#arraydefine:$lang_behavior    | 运动模式 }}<!--
+
{{!}} colspan="2" id="infoboxsection" style="text-align:center; padding-left: 0; padding-right: 0;" {{!}} 信息
-->{{#arraydefine:$lang_behaviorlink  | 鱼#运动模式 }}<!--
+
{{#if:{{{source|}}}|<nowiki/>
-->{{#arraydefine:$lang_levelrequired | 钓鱼技能等级要求 }}<!--
 
-->{{#arraydefine:$lang_fishing    | 钓鱼 }}<!--
 
-->{{#arraydefine:$lang_fishsize    | 大小(英寸)}}<!--
 
-->{{#arraydefine:$lang_xp       | 经验值}}<!--
 
-->{{#arraydefine:$lang_fishingxp   | 钓鱼经验值 }}<!--
 
-->{{#arraydefine:$lang_healingeffect | 治疗效果 }}<!--
 
-->{{#arraydefine:$lang_roe      | 鱼籽 }}<!--
 
-->{{#arraydefine:$lang_agedroe    | 腌鱼籽 }}<!--
 
-->{{#arraydefine:$lang_caviar     | 鱼籽酱 }}<!--
 
 
 
-->{{ParseInputValues|code=behav||
 
,Mixed,  混合型,
 
,Smooth,  平滑型,
 
,Sinker,  下坠型,
 
,Floater, 漂浮型,
 
,Dart,   猛冲型,
 
}}{{ParseInputValues|code=legend||
 
,Crimsonfish, 绯红鱼,
 
,Angler,    鮟鱇鱼,
 
,Legend,    传说之鱼,
 
,Glacierfish, 冰川鱼,
 
,Mutant Carp, 变种鲤鱼,
 
}}{{ParseInputValues|code=time||
 
,Any, 任何,
 
}}<!--
 
 
 
// set usemetric to true (or any nonempty value) if metric units should be used for fish size
 
-->{{#arraydefine:$lang_usemetric   |true}}<!--
 
-->{{#arraydefine:$lang_size_delim   |-}}<!--
 
 
 
// END of translations
 
// Initialize array variables
 
-->{{#arraydefine:$quality|{{ParseInputQuality|quality={{{quality|}}}|iridium={{{iridium|}}}|hide={{{hide|}}}}}}}<!--
 
--><includeonly><div id="infoboxborder">
 
{| id="infoboxtable"
 
| colspan="2" id="infoboxheader" | {{{name|{{PAGENAME}}}}}
 
|-
 
| colspan="2" style="padding-bottom:5px; text-align: center;" | {{Autoimage|{{{image|}}}|eng={{{eng|}}}}}
 
|-
 
| colspan="2" id="infoboxdetail" style="text-align:center;" | {{Italics|{{#if:{{{description|}}}|{{{description|}}}|{{Description|{{PAGENAME}}}}}}}}
 
|-
 
| colspan="2" id="infoboxsection" style="text-align:center;" | {{#arrayprint:$lang_information}}{{#if:{{{source|}}}|<nowiki/>
 
 
   {{!}}-
 
   {{!}}-
   {{!}} id="infoboxsection" {{!}} {{#arrayprint:$lang_source}}{{Colon}}
+
   {{!}} id="infoboxsection" {{!}} 来源
   {{!}} id="infoboxdetail"  {{!}} {{#ifexist:{{{source|}}}|[[{{{source|}}}]]|{{{source|}}}}}
+
   {{!}} id="infoboxdetail"  {{!}} {{{source|}}}
 
}}{{#if:{{{location|}}} |<nowiki />
 
}}{{#if:{{{location|}}} |<nowiki />
 
   {{!}}-
 
   {{!}}-
   {{!}} id="infoboxsection" {{!}} {{#arrayprint:$lang_foundin}}{{Colon}}
+
   {{!}} id="infoboxsection" {{!}} 位置
   {{!}} id="infoboxdetail"  {{!}} {{#ifexist:{{{location|}}}|[[{{{location|}}}]]|{{{location|}}}}}
+
   {{!}} id="infoboxdetail"  {{!}} {{{location|}}}
 
}}{{#if:{{{time|}}} |<nowiki />
 
}}{{#if:{{{time|}}} |<nowiki />
 
   {{!}}-
 
   {{!}}-
   {{!}} id="infoboxsection" {{!}} {{#arrayprint:$lang_time}}{{Colon}}
+
   {{!}} id="infoboxsection" {{!}} 时间
 
   {{!}} id="infoboxdetail"  {{!}} {{{time|}}}
 
   {{!}} id="infoboxdetail"  {{!}} {{{time|}}}
 
}}{{#if:{{{season|}}} |<nowiki />
 
}}{{#if:{{{season|}}} |<nowiki />
 
   {{!}}-
 
   {{!}}-
   {{!}} id="infoboxsection" {{!}} {{#arrayprint:$lang_season}}{{Colon}}
+
   {{!}} id="infoboxsection" {{!}} 季节
 
   {{!}} id="infoboxdetail"  {{!}} {{#iferror: {{Season|{{{season}}}}} | {{{season|}}} | {{Season|{{{season}}}}} }}
 
   {{!}} id="infoboxdetail"  {{!}} {{#iferror: {{Season|{{{season}}}}} | {{{season|}}} | {{Season|{{{season}}}}} }}
 
}}{{#if:{{{weather|}}} |<nowiki />
 
}}{{#if:{{{weather|}}} |<nowiki />
 
   {{!}}-
 
   {{!}}-
   {{!}} id="infoboxsection" {{!}} {{#arrayprint:$lang_weather}}{{Colon}}
+
   {{!}} id="infoboxsection" {{!}} 天气
 
   {{!}} id="infoboxdetail"  {{!}} {{#iferror: {{Weather inline|{{{weather|}}}}} | {{{weather|}}} | {{Weather inline|{{{weather|}}}}} }}
 
   {{!}} id="infoboxdetail"  {{!}} {{#iferror: {{Weather inline|{{{weather|}}}}} | {{{weather|}}} | {{Weather inline|{{{weather|}}}}} }}
 
}}{{#if:{{{difficulty|}}} |<nowiki />
 
}}{{#if:{{{difficulty|}}} |<nowiki />
 
   {{!}}-
 
   {{!}}-
   {{!}} id="infoboxsection" {{!}} {{#arrayprint:$lang_difficulty}}{{Colon}}
+
   {{!}} id="infoboxsection" {{!}} 难度
 
   {{!}} id="infoboxdetail"  {{!}} {{{difficulty|}}}
 
   {{!}} id="infoboxdetail"  {{!}} {{{difficulty|}}}
 
}}{{#if:{{{behavior|}}} |<nowiki />
 
}}{{#if:{{{behavior|}}} |<nowiki />
 
   {{!}}-
 
   {{!}}-
   {{!}} id="infoboxsection" {{!}} [[{{#arrayprint:$lang_behaviorlink}}|<span style="color: white;">{{#arrayprint:$lang_behavior}}</span>]]{{Colon}}
+
   {{!}} id="infoboxsection" {{!}} 运动模式
   {{!}} id="infoboxdetail" {{!}} {{ParseInputValues|code=behav|{{{behavior|}}}|default=true|translate=true|vary_end=true}}
+
   {{!}} id="infoboxdetail" {{!}} {{#switch:{{lc:{{{behavior|}}}}}
 +
     |dart   | 猛冲型 = [[鱼#运动模式| 猛冲型]]
 +
     |floater |漂浮型 = [[鱼#运动模式|漂浮型]]
 +
     |mixed  |混合型 = [[鱼#运动模式|混合型]]
 +
     |sinker  |下坠型 = [[鱼#运动模式| 下坠型]]
 +
     |smooth  |平滑型 = [[鱼#运动模式|平滑型]]
 +
     }}
 
}}{{#if:{{{fl|}}}|<nowiki />
 
}}{{#if:{{{fl|}}}|<nowiki />
 
   {{!}}-
 
   {{!}}-
   {{!}} id="infoboxsection" {{!}} [[{{#arrayprint:$lang_fishing}}|<span style="color: white;">{{#arrayprint:$lang_levelrequired}}</span>]]{{Colon}}
+
   {{!}} id="infoboxsection" class="no-wrap" {{!}} 钓鱼技能等级要求
   {{!}} id="infoboxdetail   {{!}} {{{fl|}}}
+
   {{!}} id="infoboxdetail{{!}} {{{fl|}}}
 
}}{{#if:{{{size|}}}|<nowiki />
 
}}{{#if:{{{size|}}}|<nowiki />
 
   {{!}}-
 
   {{!}}-
   {{!}} id="infoboxsection" {{!}} {{#arrayprint:$lang_fishsize}}{{Colon}}
+
   {{!}} id="infoboxsection" {{!}} 长度(厘米)
   {{!}} id="infoboxdetail"  {{!}} <!--
+
   {{!}} id="infoboxdetail"  {{!}} {{#switch:{{uc:{{CONTENTLANG}}}}
-->{{#if:{{#arrayprint:$lang_usemetric}}
+
     |EN = {{#replace:{{{size|}}}|-|–}}
     | {{#if:{{#pos:{{{size|}}}|-}}
+
    |#default= {{#if:{{#pos:{{{size|}}}|-}} 
      | {{#expr:{{#explode:{{{size|}}}|-|0}}*2.54 round 0}}{{#arrayprint:$lang_size_delim}}{{#expr:{{#explode:{{{size|}}}|-|1}}*2.54 round 0}}
+
         |{{#expr:{{#explode:{{{size|}}}|-|0}}*2.54 round 0}}~{{#expr:{{#explode:{{{size|}}}|-|-1}}*2.54 round 0}}
      | {{#expr:{{{size|}}}*2.54 round 0}}}}
+
         |{{#expr:{{{size|}}}*2.54 round 0}} }} }}
    | {{{size|}}}
+
}}
}}}}{{#if:{{{xp|}}}|<nowiki />
+
{{#if:{{{difficulty|}}} |<nowiki />
  {{!}}-
+
{{!}}-
  {{!}} id="infoboxsection" {{!}} {{#arrayprint:$lang_xp}}{{Colon}}
+
   {{!}}id="infoboxsection" class="no-wrap" {{!}} 钓鱼经验值
  {{!}} id="infoboxdetail"  {{!}} {{{xp|}}}
+
   {{!}}id="infoboxdetail"  {{!}} {{#switch:{{lc:{{{eng|}}}}}
}}{{#if:{{{difficulty|}}}|<nowiki />
+
     |crimsonfish|angler|legend|glacierfish|mutant carp = {{#expr:5*(floor((0+1)*3+{{{difficulty|}}}/3))}}&nbsp;&nbsp;&nbsp;[[File:Silver Quality.png|14px|link=]]&thinsp;{{#expr:5*(floor((1+1)*3+{{{difficulty|}}}/3))}}&nbsp;&nbsp;&nbsp;[[File:Gold Quality.png|14px|link=]]&thinsp;{{#expr:5*(floor((2+1)*3+{{{difficulty|}}}/3))}}&nbsp;&nbsp;&nbsp;[[File:Iridium Quality.png|14px|link=]]&thinsp;{{#expr:5*floor((4+1)*3+{{{difficulty|}}}/3)}}
  {{!}}-
+
     |#default={{#expr:floor((0+1)*3+{{{difficulty|}}}/3)}}&nbsp;&nbsp;&nbsp;[[File:Silver Quality.png|14px|link=]]&thinsp;{{#expr:floor((1+1)*3+{{{difficulty|}}}/3)}}&nbsp;&nbsp;&nbsp;[[File:Gold Quality.png|14px|link=]]&thinsp;{{#expr:floor((2+1)*3+{{{difficulty|}}}/3)}}&nbsp;&nbsp;&nbsp;[[File:Iridium Quality.png|14px|link=]]&thinsp;{{#expr:floor((4+1)*3+{{{difficulty|}}}/3)}} }}
  {{!}} id="infoboxsection" {{!}} {{#arrayprint:$lang_fishingxp}}{{Colon}}
+
}}{{#if:{{{xp|}}} |<nowiki />
  {{!}} id="infoboxdetail"  {{!}}<!--
+
{{!}}-
-->   {{#arraydefine:$legendary|{{ParseInputValues|code=legend|{{{eng|{{{name|{{PAGENAME}}}}}}}}}}}}<!--
+
   {{!}}id="infoboxsection" {{!}} 经验值
-->   {{#arraydefine:$quality_values|{{ParseInputQuality|quality={{{quality|}}}|iridium={{{iridium|}}}}}}}<!--
+
{{!}}id="infoboxdetail"  {{!}} {{{xp|}}}
-->   {{#arrayprint:$quality_values||@qual@<!--
+
}}{{#if:{{{edibility|}}} | <nowiki />
-->     | {{#ifeq:@qual@|Normal||&nbsp;&nbsp;&nbsp;[[File:@qual@ Quality.png|14px|link=|alt=@qual@]]&thinsp;}}<!--
+
{{!}}-
      -->{{#expr: {{#if:{{#arrayprint:$legendary}}|5|1}}
+
{{#switch:{{lc:{{{edibility|}}}}}
        * floor( 3 * (1 + {{#switch:@qual@|Normal=0|Silver=1|Gold=2|Iridium=4}})
+
| -300 | ''inedible'' | inedible | 不可食用 | ''不可食用'' =   
        + {{{difficulty}}}/3)
+
{{!}} id="infoboxsection" {{!}} 能量
}}}}}}{{#if:{{{edibility|}}}|<nowiki />
+
{{!}} id="infoboxdetail" {{!}} 不可食用
{{!}}-
+
|#default =
<!--
+
{{!}} id="infoboxsection" {{!}} [[能量]] / [[生命值]]
 
+
{{!}} id="infoboxdetail"  {{!}} {{EdibilityGrid|{{{eng|}}}|{{{edibility|}}}|dsv=false}}
// Display edibility. Use two-column format when many values: so not if poison/inedible/0
+
}} }}{{#ifeq:{{{professions|}}} | false |<nowiki />
-->{{#ifexpr:{{#iferror:{{#expr:{{{edibility|0}}}>0|0|1}}|0}} |<nowiki/>
+
{{!}}-
    {{!}} id="infoboxsection" colspan="2" style="text-align: center;" {{!}} {{#arrayprint:$lang_healingeffect}}
+
    {{!}} id="infoboxsection" {{!}} 售出价格
    {{!}}-
+
    {{!}} id="infoboxdetail"  {{!}} {{#switch: {{lc:{{{quality|}}}}}
    {{!}} id="infoboxdetail" {{!}} {{Edibility |{{{edibility|}}} |quality={{{quality|{{{healq|true}}}}}} |iridium={{{iridium|}}} |statistics=Energy}}
+
    |normal|false = {{Price|{{{price|}}}}}
    {{!}} id="infoboxdetail"  {{!}} {{Edibility |{{{edibility|}}} |quality={{{quality|{{{healq|true}}}}}} |iridium={{{iridium|}}} |statistics=Health}}
+
    |#default = {{Qualityprice|{{{eng|Blank icon}}}|{{{price|}}}|dsv=false}}
   |<nowiki/>
+
  }}
    {{!}} id="infoboxsection" {{!}} {{#arrayprint:$lang_healingeffect}}{{Colon}}
+
|<!-- professions != false --><nowiki />
    {{!}} id="infoboxdetail"  {{!}} {{Edibility |{{{edibility|}}} |quality={{{quality|{{{healq|true}}}}}} |iridium={{{iridium|}}}}}
+
{{!}}-
}}}}<!--
+
{{!}} colspan="2" style="padding: 0; border: 0;"{{!}}
 
+
<table style="width: 101%; margin-top: -2px; margin-left: -2px;">
// custom_price if defined provides entire text of all price-related sections
+
<tr>
-->{{#if:{{{custom_price|}}}
+
<td id="infoboxsection" colspan="3" style="text-align: center; padding-left: 0; padding-right: 0;">售出价格</td>
    |{{{custom_price}}}<!--
+
</tr>
 
+
<tr>
// Display all item prices: Base price plus all professions listed in {{{profession}}}
+
<td id="infoboxsection">基础售价</td>
// Subtemplate automatically decides how to handle multiple columns, etc.
+
<td id="infoboxsection">[[File:Fisher.png|24px|link=]] [[技能#钓鱼|<span style="color: white;">渔夫</span>]](+25%)</td>
-->  |{{Infosection price
+
<td id="infoboxsection">[[File:Angler Icon.png|24px|link=]] [[技能#钓鱼|<span style="color: white;">垂钓者</span>]](+50%)</td>
     |prof   = Base, Fisher, Angler
+
</tr>
     |item   = {{{eng|{{{name|{{#ifeq:{{CONTENTLANG}}|en|{{PAGENAME}}|{{{image|}}}}}}}}}}}
+
<tr>
     |link   = {{{name|{{PAGENAME}}}}}
+
{{#switch: {{lc:{{{quality|}}}}}
     |price   = {{{price|}}}
+
|normal|false
     |iridium  = {{{iridium|}}}
+
<td>{{Qualityprice|{{{eng|Blank icon}}}|{{{price|}}}|quality=normal|dsv=false}}</td>
     |quality  = {{{quality|true}}}
+
<td>{{Qualityprice|{{{eng|Blank icon}}}|{{{price|}}}|quality=normal|pm=1.25|dsv=false}}</td>
     |hide   = {{{hideprice|}}}
+
<td>{{Qualityprice|{{{eng|Blank icon}}}|{{{price|}}}|quality=normal|pm=1.5|dsv=false}}</td>
     |ncolumns = 3
+
|#default = {{#switch:{{lc:{{NAMESPACE}}}} | template = |#default=
}}{{#if:{{{roe|}}}|
+
<td>{{Qualityprice|{{{eng|Blank icon}}}|{{{price|}}}|dsv=false}}</td>
    {{Infosection price
+
<td>{{Qualityprice|{{{eng|Blank icon}}}|{{{price|}}}|pm=1.25|dsv=false}}</td>
     |prof    = Base, Base, Artisan
+
<td>{{Qualityprice|{{{eng|Blank icon}}}|{{{price|}}}|pm=1.5|dsv=false}}</td>
|srcprice  = {{{price|}}}
+
}} }}
|auto    = true
+
</tr>
|artisan  = true
+
</table>
     |itemcell1 = Roe
+
}}{{#if:{{{roe|}}}|<nowiki />
|itemcell2 = {{#ifeq:{{{eng|{{{name|{{PAGENAME}}}}}}}}|Sturgeon|Caviar|Aged Roe}}
+
   {{!}}-
|itemcell3 = {{#ifeq:{{{eng|{{{name|{{PAGENAME}}}}}}}}|Sturgeon|Caviar|Aged Roe}}
+
{{!}} colspan="2" style="padding: 0; border: 0;"{{!}}
     |imageRoe  = {{{roe}}} Roe
+
   {{{!}} style="width: 101%; margin-top: -2px; margin-left: -2px;"
     |imageAged Roe  = {{{roe}}} Aged Roe
+
{{!}}-
|linkRoe  = {{#arrayprint:$lang_roe}}
+
{{!}} id="infoboxsection" colspan="3" style="text-align: center; padding: 0;" {{!}} 制成品基础售价
|linkAged Roe={{#arrayprint:$lang_agedroe}}
+
{{!}}-
|linkCaviar = {{#arrayprint:$lang_caviar}}
+
   {{!}} id="infoboxsection" {{!}} 鱼籽
|ncolumns  = 3
+
{{!}} id="infoboxsection" {{!}} {{#ifeq:{{{eng|}}}|Sturgeon|鱼籽酱|腌鱼籽}}
    }}
+
{{!}} id="infoboxsection" class="no-wrap" style="padding: 2px 0 0 6px;" {{!}} [[File:Artisan.png|24px|link=]] {{#ifeq:{{{eng|}}}|Sturgeon|鱼籽酱|腌鱼籽}}(+40%)
}}}}
+
{{!}}-
|}
+
   {{!}} style="vertical-align: top;" {{!}} {{Qualityprice|{{{roe|}}} Roe|{{{price|}}}|quality=normal|dsv=false}}
</div>{{InfoboxSEO}}</includeonly><noinclude>{{Englishdoc}}</noinclude>
+
{{!}} style="vertical-align: top;" {{!}} {{#switch:{{{eng|}}}
 +
|Sturgeon = {{Qualityprice|Caviar|500|quality=normal|dsv=false}}
 +
|#default = {{Qualityprice|{{{roe|}}} Aged Roe|{{{price|}}}|quality=normal|dsv=false}} }}
 +
{{!}} style="vertical-align: top;" {{!}} {{#switch:{{{eng|}}}
 +
|Sturgeon = {{Qualityprice|Caviar|500|quality=normal|pm=1.4|dsv=false}}
 +
|#default = {{Qualityprice|{{{roe|}}} Aged Roe|{{{price|}}}|quality=normal|pm=1.4|dsv=false}} }}
 +
{{!}}-
 +
   {{!}}}
 +
}}
 +
{{!}}-
 +
{{!}}}
 +
}}</div>{{InfoboxSEO}}</includeonly><noinclude>{{Englishdoc}}</noinclude>

2023年4月11日 (二) 21:12的最新版本

有关此模板的详细信息,请参阅英语语言文档页

用法

可以通过在相关页面上输入以下内容来使用此模板。

{{Infobox fish}}

结果是...

Infobox fish
Blank icon.png
信息

售出价格
基础售价 Fisher.png 渔夫(+25%) Angler Icon.png 垂钓者(+50%)