Merge pull request #7273 from Citadel-Station-13/upstream-merge-38804

[MIRROR] Adds a colour picker component for circuits
This commit is contained in:
LetterJay
2018-07-01 09:35:51 -05:00
committed by GitHub
2 changed files with 19 additions and 0 deletions

View File

@@ -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."