Jump to content

Template:Signal: Difference between revisions

From shapez Wiki
Initial draft of an item display template
 
Add inline display support
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><span class="shapez-signal">{{#switch: {{{1}}}
<includeonly><span class="shapez-signal {{#ifeq: {{{2}}}|inline|inline|}}" title="{{{1}}}">{{#switch: {{{1}}}
  | true = [[File:Boolean true.png|32px]]
  | true = [[File:Boolean true.png|32px]]
  | false = [[File:Boolean false.png|32px]]
  | false = [[File:Boolean false.png|32px]]
Line 10: Line 10:
  | white = [[File:Color White.png|32px]]
  | white = [[File:Color White.png|32px]]
  | uncolored = [[File:Color Uncolored.png|32px]]
  | uncolored = [[File:Color Uncolored.png|32px]]
| null = [[File:Wires_null.png|32px]]
| conflict = [[File:Wires_conflict.png|32px]]
  | #default = <strong class="error">Invalid signal: {{{1}}}</strong>
  | #default = <strong class="error">Invalid signal: {{{1}}}</strong>
}}</span></includeonly><noinclude>
}}</span></includeonly><noinclude>
Line 36: Line 38:
|-
|-
| <nowiki>{{Signal|uncolored}}</nowiki> || {{Signal|uncolored}}
| <nowiki>{{Signal|uncolored}}</nowiki> || {{Signal|uncolored}}
|-
| <nowiki>{{Signal|null}}</nowiki> || {{Signal|null}}
|-
| <nowiki>{{Signal|conflict}}</nowiki> || {{Signal|conflict}}
|}
|}


Line 43: Line 49:
"1": {
"1": {
"label": "Signal",
"label": "Signal",
"description": "The item to display (only booleans are currently supported)",
"description": "The value to display (shapes are not supported yet).",
"example": "true",
"example": "true",
"type": "string",
"type": "string",
"suggestedvalues": [
"suggestedvalues": [
"true",
"true",
"false"
"false",
"red",
"green",
"blue",
"cyan",
"purple",
"yellow",
"white",
"uncolored",
"null",
"conflict"
],
],
"required": true
"required": true
},
"2": {
"label": "Inline",
"description": "Adjust signal appearance for better alignment with text.",
"type": "line",
"suggestedvalues": [
"inline"
]
}
}
},
},
"description": "Displays a single item as it appears in shapez."
"description": "Displays a wire network value as it appears in shapez. This template supports regular (default) and inline styles, with the latter resulting in smaller image size and better alignment with page text.",
"format": "inline"
}
}
</templatedata>
</templatedata>
</noinclude>
</noinclude>

Latest revision as of 01:53, 3 February 2026

Supported signals
Wikitext Transclusion result
{{Signal|true}}
{{Signal|false}}
{{Signal|red}}
{{Signal|green}}
{{Signal|blue}}
{{Signal|cyan}}
{{Signal|purple}}
{{Signal|yellow}}
{{Signal|white}}
{{Signal|uncolored}}
{{Signal|null}}
{{Signal|conflict}}

Displays a wire network value as it appears in shapez. This template supports regular (default) and inline styles, with the latter resulting in smaller image size and better alignment with page text.

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Signal1

The value to display (shapes are not supported yet).

Suggested values
true false red green blue cyan purple yellow white uncolored null conflict
Example
true
Stringrequired
Inline2

Adjust signal appearance for better alignment with text.

Suggested values
inline
Lineoptional