Jump to content

Module:Infobox/doc: Difference between revisions

From Logic World Wiki
m fix example component image
Tag: Blanking
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
= p.component =


{{Infobox component
| title      = Example gate
| id          = MHG.ExampleGate
| image      = [[File:MHG.AndGate_thumbnail_render.png|200px]]
| caption    = An example gate
| io.minInputs        = 1
| io.maxInputs        = 5
| io.outputs          = 2
| io.propagationDelay = 1
}}
Renders an infobox for a primitive Logic World component.
== <code>args</code> (required) ==
=== <code>title</code> (required) ===
The title shown above and outside the infobox, usually the name of the gate.
=== <code>id</code> (required) ===
The ID of the component as specified in its <code>.jecs</code> definition file.
=== <code>image</code> (optional) ===
The main image to show on the infobox, usually a 200px render of the component.
Default: <code>[[File:<ID> 512x512.png|200px]]</code>, where <code><ID></code> is the string passed as the <code>id</code> argument.
== <code>args.io</code> (optional) ==
=== <code>minInputs</code> (required) ===
The minimum amount of inputs that the component can have, e.g. the AND gate must have at least two inputs.
=== <code>maxInputs</code> (optional) ===
For components with an adjustable amount of inputs, this argument specifies the maximum number of inputs, e.g. the AND gate can have at most 4 inputs.
=== <code>outputs</code> (required) ===
The number of outputs this component has.
=== <code>propagationDelay</code> (optional) ===
The number of ticks that this component takes before its outputs reflect its internal state, whether through setting outputs or interacting with the world in some other way (e.g. displays).

Latest revision as of 10:44, 7 September 2025