Jump to content

Module:Infobox/doc: Difference between revisions

From Logic World Wiki
Created page with "= p.component = {{Infobox component | title = Example gate | id = MHG.ExampleGate | image = 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, us..."
 
m fix example component image
Line 4: Line 4:
| title      = Example gate
| title      = Example gate
| id          = MHG.ExampleGate
| id          = MHG.ExampleGate
| image      = [[File:MHG.AndGate_512x512.png|200px]]
| image      = [[File:MHG.AndGate_thumbnail_render.png|200px]]
| caption    = An example gate
| caption    = An example gate
| io.minInputs        = 1
| io.minInputs        = 1

Revision as of 00:52, 7 September 2025

p.component

Example gate
[[File:|200px]]
An example gate
Component info
Internal ID MHG.ExampleGate
Configurable No
Input and output
Input count Adjustable from 1 to 5
Output count 2
Propagation delay 1 tick

Renders an infobox for a primitive Logic World component.

args (required)

title (required)

The title shown above and outside the infobox, usually the name of the gate.

id (required)

The ID of the component as specified in its .jecs definition file.

image (optional)

The main image to show on the infobox, usually a 200px render of the component.

Default: [[File:<ID> 512x512.png|200px]], where <ID> is the string passed as the id argument.

args.io (optional)

minInputs (required)

The minimum amount of inputs that the component can have, e.g. the AND gate must have at least two inputs.

maxInputs (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.

outputs (required)

The number of outputs this component has.

propagationDelay (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).