Convert almost all alert() to tgui_alert()

This commit is contained in:
Aronai Sieyes
2021-06-25 17:03:35 -04:00
parent 70bff20384
commit 0da0c54388
191 changed files with 509 additions and 521 deletions
+3 -3
View File
@@ -162,13 +162,13 @@
set name = "Fix TGUI"
set category = "OOC"
if(alert(src, "Only use this verb if you have a white TGUI window stuck on your screen.", "Fix TGUI", "Continue", "Nevermind") != "Continue")
if(alert(src, "Only use this verb if you have a white TGUI window stuck on your screen.", "Fix TGUI", "Continue", "Nevermind") != "Continue") // Not tgui_alert since we're fixing tgui
return
SStgui.close_user_uis(mob)
if(alert(src, "Did that fix the problem?", "Fix TGUI", "Yes", "No") == "No")
if(alert(src, "Did that fix the problem?", "Fix TGUI", "Yes", "No") == "No") // Not tgui_alert since we're fixing tgui
SStgui.force_close_all_windows(mob)
alert(src, "UIs should be fixed now. If not, please cry to your nearest coder.", "Fix TGUI")
alert(src, "UIs should be fixed now. If not, please cry to your nearest coder.", "Fix TGUI") // Not tgui_alert since we're fixing tgui
/**
* verb
@@ -86,7 +86,7 @@
shuttle.launch()
else if(istype(S, /datum/shuttle/autodock))
var/datum/shuttle/autodock/shuttle = S
if(alert(usr, "Are you sure you want to launch [shuttle]?", "Launching Shuttle", "Yes", "No") == "Yes")
if(tgui_alert(usr, "Are you sure you want to launch [shuttle]?", "Launching Shuttle", list("Yes", "No")) == "Yes")
shuttle.launch(src)
else
to_chat(usr, "<span class='notice'>The shuttle control panel isn't quite sure how to move [S] ([S?.type]).</span>")
+1 -1
View File
@@ -118,7 +118,7 @@
to_chat(usr, "<span class='notice'>Sex changed to '[new_sex]'.</span>")
. = TRUE
if("factoryreset")
if(alert(usr, "This will factory reset the card, including access and owner. Continue?", "Factory Reset", "No", "Yes") == "Yes" && tgui_status(usr, state) == STATUS_INTERACTIVE)
if(tgui_alert(usr, "This will factory reset the card, including access and owner. Continue?", "Factory Reset", list("No", "Yes")) == "Yes" && tgui_status(usr, state) == STATUS_INTERACTIVE)
S.age = initial(S.age)
S.access = syndicate_access.Copy()
S.assignment = initial(S.assignment)
+2 -2
View File
@@ -282,7 +282,7 @@
if(isAI(usr) || isrobot(usr))
to_chat(usr, "<span class='warning'>Firewalls prevent you from recalling the shuttle.</span>")
return
var/response = alert(usr, "Are you sure you wish to recall the shuttle?", "Confirm", "Yes", "No")
var/response = tgui_alert(usr, "Are you sure you wish to recall the shuttle?", "Confirm", list("Yes", "No"))
if(response == "Yes")
cancel_call_proc(usr)
setMenuState(usr, COMM_SCREEN_MAIN)
@@ -301,7 +301,7 @@
var/datum/comm_message_listener/l = obtain_message_listener()
if(params["msgid"])
setCurrentMessage(usr, text2num(params["msgid"]))
var/response = alert(usr, "Are you sure you wish to delete this message?", "Confirm", "Yes", "No")
var/response = tgui_alert(usr, "Are you sure you wish to delete this message?", "Confirm", list("Yes", "No"))
if(response == "Yes")
if(current_viewing_message)
if(l != global_message_listener)
+3 -2
View File
@@ -142,7 +142,8 @@
src.callback = callback
/datum/tgui_modal/async/Destroy(force, ...)
QDEL_NULL(callback)
if(callback)
QDEL_NULL(callback)
. = ..()
/datum/tgui_modal/async/tgui_close(mob/user)
@@ -153,7 +154,7 @@
. = ..()
if (!. || choice == null)
return
callback.InvokeAsync(choice)
callback?.InvokeAsync(choice)
qdel(src)
/datum/tgui_modal/async/wait()