Files
Bubberstation/code/modules/wiremod/components/atom/self.dm
SkyratBot c302124fd5 [MIRROR] Adds an admin signal handler circuit component (#8218)
* Adds an admin signal handler circuit component

* Update FundamentalTypes.js

Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
2021-09-19 22:10:10 +01:00

27 lines
787 B
Plaintext

/**
* # Self Component
*
* Return the current shell.
*/
/obj/item/circuit_component/self
display_name = "Self"
desc = "A component that returns the current shell."
/// The shell this component is attached to.
var/datum/port/output/output
/// The signal sent when the status is updated.
var/datum/port/output/shell_received
/obj/item/circuit_component/self/populate_ports()
output = add_output_port("Shell", PORT_TYPE_ATOM)
shell_received = add_output_port("Shell Updated", PORT_TYPE_SIGNAL)
/obj/item/circuit_component/self/register_shell(atom/movable/shell)
output.set_output(shell)
shell_received.set_output(COMPONENT_SIGNAL)
/obj/item/circuit_component/self/unregister_shell(atom/movable/shell)
output.set_output(null)
shell_received.set_output(COMPONENT_SIGNAL)