[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>
This commit is contained in:
SkyratBot
2021-06-23 22:50:59 +01:00
committed by GitHub
co-authored by Watermelon914
parent 1a2f4f5d69
commit 5ab9aba9d4
41 changed files with 398 additions and 95 deletions
@@ -5,6 +5,7 @@
*/
/obj/item/circuit_component/direction
display_name = "Get Direction"
display_desc = "A component that returns the direction of itself and an entity."
/// The input port
var/datum/port/input/input_port
@@ -23,6 +24,14 @@
/// Maximum range for a valid direction to be returned
var/max_range = 7
/obj/item/circuit_component/direction/get_ui_notices()
. = ..()
. += list(list(
"icon" = "info",
"content" = "Maximum Range: [max_range] tiles",
"color" = "orange",
))
/obj/item/circuit_component/direction/Initialize()
. = ..()
input_port = add_input_port("Organism", PORT_TYPE_ATOM)
@@ -5,6 +5,7 @@
*/
/obj/item/circuit_component/gps
display_name = "Internal GPS"
display_desc = "A component that returns the xyz co-ordinates of itself."
/// The result from the output
var/datum/port/output/x_pos
@@ -5,6 +5,7 @@
*/
/obj/item/circuit_component/health
display_name = "Get Health"
display_desc = "A component that returns the health of an organism."
/// The input port
var/datum/port/input/input_port
@@ -24,6 +25,14 @@
var/max_range = 5
/obj/item/circuit_component/health/get_ui_notices()
. = ..()
. += list(list(
"icon" = "info",
"content" = "Maximum Range: [max_range] tiles",
"color" = "orange",
))
/obj/item/circuit_component/health/Initialize()
. = ..()
input_port = add_input_port("Organism", PORT_TYPE_ATOM)
@@ -5,6 +5,7 @@
*/
/obj/item/circuit_component/hear
display_name = "Voice Activator"
display_desc = "A component that listens for messages. Requires a shell."
flags_1 = HEAR_1
@@ -5,6 +5,7 @@
*/
/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
@@ -5,6 +5,7 @@
*/
/obj/item/circuit_component/species
display_name = "Get Species"
display_desc = "A component that returns the species of its input."
/// The input port
var/datum/port/input/input_port