mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-15 20:22:07 +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:
@@ -328,7 +328,7 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
|
||||
|
||||
if(alert_mob_dupe_login)
|
||||
spawn()
|
||||
alert(mob, "You have logged in already with another key this round, please log out of this one NOW or risk being banned!")
|
||||
tgui_alert(mob, "You have logged in already with another key this round, please log out of this one NOW or risk being banned!")
|
||||
|
||||
connection_time = world.time
|
||||
connection_realtime = world.realtime
|
||||
|
||||
@@ -1269,7 +1269,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
ghost_orbit = new_orbit
|
||||
|
||||
if("ghostaccs")
|
||||
var/new_ghost_accs = alert("Do you want your ghost to show full accessories where possible, hide accessories but still use the directional sprites where possible, or also ignore the directions and stick to the default sprites?",,GHOST_ACCS_FULL_NAME, GHOST_ACCS_DIR_NAME, GHOST_ACCS_NONE_NAME)
|
||||
var/new_ghost_accs = tgui_alert(usr,"Do you want your ghost to show full accessories where possible, hide accessories but still use the directional sprites where possible, or also ignore the directions and stick to the default sprites?",,list(GHOST_ACCS_FULL_NAME, GHOST_ACCS_DIR_NAME, GHOST_ACCS_NONE_NAME))
|
||||
switch(new_ghost_accs)
|
||||
if(GHOST_ACCS_FULL_NAME)
|
||||
ghost_accs = GHOST_ACCS_FULL
|
||||
@@ -1279,7 +1279,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
ghost_accs = GHOST_ACCS_NONE
|
||||
|
||||
if("ghostothers")
|
||||
var/new_ghost_others = alert("Do you want the ghosts of others to show up as their own setting, as their default sprites or always as the default white ghost?",,GHOST_OTHERS_THEIR_SETTING_NAME, GHOST_OTHERS_DEFAULT_SPRITE_NAME, GHOST_OTHERS_SIMPLE_NAME)
|
||||
var/new_ghost_others = tgui_alert(usr,"Do you want the ghosts of others to show up as their own setting, as their default sprites or always as the default white ghost?",,list(GHOST_OTHERS_THEIR_SETTING_NAME, GHOST_OTHERS_DEFAULT_SPRITE_NAME, GHOST_OTHERS_SIMPLE_NAME))
|
||||
switch(new_ghost_others)
|
||||
if(GHOST_OTHERS_THEIR_SETTING_NAME)
|
||||
ghost_others = GHOST_OTHERS_THEIR_SETTING
|
||||
@@ -1660,7 +1660,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
save_preferences()
|
||||
|
||||
if("keybindings_reset")
|
||||
var/choice = tgui_alert(user, "Would you prefer 'hotkey' or 'classic' defaults?", "Setup keybindings", list("Hotkey", "Classic", "Cancel"))
|
||||
var/choice = tgui_alert(user, "Would you prefer 'hotkey' or 'classic' defaults?", "Setup keybindings", list("Hotkey", "Classic", "Cancel"), 60 SECONDS)
|
||||
if(choice == "Cancel")
|
||||
ShowChoices(user)
|
||||
return
|
||||
|
||||
@@ -312,7 +312,7 @@ GLOBAL_LIST_INIT(ghost_forms, sortList(list("ghost","ghostking","ghostian2","ske
|
||||
"ghost_mellow","ghost_rainbow","ghost_camo","ghost_fire", "catghost")))
|
||||
/client/proc/pick_form()
|
||||
if(!is_content_unlocked())
|
||||
alert("This setting is for accounts with BYOND premium only.")
|
||||
tgui_alert(usr,"This setting is for accounts with BYOND premium only.")
|
||||
return
|
||||
var/new_form = input(src, "Thanks for supporting BYOND - Choose your ghostly form:","Thanks for supporting BYOND",null) as null|anything in GLOB.ghost_forms
|
||||
if(new_form)
|
||||
@@ -326,7 +326,7 @@ GLOBAL_LIST_INIT(ghost_orbits, list(GHOST_ORBIT_CIRCLE,GHOST_ORBIT_TRIANGLE,GHOS
|
||||
|
||||
/client/proc/pick_ghost_orbit()
|
||||
if(!is_content_unlocked())
|
||||
alert("This setting is for accounts with BYOND premium only.")
|
||||
tgui_alert(usr,"This setting is for accounts with BYOND premium only.")
|
||||
return
|
||||
var/new_orbit = input(src, "Thanks for supporting BYOND - Choose your ghostly orbit:","Thanks for supporting BYOND",null) as null|anything in GLOB.ghost_orbits
|
||||
if(new_orbit)
|
||||
@@ -337,7 +337,7 @@ GLOBAL_LIST_INIT(ghost_orbits, list(GHOST_ORBIT_CIRCLE,GHOST_ORBIT_TRIANGLE,GHOS
|
||||
O.ghost_orbit = new_orbit
|
||||
|
||||
/client/proc/pick_ghost_accs()
|
||||
var/new_ghost_accs = alert("Do you want your ghost to show full accessories where possible, hide accessories but still use the directional sprites where possible, or also ignore the directions and stick to the default sprites?",,"full accessories", "only directional sprites", "default sprites")
|
||||
var/new_ghost_accs = tgui_alert(usr,"Do you want your ghost to show full accessories where possible, hide accessories but still use the directional sprites where possible, or also ignore the directions and stick to the default sprites?",,list("full accessories", "only directional sprites", "default sprites"))
|
||||
if(new_ghost_accs)
|
||||
switch(new_ghost_accs)
|
||||
if("full accessories")
|
||||
@@ -356,7 +356,7 @@ GLOBAL_LIST_INIT(ghost_orbits, list(GHOST_ORBIT_CIRCLE,GHOST_ORBIT_TRIANGLE,GHOS
|
||||
set category = "Preferences"
|
||||
set desc = "Customize your ghastly appearance."
|
||||
if(is_content_unlocked())
|
||||
switch(alert("Which setting do you want to change?",,"Ghost Form","Ghost Orbit","Ghost Accessories"))
|
||||
switch(tgui_alert(usr,"Which setting do you want to change?",,list("Ghost Form","Ghost Orbit","Ghost Accessories")))
|
||||
if("Ghost Form")
|
||||
pick_form()
|
||||
if("Ghost Orbit")
|
||||
@@ -370,7 +370,7 @@ GLOBAL_LIST_INIT(ghost_orbits, list(GHOST_ORBIT_CIRCLE,GHOST_ORBIT_TRIANGLE,GHOS
|
||||
set name = "Ghosts of Others"
|
||||
set category = "Preferences"
|
||||
set desc = "Change display settings for the ghosts of other players."
|
||||
var/new_ghost_others = alert("Do you want the ghosts of others to show up as their own setting, as their default sprites or always as the default white ghost?",,"Their Setting", "Default Sprites", "White Ghost")
|
||||
var/new_ghost_others = tgui_alert(usr,"Do you want the ghosts of others to show up as their own setting, as their default sprites or always as the default white ghost?",,list("Their Setting", "Default Sprites", "White Ghost"))
|
||||
if(new_ghost_others)
|
||||
switch(new_ghost_others)
|
||||
if("Their Setting")
|
||||
|
||||
@@ -37,7 +37,7 @@ GLOBAL_VAR_INIT(normal_ooc_colour, "#002eb8")
|
||||
msg = emoji_parse(msg)
|
||||
|
||||
if(SSticker.HasRoundStarted() && (msg[1] in list(".",";",":","#") || findtext_char(msg, "say", 1, 5)))
|
||||
if(alert("Your message \"[raw_msg]\" looks like it was meant for in game communication, say it in OOC?", "Meant for OOC?", "Yes", "No") != "Yes")
|
||||
if(tgui_alert(usr,"Your message \"[raw_msg]\" looks like it was meant for in game communication, say it in OOC?", "Meant for OOC?", list("Yes", "No")) != "Yes")
|
||||
return
|
||||
|
||||
if(!holder)
|
||||
@@ -130,7 +130,7 @@ GLOBAL_VAR_INIT(normal_ooc_colour, "#002eb8")
|
||||
set category = "Server"
|
||||
if(IsAdminAdvancedProcCall())
|
||||
return
|
||||
if(alert(usr, "Are you sure you want to reset the OOC color of all players?", "Reset Player OOC Color", "Yes", "No") != "Yes")
|
||||
if(tgui_alert(usr, "Are you sure you want to reset the OOC color of all players?", "Reset Player OOC Color", list("Yes", "No")) != "Yes")
|
||||
return
|
||||
if(!check_rights(R_FUN))
|
||||
message_admins("[usr.key] has attempted to use the Reset Player OOC Color verb!")
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
if(!canSuicide())
|
||||
return
|
||||
var/oldkey = ckey
|
||||
var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No")
|
||||
var/confirm = tgui_alert(usr,"Are you sure you want to commit suicide?", "Confirm Suicide", list("Yes", "No"))
|
||||
if(ckey != oldkey)
|
||||
return
|
||||
if(!canSuicide())
|
||||
@@ -115,7 +115,7 @@
|
||||
set hidden = TRUE
|
||||
if(!canSuicide())
|
||||
return
|
||||
var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No")
|
||||
var/confirm = tgui_alert(usr,"Are you sure you want to commit suicide?", "Confirm Suicide", list("Yes", "No"))
|
||||
if(!canSuicide())
|
||||
return
|
||||
if(confirm == "Yes")
|
||||
@@ -132,7 +132,7 @@
|
||||
set hidden = TRUE
|
||||
if(!canSuicide())
|
||||
return
|
||||
var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No")
|
||||
var/confirm = tgui_alert(usr,"Are you sure you want to commit suicide?", "Confirm Suicide", list("Yes", "No"))
|
||||
if(!canSuicide())
|
||||
return
|
||||
if(confirm == "Yes")
|
||||
@@ -151,7 +151,7 @@
|
||||
set hidden = TRUE
|
||||
if(!canSuicide())
|
||||
return
|
||||
var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No")
|
||||
var/confirm = tgui_alert(usr,"Are you sure you want to commit suicide?", "Confirm Suicide", list("Yes", "No"))
|
||||
if(!canSuicide())
|
||||
return
|
||||
if(confirm == "Yes")
|
||||
@@ -168,7 +168,7 @@
|
||||
|
||||
/mob/living/silicon/pai/verb/suicide()
|
||||
set hidden = TRUE
|
||||
var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No")
|
||||
var/confirm = tgui_alert(usr,"Are you sure you want to commit suicide?", "Confirm Suicide", list("Yes", "No"))
|
||||
if(confirm == "Yes")
|
||||
var/turf/T = get_turf(src.loc)
|
||||
T.visible_message("<span class='notice'>[src] flashes a message across its screen, \"Wiping core files. Please acquire a new personality to continue using pAI device functions.\"</span>", null, \
|
||||
@@ -185,7 +185,7 @@
|
||||
set hidden = TRUE
|
||||
if(!canSuicide())
|
||||
return
|
||||
var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No")
|
||||
var/confirm = tgui_alert(usr,"Are you sure you want to commit suicide?", "Confirm Suicide", list("Yes", "No"))
|
||||
if(!canSuicide())
|
||||
return
|
||||
if(confirm == "Yes")
|
||||
@@ -205,7 +205,7 @@
|
||||
set hidden = TRUE
|
||||
if(!canSuicide())
|
||||
return
|
||||
var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No")
|
||||
var/confirm = tgui_alert(usr,"Are you sure you want to commit suicide?", "Confirm Suicide", list("Yes", "No"))
|
||||
if(!canSuicide())
|
||||
return
|
||||
if(confirm == "Yes")
|
||||
|
||||
Reference in New Issue
Block a user