Replace alert usage with tgui_alert (#58419)

Pretty much every alert() call is replaced with tgui_alert, except one I replaced with tgalert as a fallback. If tgui_alert exists, why not use it?
This commit is contained in:
Celotajs
2021-05-20 13:43:27 +03:00
committed by GitHub
parent c955c58ed6
commit 190d0a0384
146 changed files with 493 additions and 415 deletions

View File

@@ -316,7 +316,7 @@
if("clear_recipes")
if(!is_operational)
return
var/yesno = alert("Clear all recipes?",, "Yes","No")
var/yesno = tgui_alert(usr, "Clear all recipes?",, list("Yes","No"))
if(yesno == "Yes")
saved_recipes = list()
. = TRUE
@@ -331,7 +331,7 @@
var/name = stripped_input(usr,"Name","What do you want to name this recipe?", "Recipe", MAX_NAME_LEN)
if(!usr.canUseTopic(src, !issilicon(usr)))
return
if(saved_recipes[name] && alert("\"[name]\" already exists, do you want to overwrite it?",, "Yes", "No") == "No")
if(saved_recipes[name] && tgui_alert(usr, "\"[name]\" already exists, do you want to overwrite it?",, list("Yes", "No")) == "No")
return
if(name && recording_recipe)
for(var/reagent in recording_recipe)

View File

@@ -169,7 +169,7 @@
set src in usr
if(usr.incapacitated())
return
if (alert(usr, "Are you sure you want to empty that?", "Empty Bottle:", "Yes", "No") != "Yes")
if (tgui_alert(usr, "Are you sure you want to empty that?", "Empty Bottle:", list("Yes", "No")) != "Yes")
return
if(isturf(usr.loc) && src.loc == usr)
to_chat(usr, "<span class='notice'>You empty \the [src] onto the floor.</span>")