mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-14 11:42:27 +00:00
* Integrated the component printer into the integrated circuit UI. You can now link integrated circuits to component printers (#62287) Co-authored-by: Watermelon914 <3052169-Watermelon914@ users.noreply.gitlab.com> * Integrated the component printer into the integrated circuit UI. You can now link integrated circuits to component printers Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com> Co-authored-by: Watermelon914 <3052169-Watermelon914@ users.noreply.gitlab.com>
28 lines
808 B
Plaintext
28 lines
808 B
Plaintext
/**
|
|
* # Self Component
|
|
*
|
|
* Return the current shell.
|
|
*/
|
|
/obj/item/circuit_component/self
|
|
display_name = "Self"
|
|
desc = "A component that returns the current shell."
|
|
category = "Entity"
|
|
|
|
/// 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)
|