/tg/ Station 13 - Modules - TypesDefine Details

code/__DEFINES/dcs/signals/signals_circuit.dm

COMSIG_PORT_SET_VALUESent when the value of a port is set.
COMSIG_PORT_SET_TYPESent when the type of a port is set.
COMSIG_PORT_DISCONNECTSent when a port disconnects from everything.
COMSIG_CIRCUIT_ADD_COMPONENTSent when a /obj/item/circuit_component is added to a circuit.
COMPONENT_CANCEL_ADD_COMPONENTCancels adding the component to the circuit.
COMSIG_CIRCUIT_ADD_COMPONENT_MANUALLYSent when a /obj/item/circuit_component is added to a circuit manually, by putting the item inside directly. Accepts COMPONENT_CANCEL_ADD_COMPONENT.
COMSIG_CIRCUIT_SHELL_REMOVEDSent when a circuit is removed from its shell
COMSIG_CIRCUIT_COMPONENT_REMOVEDSent to /obj/item/circuit_component when it is removed from a circuit. (/obj/item/integrated_circuit)
COMSIG_CIRCUIT_SET_CELLCalled when the integrated circuit's cell is set.
COMSIG_CIRCUIT_SET_ONCalled when the integrated circuit is turned on or off.
COMSIG_CIRCUIT_SET_SHELLCalled when the integrated circuit's shell is set.
COMSIG_CIRCUIT_SET_LOCKEDCalled when the integrated circuit is locked.
COMSIG_CIRCUIT_PRE_POWER_USAGECalled before power is used in an integrated circuit (power_to_use)
COMSIG_CIRCUIT_PRE_SAVE_TO_JSONCalled right before the integrated circuit data is converted to json. Allows modification to the data right before it is returned.
COMSIG_CIRCUIT_POST_LOADCalled when the integrated circuit is loaded.
COMSIG_ATOM_USB_CABLE_TRY_ATTACHSent to an atom when a /obj/item/usb_cable attempts to connect to something. (/obj/item/usb_cable/usb_cable, /mob/user)
COMSIG_USB_CABLE_ATTACHEDAttaches the USB cable to the atom. If the USB cables moves away, it will disconnect.
COMSIG_USB_CABLE_CONNECTED_TO_CIRCUITAttaches the USB cable to a circuit. Producers of this are expected to set the usb_cable's attached_circuit variable.
COMSIG_CANCEL_USB_CABLE_ATTACKCancels the attack chain, but without performing any other action.
COMSIG_CIRCUIT_COMPONENT_SAVECalled when the circuit component is saved.
COMSIG_CIRCUIT_COMPONENT_SAVE_DATACalled when circuit component data should be saved
COMSIG_CIRCUIT_COMPONENT_LOAD_DATACalled when circuit component data should be loaded
COMSIG_MOVABLE_CIRCUIT_LOADEDCalled when an external object is loaded.
COMSIG_CIRCUIT_COMPONENT_PERFORM_ACTIONCalled when a ui action is sent for the circuit component
COMSIG_GLOB_CIRCUIT_NTNET_DATA_SENTCalled when an Ntnet sender is sending Ntnet data
COMSIG_CIRCUIT_ACTION_COMPONENT_REGISTEREDCalled when an equipment action component is added to a shell (/obj/item/circuit_component/equipment_action/action_comp)
COMSIG_CIRCUIT_ACTION_COMPONENT_UNREGISTEREDCalled when an equipment action component is removed from a shell (/obj/item/circuit_component/equipment_action/action_comp)
COMSIG_CIRCUIT_NFC_DATA_SENTCalled when an NFC sender sends data to this circuit
COMSIG_SHELL_CIRCUIT_ATTACHEDSent to the shell component when a circuit is attached.
COMSIG_SHELL_CIRCUIT_REMOVEDSent to the shell component when a circuit is removed.

Define Details

COMPONENT_CANCEL_ADD_COMPONENT

Cancels adding the component to the circuit.

COMSIG_ATOM_USB_CABLE_TRY_ATTACH

Sent to an atom when a /obj/item/usb_cable attempts to connect to something. (/obj/item/usb_cable/usb_cable, /mob/user)

COMSIG_CANCEL_USB_CABLE_ATTACK

Cancels the attack chain, but without performing any other action.

COMSIG_CIRCUIT_ACTION_COMPONENT_REGISTERED

Called when an equipment action component is added to a shell (/obj/item/circuit_component/equipment_action/action_comp)

COMSIG_CIRCUIT_ACTION_COMPONENT_UNREGISTERED

Called when an equipment action component is removed from a shell (/obj/item/circuit_component/equipment_action/action_comp)

COMSIG_CIRCUIT_ADD_COMPONENT

Sent when a /obj/item/circuit_component is added to a circuit.

COMSIG_CIRCUIT_ADD_COMPONENT_MANUALLY

Sent when a /obj/item/circuit_component is added to a circuit manually, by putting the item inside directly. Accepts COMPONENT_CANCEL_ADD_COMPONENT.

COMSIG_CIRCUIT_COMPONENT_LOAD_DATA

Called when circuit component data should be loaded

COMSIG_CIRCUIT_COMPONENT_PERFORM_ACTION

Called when a ui action is sent for the circuit component

COMSIG_CIRCUIT_COMPONENT_REMOVED

Sent to /obj/item/circuit_component when it is removed from a circuit. (/obj/item/integrated_circuit)

COMSIG_CIRCUIT_COMPONENT_SAVE

Called when the circuit component is saved.

COMSIG_CIRCUIT_COMPONENT_SAVE_DATA

Called when circuit component data should be saved

COMSIG_CIRCUIT_NFC_DATA_SENT

Called when an NFC sender sends data to this circuit

COMSIG_CIRCUIT_POST_LOAD

Called when the integrated circuit is loaded.

COMSIG_CIRCUIT_PRE_POWER_USAGE

Called before power is used in an integrated circuit (power_to_use)

COMSIG_CIRCUIT_PRE_SAVE_TO_JSON

Called right before the integrated circuit data is converted to json. Allows modification to the data right before it is returned.

COMSIG_CIRCUIT_SET_CELL

Called when the integrated circuit's cell is set.

COMSIG_CIRCUIT_SET_LOCKED

Called when the integrated circuit is locked.

COMSIG_CIRCUIT_SET_ON

Called when the integrated circuit is turned on or off.

COMSIG_CIRCUIT_SET_SHELL

Called when the integrated circuit's shell is set.

COMSIG_CIRCUIT_SHELL_REMOVED

Sent when a circuit is removed from its shell

COMSIG_GLOB_CIRCUIT_NTNET_DATA_SENT

Called when an Ntnet sender is sending Ntnet data

COMSIG_MOVABLE_CIRCUIT_LOADED

Called when an external object is loaded.

COMSIG_PORT_DISCONNECT

Sent when a port disconnects from everything.

COMSIG_PORT_SET_TYPE

Sent when the type of a port is set.

COMSIG_PORT_SET_VALUE

Sent when the value of a port is set.

COMSIG_SHELL_CIRCUIT_ATTACHED

Sent to the shell component when a circuit is attached.

COMSIG_SHELL_CIRCUIT_REMOVED

Sent to the shell component when a circuit is removed.

COMSIG_USB_CABLE_ATTACHED

Attaches the USB cable to the atom. If the USB cables moves away, it will disconnect.

COMSIG_USB_CABLE_CONNECTED_TO_CIRCUIT

Attaches the USB cable to a circuit. Producers of this are expected to set the usb_cable's attached_circuit variable.