Component Port

A base type port used by a component
Connects to other ports. This is an abstract type that should not be instanciated
Vars | |
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 |
default_datatype | The default port type. Stores the original datatype of the port set on Initialize. |
name | Name of the port. Used when displaying the port. |
Procs | |
convert_value | Returns the value to be set for the port |
datatype_to_color | Converts the datatype into an appropriate colour |
disconnect | Disconnects a port from all other ports |
set_datatype | Sets the datatype of the port. |
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
default_datatype

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

Name of the port. Used when displaying the port.
Proc Details
convert_value
Returns the value to be set for the port
Used for implicit conversions between outputs and inputs (e.g. number -> string) and applying/removing signals on inputs
datatype_to_color
Converts the datatype into an appropriate colour
disconnect
Disconnects a port from all other ports
Called by /obj/item/circuit_component whenever it is disconnected from an integrated circuit
set_datatype
Sets the datatype of the port.
Arguments:
- type_to_set - The type this port is set to.