Component Port

A port used by a component. Connects to other ports.
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 |
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. |
Procs | |
datatype_ui_data | Returns the data from the datatype |
disconnect_all | Disconnects a port from all other ports. |
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. |
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. |
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:
- new_type - The type this port is to be set to.
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.