Convert almost all alert() to tgui_alert()

This commit is contained in:
Aronai Sieyes
2021-06-25 16:20:22 -04:00
parent 70bff20384
commit 0da0c54388
191 changed files with 509 additions and 521 deletions
@@ -57,7 +57,7 @@
var/datum/computer_file/data/F = HDD.find_file_by_name(open_file)
if(!F || !istype(F))
return
if(F.do_not_edit && (alert(usr, "WARNING: This file is not compatible with editor. Editing it may result in permanently corrupted formatting or damaged data consistency. Edit anyway?", "Incompatible File", "No", "Yes") == "No"))
if(F.do_not_edit && (tgui_alert(usr, "WARNING: This file is not compatible with editor. Editing it may result in permanently corrupted formatting or damaged data consistency. Edit anyway?", "Incompatible File", list("No", "Yes")) == "No"))
return
var/oldtext = html_decode(F.stored_data)
@@ -118,7 +118,7 @@
if("PRG_openfile")
if(is_edited)
if(alert(usr, "Would you like to save your changes first?","Save Changes","Yes","No") == "Yes")
if(tgui_alert(usr, "Would you like to save your changes first?","Save Changes",list("Yes","No")) == "Yes")
save_file(open_file)
browsing = 0
if(!open_file(params["PRG_openfile"]))
@@ -127,7 +127,7 @@
if("PRG_newfile")
if(is_edited)
if(alert(usr, "Would you like to save your changes first?","Save Changes","Yes","No") == "Yes")
if(tgui_alert(usr, "Would you like to save your changes first?","Save Changes",list("Yes","No")) == "Yes")
save_file(open_file)
var/newname = sanitize(input(usr, "Enter file name:", "New File") as text|null)
@@ -59,7 +59,7 @@
ntnet_global.setting_disabled = FALSE
return TRUE
var/response = alert(usr, "Really disable NTNet wireless? If your computer is connected wirelessly you won't be able to turn it back on! This will affect all connected wireless devices.", "NTNet shutdown", "Yes", "No")
var/response = tgui_alert(usr, "Really disable NTNet wireless? If your computer is connected wirelessly you won't be able to turn it back on! This will affect all connected wireless devices.", "NTNet shutdown", list("Yes", "No"))
if(response == "Yes" && tgui_status(usr, state) == STATUS_INTERACTIVE)
ntnet_global.setting_disabled = TRUE
return TRUE