Files
Bubberstation/code/modules/wiremod/components/atom/self.dm
SkyratBot 5ab9aba9d4 [MIRROR] Added circuit component UI details, added multiplexer and allowed inserting components directly into shells. (#6479)
* Added circuit component UI details, added multiplexer and allowed inserting components directly into shells. (#59635)

Adds the multiplexer circuit component - en.wikipedia.org/wiki/Multiplexer
Circuit components can now be directly inserted into shells rather than having to take the integrated circuit out.
Special information can be accessed from components now through the "Info" button besides the eject button on a component.

* Added circuit component UI details, added multiplexer and allowed inserting components directly into shells.

Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
2021-06-23 22:50:59 +01:00

26 lines
625 B
Plaintext

/**
* # Self Component
*
* Return the current shell.
*/
/obj/item/circuit_component/self
display_name = "Self"
display_desc = "A component that returns the current shell."
/// The shell this component is attached to.
var/datum/port/output/output
/obj/item/circuit_component/self/Initialize()
. = ..()
output = add_output_port("Self", PORT_TYPE_ATOM)
/obj/item/circuit_component/self/Destroy()
output = null
return ..()
/obj/item/circuit_component/self/register_shell(atom/movable/shell)
output.set_output(shell)
/obj/item/circuit_component/self/unregister_shell(atom/movable/shell)
output.set_output(null)