mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 09:54:52 +00:00
yep
This commit is contained in:
@@ -1321,24 +1321,7 @@ GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits
|
||||
if(amount)
|
||||
A.create_reagents(amount)
|
||||
if(A.reagents)
|
||||
var/chosen_id
|
||||
switch(alert(usr, "Choose a method.", "Add Reagents", "Search", "Choose from a list"))
|
||||
if("Search")
|
||||
var/valid_id
|
||||
while(!valid_id)
|
||||
chosen_id = input(usr, "Enter the ID of the reagent you want to add.", "Search reagents") as null|text
|
||||
if(isnull(chosen_id)) //Get me out of here!
|
||||
break
|
||||
if(!ispath(text2path(chosen_id)))
|
||||
chosen_id = pick_closest_path(chosen_id, make_types_fancy(subtypesof(/datum/reagent)))
|
||||
if(ispath(chosen_id))
|
||||
valid_id = TRUE
|
||||
else
|
||||
valid_id = TRUE
|
||||
if(!valid_id)
|
||||
to_chat(usr, "<span class='warning'>A reagent with that ID doesn't exist!</span>")
|
||||
if("Choose from a list")
|
||||
chosen_id = input(usr, "Choose a reagent to add.", "Choose a reagent.") as null|anything in subtypesof(/datum/reagent)
|
||||
var/chosen_id = choose_reagent_id(usr)
|
||||
if(chosen_id)
|
||||
var/amount = input(usr, "Choose the amount to add.", "Choose the amount.", A.reagents.maximum_volume) as num
|
||||
if(amount)
|
||||
|
||||
Reference in New Issue
Block a user