(英語版を元に新規作成。) |
(英wikiに伴いページを更新) |
||
(2人の利用者による、間の2版が非表示) | |||
1行目: | 1行目: | ||
− | <includeonly>{{ |
+ | <includeonly>{{#invoke: schematic | table }}</includeonly><noinclude> |
+ | {{documentation}} |
||
− | #vardefine: scale | {{ #iferror: {{ #expr: {{ #if: {{{size|}}} | {{{size}}} | 32 }} / 16 }} | 2 }} |
||
+ | <!-- Put categories/interwiki on the documentation page --> |
||
− | }}{{ |
||
+ | </noinclude> |
||
− | #vardefine: closable | false |
||
− | }}{{ |
||
− | #vardefine: columns | 0 |
||
− | }}{{ |
||
− | #vardefine: columns-max | 0 |
||
− | }}{{ |
||
− | #if: {{{caption|}}}{{{float|}}} | |
||
− | <div |
||
− | class="thumb" |
||
− | style=" |
||
− | clear: {{#switch:{{{clear|}}}|left=left|right=right|both=both|#default=none}}; |
||
− | float: {{#switch:{{{float|}}}|left=left|none=none|#default=right}}; |
||
− | {{{style|}}} |
||
− | " |
||
− | ><div class="thumbinner" |
||
− | > |
||
− | }}<table class="schematic" style="margin: 0 auto;{{{tablestyle|}}}" |
||
− | ><tr |
||
− | ><td |
||
− | ><span style="width:{{ #expr: 16*{{#var:scale}} }}px;height:{{ #expr: 16*{{#var:scale}} }}px;" |
||
− | >{{ |
||
− | #fornumargs: z-index | param |
||
− | | {{ |
||
− | #switch: {{#var:param}} |
||
− | | - = |
||
− | </span |
||
− | ></td |
||
− | >{{ |
||
− | #vardefine: columns | {{ #expr: {{#var:columns}} + 1 }} |
||
− | }}</tr |
||
− | >{{ |
||
− | #vardefine: columns-max | {{ #ifexpr: {{#var:columns}} > {{#var:columns-max}} | {{#var:columns}} | {{#var:columns-max}} }} |
||
− | }}{{ |
||
− | #vardefine: columns | 0 |
||
− | }}<tr |
||
− | ><td |
||
− | ><span style="width:{{ #expr: 16*{{#var:scale}} }}px;height:{{ #expr: 16*{{#var:scale}} }}px;" |
||
− | >{{ |
||
− | #vardefine: closable | false |
||
− | }} |
||
− | | + = |
||
− | {{ |
||
− | #vardefine: closable | false |
||
− | }} |
||
− | | #default = |
||
− | {{ |
||
− | #ifeq: {{#var:closable}} | true | |
||
− | </span |
||
− | ></td |
||
− | >{{ |
||
− | #vardefine: columns | {{ #expr: {{#var:columns}} + 1 }} |
||
− | }}<td |
||
− | ><span style="width:{{ #expr: 16*{{#var:scale}} }}px;height:{{ #expr: 16*{{#var:scale}} }}px;" |
||
− | > |
||
− | }}{{ |
||
− | #if: {{ #vardefineecho: pos | {{ #iferror: {{ #expr: 0+{{ SchematicSprite/pos | {{#var:param}} }} }} | }} }} |
||
− | | |
||
− | <span style=" |
||
− | left:-{{ #expr: 16*{{#var:scale}}*(({{#var:pos}}-1)mod32) }}px; |
||
− | top:-{{ #expr: 16*{{#var:scale}}*(trunc(({{#var:pos}}-1)/32)) }}px; |
||
− | z-index:{{#var:z-index}}; |
||
− | ">[[File:SchematicSprite.png|{{ #expr: 512*{{#var:scale}} }}px|link= |
||
− | ]]</span |
||
− | > |
||
− | | |
||
− | <span style=" |
||
− | font-size:{{#expr:trunc(12*{{#var:scale}})}}px; |
||
− | height:100%; |
||
− | width:100%; |
||
− | z-index:{{#var:z-index}}; |
||
− | ">{{#var:param| }}</span |
||
− | > |
||
− | }}{{ |
||
− | #vardefine: closable | true |
||
− | }} |
||
− | }} |
||
− | }}</span |
||
− | ></td |
||
− | ></tr |
||
− | >{{ |
||
− | #vardefine: columns-max | {{ #ifexpr: {{#var:columns}} > {{#var:columns-max}} | {{#var:columns}} | {{#var:columns-max}} }} |
||
− | }}</table |
||
− | >{{ |
||
− | #if: {{{caption|}}}{{{float|}}} | |
||
− | {{ |
||
− | #if: {{{caption|}}} | |
||
− | {{ |
||
− | #vardefine: max-width | {{ #expr: {{#var:columns-max}}*({{#var:scale}}*16+1)+1-6 }} |
||
− | }}{{ |
||
− | #vardefine: max-width | {{ #ifexpr: {{#var:max-width}} < 182 | 182 | {{#var:max-width}} }} |
||
− | }}<div class="thumbcaption" style="max-width:{{#var:max-width}}px;{{{captionstyle|}}}"> |
||
− | {{{caption|}}}</div> |
||
− | }} |
||
− | </div> |
||
− | </div> |
||
− | }}</includeonly><noinclude>{{/doc}} |
||
− | |||
− | [[Category:Templates|S]]</noinclude> |
2015年1月31日 (土) 05:12時点における最新版
このテンプレートは、Minecraft の構造物(主にレッドストーン回路と装置)を表現するための回路図(格子状に並べられたブロックスプライト)を表示します。
使用法
Schematic uses unnamed parameters to define the sprites used in the schematic, and named parameters to modify the schematic's default appearance:
{{Schematic |caption=<caption> |captionstyle=<captionstyle> |clear=<clear> |float=<float> |size=<size> |style=<style> |tablestyle=<tablestyle> |<param1>|<param2>|… }}
- キャプション
- オプションの caption パラメータを追加すると、回路図の下にキャプションを作成することができます。キャプションを追加すると、回路図とキャプションを囲むボックスが自動的に作成され、ボックスが右ページに表示されます。すべてのキャプションには、回路図のヘルプへのアイコンリンクが自動的に追加されます。
- captionstyle
- The optional captionstyle parameter may be added to change the appearance of the caption area and contents. Its value should be a css declaration or declaration group with no surrounding braces or quotes (e.g.,
captionstyle=color: red; text-align: center;
). This parameter has no effect if caption and float are not specified.
- clear
- The optional clear parameter may be added to force the schematic to drop below other floated elements. Its value may be
left
(to drop below only left-floated elements),right
(to drop below only right-floated elements),both
(to drop below all floated elements), ornone
(the default).
- float
- The optional float parameter may be added to change the side to which the schematic floats if a caption is added. The only value recognized is
left
-- anything else defaults back to floating to the right.
- A schematic with no caption or float parameters acts like any other wiki table, ending the previous line and pushing subsequent text to a new line.
- size
- The optional size parameter may be added to specify the width and height of the sprite cells in pixels. Its value should be a simple number with no units added (e.g.,
size=16
). If omitted, size defaults to 32.
- style
- The optional style parameter may be added to change the appearance of the schematic's surrounding box. Its value should be a css declaration or declaration group with no surrounding braces or quotes (e.g.,
style=background-color: yellow;
). This parameter has no effect if caption and float are not specified.
- tablestyle
- The optional tablestyle parameter may be added to change the appearance of the schematic table. Its value should be a css declaration or declaration group with no surrounding braces or quotes (e.g.,
tablestyle=background-color: green;
).
- param
- The param parameters specify the content of the schematic. When multiple params are defined, the resulting sprites or text are displayed in individual table cells, one after the other, unless a plus sign is used to stack them in the same cell.

概略図のスプライトシート
- A sprite identifier (see list below) displays a sprite from the image on the right.
- A dash (
-
) starts a new row. - Anything else is simply displayed as center-aligned text within the cell's bounding box (empty parameters or whitespace parameters are displayed as empty cells).
- Overflow text is not displayed, so this is primarily intended to be used to display one or two characters in a schematic (such as input and output locations, feature markers to be referenced in text, numbers representing light levels or distance, etc.).
- HTML character entity references may be needed for some characters, such as
|
for the pipe character:|
,=
for an equals sign,+
for a plus sign (to be displayed as text rather than stacking the next param), or-
for a dash (to be displayed as text rather than starting a new row).̅
after a letter will provide a "combining overline" over the letter (used to indicate an inverse signal such as Q̅).
- Multiple sprites and text may be stacked in the same cell by separating them with a plus sign (
+
), lower layers before upper layers.
考慮すべき事項
Overuse of the schematic template can create a high server load, resulting in long page generation times or even a time-out failure. This server load is proportional to the number of schematic cells on a page (for example, one 100-cell schematic and ten 10-cell schematics produce roughly the same server load). When the number of schematic cells on a page start to exceed a few hundred (or fewer, with other high-load templates), consider using {{LoadBox}}
or {{LoadPage}}
to offload some or all schematics into user-requested subpages.
例
識別子の一覧
A sprite identifier is a string of characters that specify which sprite to display.
Some conventions to remember:
- Directions are indicated by
n
(north),s
(south),e
(east),w
(west),u
(up), andd
(down). Directions are relative to the schematic, not the Minecraft world. $
indicates a side view sprite.!
indicates a powered/activated component.
基本の識別子
レッドストーンの識別子
関連項目
- ヘルプ:回路図
- Guide to reading wiki schematics
- レッドストーンのスタイルガイド
- Guide to writing wiki articles about redstone structures, including tips for authoring schematics