/tg/ Station 13 - Modules - TypesVar Details - Proc Details

Integrated Circuit Component

A component that performs a function when given an input

Can be attached to an integrated circuitboard, where it can then be connected between other components to provide an output or to receive an input. This is the base type of all components

Vars

circuit_flagsThe flags of the circuit to control basic generalised behaviour.
current_optionThe current selected option
display_descThe description of the component shown on the UI
display_nameThe name of the component shown on the UI
input_portsA list that contains the components the input ports on this component Used to connect between the ports
optionsThe options that this component can take on. Limited to strings
output_portsA list that contains the outpurt ports on this component Used to connect between the ports
parentThe integrated_circuit that this component is attached to.
power_usage_per_inputThe power usage whenever this component receives an input
rel_xUsed to determine the x position of the component within the UI
rel_yUsed to determine the y position of the component within the UI
trigger_inputGeneric trigger input for triggering this component

Procs

add_input_portAdds an input port and returns it
add_output_portAdds an output port and returns it
add_toCalled when this component is about to be added to an integrated_circuit.
create_table_noticesCreates a table UI notice entry to be used in get_ui_notices()
create_ui_noticeCreates a UI notice entry to be used in get_ui_notices()
disconnectDisconnects a component from other components
get_ui_noticesGets the UI notices to be displayed on the CircuitInfo panel.
input_receivedCalled whenever an input is received from one of the ports.
load_data_from_listLoads data from a list
populate_optionsCalled when the options variable should be set.
register_shellCalled when a shell is registered from the component/the component is added to a circuit.
remove_input_portRemoves an input port and deletes it. This will not cleanup any references made by derivatives of the circuit component
remove_output_portRemoves an output port and deletes it. This will not cleanup any references made by derivatives of the circuit component
removed_fromCalled when this component is removed from an integrated_circuit.
save_data_to_listSaves data to a list. Shouldn't be used unless you are quite literally saving the data of a component to a list. Input value is the list to save the data to
set_optionSets the option on this component
unregister_shellCalled when a shell is unregistered from the component/the component is removed from a circuit.

Var Details

circuit_flags

The flags of the circuit to control basic generalised behaviour.

current_option

The current selected option

display_desc

The description of the component shown on the UI

display_name

The name of the component shown on the UI

input_ports

A list that contains the components the input ports on this component Used to connect between the ports

options

The options that this component can take on. Limited to strings

output_ports

A list that contains the outpurt ports on this component Used to connect between the ports

parent

The integrated_circuit that this component is attached to.

power_usage_per_input

The power usage whenever this component receives an input

rel_x

Used to determine the x position of the component within the UI

rel_y

Used to determine the y position of the component within the UI

trigger_input

Generic trigger input for triggering this component

Proc Details

add_input_port

Adds an input port and returns it

Arguments:

add_output_port

Adds an output port and returns it

Arguments:

add_to

Called when this component is about to be added to an integrated_circuit.

create_table_notices

Creates a table UI notice entry to be used in get_ui_notices()

Returns a list that can then be added to the return list in get_ui_notices() Used by components to list their available columns. Recommended to use at the end of get_ui_notices()

create_ui_notice

Creates a UI notice entry to be used in get_ui_notices()

Returns a list that can then be added to the return list in get_ui_notices()

disconnect

Disconnects a component from other components

Disconnects both the input and output ports of the component

get_ui_notices

Gets the UI notices to be displayed on the CircuitInfo panel.

Returns a list of buttons in the following format list( "icon" = ICON(string) "content" = CONTENT(string) "color" = COLOR(string, not a hex) )

input_received

Called whenever an input is received from one of the ports.

Return value indicates that the circuit should not do anything. Also prevents an output signal. Arguments:

load_data_from_list

Loads data from a list

populate_options

Called when the options variable should be set.

register_shell

Called when a shell is registered from the component/the component is added to a circuit.

Register all signals here on the shell. Arguments:

remove_input_port

Removes an input port and deletes it. This will not cleanup any references made by derivatives of the circuit component

Arguments:

remove_output_port

Removes an output port and deletes it. This will not cleanup any references made by derivatives of the circuit component

Arguments:

removed_from

Called when this component is removed from an integrated_circuit.

save_data_to_list

Saves data to a list. Shouldn't be used unless you are quite literally saving the data of a component to a list. Input value is the list to save the data to

set_option

Sets the option on this component

Can only be a value from the options variable Arguments:

unregister_shell

Called when a shell is unregistered from the component/the component is removed from a circuit.

Unregister all signals here on the shell. Arguments: