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

Component Port

A port used by a component. Connects to other ports.

Vars

colorThe port color. If unset, appears as blue.
connected_componentThe component this port is attached to
datatypeThe port type. Ports can only connect to each other if the type matches
datatype_handlerThe default port type. Stores the original datatype of the port set on Initialize.
nameName of the port. Used when displaying the port.
orderThe weight of the port. Determines the
valueThe value that's currently in the port. It's of the above type.

Procs

datatype_ui_dataReturns the data from the datatype
disconnect_allDisconnects a port from all other ports.
null_valueSignal handler proc to null the input if an atom is deleted. An update is not sent because this was not set by anything.
on_value_qdeletingDo our part in setting all source references anywhere to null.
set_datatypeSets the datatype of the port.
set_valueSets the port's value to value. Casts to the port's datatype (e.g. number -> string), and assumes this can be done.

Var Details

color

The port color. If unset, appears as blue.

connected_component

The component this port is attached to

datatype

The port type. Ports can only connect to each other if the type matches

datatype_handler

The default port type. Stores the original datatype of the port set on Initialize.

name

Name of the port. Used when displaying the port.

order

The weight of the port. Determines the

value

The value that's currently in the port. It's of the above type.

Proc Details

datatype_ui_data

Returns the data from the datatype

disconnect_all

Disconnects a port from all other ports.

Called by /obj/item/circuit_component whenever it is disconnected from an integrated circuit

null_value

Signal handler proc to null the input if an atom is deleted. An update is not sent because this was not set by anything.

on_value_qdeleting

Do our part in setting all source references anywhere to null.

set_datatype

Sets the datatype of the port.

Arguments:

set_value

Sets the port's value to value. Casts to the port's datatype (e.g. number -> string), and assumes this can be done.