[MIRROR] Replace alert usage with tgui_alert (#5815)

* Replace alert usage with tgui_alert

* a

* Update observer.dm

Co-authored-by: Celotajs <81999976+celotajstg@users.noreply.github.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
This commit is contained in:
SkyratBot
2021-05-21 01:06:09 +02:00
committed by GitHub
parent a001439964
commit ea9aed5554
146 changed files with 493 additions and 416 deletions
+5 -5
View File
@@ -520,11 +520,11 @@
player_cid = query_create_ban_get_player.item[3]
else
if(use_last_connection)
if(alert(usr, "[player_key]/([player_ckey]) has not been seen before, unable to use IP and CID from last connection. Are you sure you want to create a ban for them?", "Unknown key", "Yes", "No", "Cancel") != "Yes")
if(tgui_alert(usr, "[player_key]/([player_ckey]) has not been seen before, unable to use IP and CID from last connection. Are you sure you want to create a ban for them?", "Unknown key", list("Yes", "No", "Cancel")) != "Yes")
qdel(query_create_ban_get_player)
return
else
if(alert(usr, "[player_key]/([player_ckey]) has not been seen before, are you sure you want to create a ban for them?", "Unknown key", "Yes", "No", "Cancel") != "Yes")
if(tgui_alert(usr, "[player_key]/([player_ckey]) has not been seen before, are you sure you want to create a ban for them?", "Unknown key", list("Yes", "No", "Cancel")) != "Yes")
qdel(query_create_ban_get_player)
return
qdel(query_create_ban_get_player)
@@ -788,7 +788,7 @@
to_chat(usr, "<span class='danger'>Failed to establish database connection.</span>", confidential = TRUE)
return
var/target = ban_target_string(player_key, player_ip, player_cid)
if(alert(usr, "Please confirm unban of [target] from [role].", "Unban confirmation", "Yes", "No") == "No")
if(tgui_alert(usr, "Please confirm unban of [target] from [role].", "Unban confirmation", list("Yes", "No")) == "No")
return
var/kn = key_name(usr)
var/kna = key_name_admin(usr)
@@ -848,11 +848,11 @@
player_cid = query_edit_ban_get_player.item[4]
else
if(use_last_connection)
if(alert(usr, "[player_key]/([player_ckey]) has not been seen before, unable to use IP and CID from last connection. Are you sure you want to edit a ban for them?", "Unknown key", "Yes", "No", "Cancel") != "Yes")
if(tgui_alert(usr, "[player_key]/([player_ckey]) has not been seen before, unable to use IP and CID from last connection. Are you sure you want to edit a ban for them?", "Unknown key", list("Yes", "No", "Cancel")) != "Yes")
qdel(query_edit_ban_get_player)
return
else
if(alert(usr, "[player_key]/([player_ckey]) has not been seen before, are you sure you want to edit a ban for them?", "Unknown key", "Yes", "No", "Cancel") != "Yes")
if(tgui_alert(usr, "[player_key]/([player_ckey]) has not been seen before, are you sure you want to edit a ban for them?", "Unknown key", list("Yes", "No", "Cancel")) != "Yes")
qdel(query_edit_ban_get_player)
return
qdel(query_edit_ban_get_player)