Upload files

This commit is contained in:
SandPoot
2021-10-05 00:33:49 -03:00
parent 2de686f4d6
commit bbe32fa38a
156 changed files with 830 additions and 413 deletions
+3 -3
View File
@@ -75,11 +75,11 @@
/proc/choose_reagent_id(mob/user)
var/chosen_id
switch(alert(user, "Choose a method.", "Add Reagents", "Search", "Choose from a list", "I'm feeling lucky"))
switch(tgui_alert(user, "Choose a method.", "Add Reagents", list("Search", "Choose from a list", "I'm feeling lucky")))
if("Search")
var/valid_id
while(!valid_id)
chosen_id = input(user, "Enter the ID of the reagent you want to add.", "Search reagents") as null|text
chosen_id = tgui_input_text(user, "Enter the ID of the reagent you want to add.", "Search reagents")
if(isnull(chosen_id)) //Get me out of here!
break
if(!ispath(text2path(chosen_id)))
@@ -91,7 +91,7 @@
if(!valid_id)
to_chat(user, "<span class='warning'>A reagent with that ID doesn't exist!</span>")
if("Choose from a list")
chosen_id = input(user, "Choose a reagent to add.", "Choose a reagent.") as null|anything in subtypesof(/datum/reagent)
chosen_id = tgui_input_list(user, "Choose a reagent to add.", "Choose a reagent.", subtypesof(/datum/reagent))
if("I'm feeling lucky")
chosen_id = pick(subtypesof(/datum/reagent))
return chosen_id
+1 -1
View File
@@ -42,7 +42,7 @@
/proc/sanitize_name(t,list/repl_chars = null)
if(t == "space" || t == "floor" || t == "wall" || t == "r-wall" || t == "monkey" || t == "unknown" || t == "inactive ai") //prevents these common metagamey names
alert("Invalid name.")
tgui_alert(usr, "Invalid name.")
return ""
return sanitize(t)