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.
This commit is contained in:
Watermelon914
2021-06-23 22:34:19 +01:00
committed by GitHub
parent cc257d71a2
commit f92403f3ed
41 changed files with 398 additions and 95 deletions
@@ -5,6 +5,7 @@
*/
/obj/item/circuit_component/concat
display_name = "Concatenate"
display_desc = "A component that combines strings."
/// The amount of input ports to have
var/input_port_amount = 4
@@ -5,6 +5,7 @@
*/
/obj/item/circuit_component/compare/contains
display_name = "String Contains"
display_desc = "Checks if a string contains a word/letter"
input_port_amount = 0
@@ -5,6 +5,7 @@
*/
/obj/item/circuit_component/textcase
display_name = "Text Case"
display_desc = "A component that makes its input uppercase or lowercase."
/// The input port
var/datum/port/input/input_port
@@ -14,13 +15,14 @@
circuit_flags = CIRCUIT_FLAG_INPUT_SIGNAL|CIRCUIT_FLAG_OUTPUT_SIGNAL
GLOBAL_LIST_INIT(comp_text_operations, list(
COMP_TEXT_LOWER,
COMP_TEXT_UPPER
))
/obj/item/circuit_component/textcase/populate_options()
var/static/component_options = list(
COMP_TEXT_LOWER,
COMP_TEXT_UPPER,
)
options = component_options
/obj/item/circuit_component/textcase/Initialize()
options = GLOB.comp_text_operations
. = ..()
input_port = add_input_port("Input", PORT_TYPE_STRING)
output = add_output_port("Output", PORT_TYPE_STRING)
@@ -5,6 +5,7 @@
*/
/obj/item/circuit_component/tostring
display_name = "To String"
display_desc = "A component that converts its input to text."
/// The input port
var/datum/port/input/input_port