[MIRROR] Adds the 2 new components to the techweb [MDB IGNORE] (#18953)

Adds the 2 new components to the techweb (#72910)

## About The Pull Request

Adds the 2 new components I made in my prior PR to the basic circuit
research

also fix an issue with associative pick list

## Why It's Good For The Game

 Being able to print them would be usefull

Reason I didn't notice was properly since I ran on debug station and it
never crossed my mind that they where research thingy

## Changelog
🆑
fix: You can print the new list pick and associative list pick
components
fix: Associative list pick works as intended now
/🆑

Co-authored-by: Autisem <36102060+Autisem@users.noreply.github.com>
This commit is contained in:
SkyratBot
2023-01-26 14:29:38 -05:00
committed by GitHub
co-authored by Autisem
parent bd27470a06
commit 3954fd1a94
4 changed files with 25 additions and 4 deletions
@@ -13,7 +13,7 @@
list_options = add_option_port("List Type", GLOB.wiremod_basic_types)
/obj/item/circuit_component/list_pick/assoc/make_list_port()
input_list = add_input_port("List", PORT_TYPE_ASSOC_LIST(PORT_TYPE_STRING, PORT_TYPE_LIST(PORT_TYPE_ANY)))
input_list = add_input_port("List", PORT_TYPE_ASSOC_LIST(PORT_TYPE_STRING, PORT_TYPE_ANY))
/obj/item/circuit_component/list_pick/assoc/pre_input_received(datum/port/input/port)
@@ -22,4 +22,10 @@
input_list.set_datatype(PORT_TYPE_ASSOC_LIST(PORT_TYPE_STRING, new_type))
output.set_datatype(new_type)
/obj/item/circuit_component/list_pick/assoc/choose_item(choice, list/choice_list)
if(choice_list[choice])
output.set_output(choice_list[choice])
success.set_output(COMPONENT_SIGNAL)
else
failure.set_output(COMPONENT_SIGNAL)
@@ -73,8 +73,11 @@
var/picked = tgui_input_list(user, message = message, items = showed_list)
if(!(user.canUseTopic(src, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE)))
return
if(picked)
output.set_output(picked)
choose_item(picked, showed_list)
/obj/item/circuit_component/list_pick/proc/choose_item(choice, list/choice_list)
if(choice)
output.set_output(choice)
success.set_output(COMPONENT_SIGNAL)
else
failure.set_output(COMPONENT_SIGNAL)