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
@@ -234,7 +234,7 @@
return
if(isgolem(user) && can_transfer)
var/mob/living/carbon/human/H = user
var/transfer_choice = alert("Transfer your soul to [src]? (Warning, your old body will die!)",,"Yes","No")
var/transfer_choice = tgui_alert(usr, "Transfer your soul to [src]? (Warning, your old body will die!)",,list("Yes","No"))
if(transfer_choice != "Yes")
return
if(QDELETED(src) || uses <= 0)
@@ -839,7 +839,7 @@
assignedrole = "Space Bar Patron"
/obj/effect/mob_spawn/human/alive/space_bar_patron/attack_hand(mob/user, list/modifiers)
var/despawn = alert("Return to cryosleep? (Warning, Your mob will be deleted!)", null, "Yes", "No")
var/despawn = tgui_alert(usr, "Return to cryosleep? (Warning, Your mob will be deleted!)", null, list("Yes", "No"))
if(despawn == "No" || !loc || !Adjacent(user))
return
user.visible_message("<span class='notice'>[user.name] climbs back into cryosleep...</span>")
+3 -3
View File
@@ -228,7 +228,7 @@
if(!(H.gender in list("male", "female"))) //blame the patriarchy
return
if(H.gender == "male")
if(alert(H, "Become a Witch?", "Confirmation", "Yes", "No") == "Yes")
if(tgui_alert(H, "Become a Witch?", "Confirmation", list("Yes", "No")) == "Yes")
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
return
H.gender = FEMALE
@@ -238,7 +238,7 @@
return
else
if(alert(H, "Become a Warlock?", "Confirmation", "Yes", "No") == "Yes")
if(tgui_alert(H, "Become a Warlock?", "Confirmation", list("Yes", "No")) == "Yes")
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
return
H.gender = MALE
@@ -251,7 +251,7 @@
H.update_mutations_overlay() //(hulk male/female)
if("hair")
var/hairchoice = alert(H, "Hairstyle or hair color?", "Change Hair", "Style", "Color")
var/hairchoice = tgui_alert(H, "Hairstyle or hair color?", "Change Hair", list("Style", "Color"))
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
return
if(hairchoice == "Style") //So you just want to use a mirror then?