diff --git a/code/modules/integrated_electronics/subtypes/input.dm b/code/modules/integrated_electronics/subtypes/input.dm index 02500e5ed6..cca3f2babf 100644 --- a/code/modules/integrated_electronics/subtypes/input.dm +++ b/code/modules/integrated_electronics/subtypes/input.dm @@ -76,6 +76,25 @@ push_data() activate_pin(1) +/obj/item/integrated_circuit/input/colorpad + name = "color pad" + desc = "This small color pad allows someone to input a hexadecimal color into the system." + icon_state = "colorpad" + complexity = 2 + can_be_asked_input = 1 + inputs = list() + outputs = list("color entered" = IC_PINTYPE_STRING) + activators = list("on entered" = IC_PINTYPE_PULSE_IN) + spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH + power_draw_per_use = 4 + +/obj/item/integrated_circuit/input/colorpad/ask_for_input(mob/user) + var/new_color = input(user, "Enter a color, please.", "Color", "#ffffff") as color|null + if(new_color && user.IsAdvancedToolUser()) + set_pin_data(IC_OUTPUT, 1, new_color) + push_data() + activate_pin(1) + /obj/item/integrated_circuit/input/med_scanner name = "integrated medical analyser" desc = "A very small version of the common medical analyser. This allows the machine to know how healthy someone is." diff --git a/icons/obj/assemblies/electronic_components.dmi b/icons/obj/assemblies/electronic_components.dmi index 51e3a589d1..840b5828f3 100644 Binary files a/icons/obj/assemblies/electronic_components.dmi and b/icons/obj/assemblies/electronic_components.dmi differ