Merge pull request #7273 from Citadel-Station-13/upstream-merge-38804
[MIRROR] Adds a colour picker component for circuits
This commit is contained in:
@@ -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."
|
||||
|
||||
Reference in New Issue
Block a user