This wiki is a read-only version of the Stardew Valley Wiki. The official editable wiki maintained by ConcernedApe can be found at stardewvalleywiki.com

Template:Season

来自Stardew Valley Wiki
跳转至: 导航搜索

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

用法

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

{{Season}}

结果是...

Robin building.png
“我还有很多工作要做”
— 罗宾

不完整的翻译

本文或部分尚未完全翻译成中文。 欢迎您通过编辑帮助其建设。
最后编辑Margotbean于2021-01-08 17:36:09.

此模版旨在为需要的季节添上图标,并将该季节超链接化导向相应的页面,如果是多个季节,中间会有逗号分开。

此模版可以识别两个特殊季节,婚后特例,以便NPC日程表界面使用(见Template:ScheduleHeader)。

用法

语法

基础用法:

{{Season | 季节 }}

完整用法:

{{Season | 季节 | 天数
         | size=px | width=widthpluspx | all=text_for_all | sortkey=true | space=value
         | text_only=true | no_translate=true }}

参量

这里有一个未明确的必需参量, 季节,和一个未明确的非必需参量,天数。其余参量则只能更改其值且非必需。除非特别说明,默认参量值为空。

  • 季节
    • 必需,未明确
    • 在此填写需要展示的季节,此参量可以识别以下值: Spring,春季, Summer,夏季, Fall,秋季, Winter,冬季, All Seasons,一年四季, Marriage,婚后, Deviations,例外AllAny会被识别为All Seasons,一年四季
    • 多个季节中间会被逗号隔开。
    • 如果输入一个无法识别的季节名,此模组会将该名字打出但无图标和链接。
    • 季节应当以纯文本格式(无链接)输入。但是为了让模组工作得更好,像[[春季]]也是可以接受的。如果 季节已经包含了任何图片链接,模组会将输入值返回,就像{{Season|Spring}}
  • 天数
    • 非必需,未明确
    • 季节的第几日,例如在生成村民的生日时需要用到。
    • 天数会被放在季节之前,图标之后。这与中文习惯不符,可以在此模板后添加天数。A
  • size=px尺寸
    • 此为季节图标的尺寸,以像素为单位。默认值为24。
    • 只需写入数字(不要加上"px").
  • width=widthpluspx宽度
    • 同样是图标尺寸,以像素为单位,需要加上px(例如 width=24px)。
    • 这与size是冲突的,推荐使用size。
    • 这项参数仅仅是为了向下兼容,不推荐使用。
  • all=text_for_all
    • Relevant only if season is All Seasons (or a synonym): when all is set, the specified text will be displayed instead of All. Default value is All.
  • sortkey=true
    • 设置后,多个季节会按春夏秋冬顺序排序而非阿拉伯数字。If set, a hidden span containing a numeric sortkey will be added to the output, to improve table sorting. The sortkey will causes seasons to be sorted in order Spring, Summer, Fall, Winter, instead of being sorted alphabetically. Plus any provided day will be included in the sortkey.
  • space=value
    • 在此输入的值会用作分隔多个季节,默认值为" • "。
  • text_only=true
    • 设置后,输出的值是纯文本。When set, return value is just the name of the season (no icon, no link), in wiki-specific language
    • Allows other templates to use Template:Season for processing of generic season input data (especially on non-english wikis where translation capabilities may be wanted).
  • no_translate=true
    • When set, any text_only return value is provided in English, instead of the wiki-specific language
    • Only relevant if text_only is set.

举例

{{Season|春季}}
{{Season|Summer, Fall, Winter}}
{{Season|Marriage}}
{{Season|Deviations}}
{{Season|All|do_short=true}}
{{Season|All|size=48}}
{{Season|Summer|24}}
{{Season|夏季}}24
{{Season|Spring,Summer|space=/|sortkey=true}}

Results:
 春季
 夏季 秋季 冬季
 婚后
例外
 一年四季
 一年四季
 24 夏季
 夏季 24号
 春季 /  夏季