mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-11 10:11:09 +00:00
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:
@@ -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)
|
||||
|
||||
@@ -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>")
|
||||
|
||||
Reference in New Issue
Block a user