Template:Exclusive icons

来自Terraria Wiki
跳转至: 导航搜索
Lua logo.svg
This template uses Module:Exclusive, a script written in the Lua programming language. Please see wikipedia:Lua and mw:Extension:Scribunto to learn more about Lua.
Template-info.svg 文档 以下文档内容来自模板:Exclusive icons/doc。 (edit | history)

Displays the icons indicating the platforms for which an entity is available, "eicons" (from "exclusive icons") in short. For displaying a link with eicons, use {{exclusive icon link}}.

You can use {{eicons/options}} to change the default values of some parameters. See the relevant section below for details.

Usage[编辑源代码]

{{ eicons | <entity name> | small = 0/1 | link = 0/1 | invert = 0/1 | not = <entity name> | <platform parameters> = 0/1 }}

参数说明类型状态
Entity name1
Name of the entity (item, NPC, event, biome, patch number, etc.) for which the icons are to be displayed.
推荐
Smaller iconssmall
Reduces the size of the icons. Useful when space is an issue, e.g. in infoboxes.
自动值:
True (1)
布尔值可选
Invert exclusivityinvert
Inverts the exclusivity, i.e. displays the opposite eicons. Note that this disables the Japanese Console version sensor.
自动值:
True (1)
布尔值可选
Subtract exclusivitynot
pagenot
Name of an entity whose eicons are to be subtracted from the main eicons. Note that this is evaluated after $invert, i.e. the eicons of the main entity are inverted first, and then the eicons of the entity from this parameter are subtracted from that.
可选
Desktop overridedesktop
dsk
Manually override the Desktop version exclusivity. Note that this evaluated after $invert and $not.
布尔值可选
Console overrideconsole
cns
Manually override the Console version exclusivity. Note that this evaluated after $invert and $not.
布尔值可选
Old-gen overrideold-gen
oldgen
old
Manually override the Old-gen console version exclusivity. Note that this evaluated after $invert and $not.
布尔值可选
Mobile overridemobile
mbl
Manually override the Mobile version exclusivity. Note that this evaluated after $invert and $not.
布尔值可选
3DS override3DS
3ds
Manually override the 3DS version exclusivity. Note that this evaluated after $invert and $not.
布尔值可选
Japan overridejapan
jas
Manually override the Japanese Console version exclusivity. Note that this evaluated after $invert and $not.
布尔值可选

Format: inline

Examples[编辑源代码]

{{eicons| 1.4.0.1 }} 电脑版 (D)
{{eicons| 1.3.0.1 | not = 1.4.0.1 }} 主机版移动版 (CM)
{{eicons| Suspicious Looking Egg }} 3DS版 (3)
{{eicons| Suspicious Looking Egg | invert = 1 }} 电脑版、主机版、前代主机版、和移动版 (DCOM)
{{eicons| Soul of Blight | link = 1 }} 前代主机版3DS版 (O3) with link
{{eicons| Suspicious Looking Egg | small = 1 }} 3DS版 (3), small
{{eicons| Easter }} 3DS版 (3)
{{eicons| Underground Desert }} 电脑版、主机版、和移动版 (DCM)
{{eicons| Crystal Work Bench }} 电脑版和主机版 (D)
{{eicons| Gold Butterfly }} 电脑版、主机版、和移动版 (DCM)
{{eicons| Gold Butterfly | not = Crystal Work Bench }} 移动版 (CM)
{{eicons| Gold Butterfly | invert = 1 | not = Crystal Work Bench }} 前代主机版3DS版 (O3), not DO3 because invert is evaluated before not
{{eicons| Gold Butterfly | invert = 1 | not = Suspicious Looking Egg }} 前代主机版 (O)
{{eicons| 1.3.0.1 | not = 1.3.5 }} 移动版 (CM)
{{eicons| Work Bench }} → (nothing, since Work Bench is on all versions)
{{eicons| Work Bench | mobile = 1 }} 移动版 (M)
{{eicons| Work Bench | old-gen = 1 | 3ds = 1 }} 前代主机版3DS版 (O3)
{{eicons| Martian Work Bench | desktop = 0 | console = 0 }} 移动版 (M)
{{eicons| desktop = 1 | console = 1 | old-gen = 1 | mobile = 1 }} 电脑版、主机版、前代主机版、和移动版 (DCOM)
{{eicons| japan = 1 }} 日本主机版 (J)
{{item|Stone Block}} {{eicons| desktop = 1 | console = 1 | old-gen = 1 | mobile = 1 }} 石块石块 电脑版、主机版、前代主机版、和移动版

Change default options[编辑源代码]

This template supports options through {{options}} template. All valid options are listed below, see {{options}} for usage and other info.
NameAliasInitial ValueValue Mapping[1]Note
small(empty)yesy
ony
n(empty)
no(empty)
off(empty)
link(empty)yesy
ony
n(empty)
no(empty)
off(empty)
  1. Values with mapping will be stored and loaded as mapped value. Other values without mapping will be stored and loaded as-is.

Examples[编辑源代码]

Result Code Note
前代主机版3DS版 {{eicons|Hallowed Key Mold}} Default
small = ; small = {{options/get|eicons|small}}; Get current setting
前代主机版3DS版 {{options/set|eicons|small=y}}
{{eicons|Hallowed Key Mold}}
Turn on small icons
small = y; small = {{options/get|eicons|small}}; Get current setting
前代主机版3DS版 {{options/reset|eicons}}
{{eicons|Hallowed Key Mold}}
Reset all options