Make chem dispenser reagent search better (#72358)

Improving the chem dispenser reagent search by using a List.

This is my first Pull Request for tgstation. I would like to know how to
add Test for this change.

Make the Input more fun to Use by letting the player search in a reagent
list. Helps for typing complicated chemical names.
This commit is contained in:
Gorock
2023-01-01 13:16:27 +00:00
committed by GitHub
parent 221de7ef5c
commit 5012d3f5ef
+1 -1
View File
@@ -1911,7 +1911,7 @@
ui_reaction_id = text2path(params["id"])
return TRUE
if("search_reagents")
var/input_reagent = (input("Enter the name of any reagent", "Input") as text|null)
var/input_reagent = tgui_input_list(usr, "Select reagent", "Reagent", GLOB.chemical_name_list)
input_reagent = get_reagent_type_from_product_string(input_reagent) //from string to type
var/datum/reagent/reagent = find_reagent_object_from_type(input_reagent)
if(!reagent)