diff --git a/code/__HELPERS/hearted.dm b/code/__HELPERS/hearted.dm
index 860022a2a85..77aa9227780 100644
--- a/code/__HELPERS/hearted.dm
+++ b/code/__HELPERS/hearted.dm
@@ -33,7 +33,7 @@
/mob/proc/query_heart(attempt=1)
if(!mind || !client || attempt > 3)
return
- if(attempt == 1 && tgui_alert(src, "Was there another character you noticed being kind this round that you would like to anonymously thank?", "<3?", list("Yes", "No"), timeout = 30 SECONDS) != "Yes")
+ if(attempt == 1 && tgui_alert(usr, "Was there another character you noticed being kind this round that you would like to anonymously thank?", "<3?", list("Yes", "No"), timeout = 30 SECONDS) != "Yes")
return
var/heart_nominee
@@ -60,7 +60,7 @@
if(heart_contender == src)
continue
- switch(tgui_alert(src, "Is this the person: [heart_contender.real_name]?", "<3?", list("Yes!", "Nope", "Cancel"), timeout = 15 SECONDS))
+ switch(tgui_alert(usr, "Is this the person: [heart_contender.real_name]?", "<3?", list("Yes!", "Nope", "Cancel"), timeout = 15 SECONDS))
if("Yes!")
nominate_heart(heart_contender)
return
diff --git a/code/__HELPERS/text.dm b/code/__HELPERS/text.dm
index bb03ac3f587..a4c42c25691 100644
--- a/code/__HELPERS/text.dm
+++ b/code/__HELPERS/text.dm
@@ -46,11 +46,11 @@
///returns nothing with an alert instead of the message if it contains something in the ic filter, and sanitizes normally if the name is fine. It returns nothing so it backs out of the input the same way as if you had entered nothing.
/proc/sanitize_name(t,allow_numbers=FALSE)
if(CHAT_FILTER_CHECK(t))
- alert("You cannot set a name that contains a word prohibited in IC chat!")
+ tgui_alert(usr, "You cannot set a name that contains a word prohibited in IC chat!")
return ""
var/r = reject_bad_name(t,allow_numbers=allow_numbers,strict=TRUE)
if(!r)
- alert("Invalid name.")
+ tgui_alert(usr, "Invalid name.")
return ""
return sanitize(r)
diff --git a/code/controllers/subsystem/explosions.dm b/code/controllers/subsystem/explosions.dm
index 1354a4fabff..3cf506a9a26 100644
--- a/code/controllers/subsystem/explosions.dm
+++ b/code/controllers/subsystem/explosions.dm
@@ -84,7 +84,7 @@ SUBSYSTEM_DEF(explosions)
set name = "Check Bomb Impact"
set category = "Debug"
- var/newmode = alert("Use reactionary explosions?","Check Bomb Impact", "Yes", "No")
+ var/newmode = tgui_alert(usr, "Use reactionary explosions?","Check Bomb Impact", list("Yes", "No"))
var/turf/epicenter = get_turf(mob)
if(!epicenter)
return
@@ -93,7 +93,7 @@ SUBSYSTEM_DEF(explosions)
var/heavy = 0
var/light = 0
var/list/choices = list("Small Bomb","Medium Bomb","Big Bomb","Custom Bomb")
- var/choice = input("Bomb Size?") in choices
+ var/choice = tgui_input_list(usr, "Pick the bomb size", "Bomb Size?", choices)
switch(choice)
if(null)
return 0
diff --git a/code/controllers/subsystem/mapping.dm b/code/controllers/subsystem/mapping.dm
index c8807b4fb21..bd9f441c8f3 100644
--- a/code/controllers/subsystem/mapping.dm
+++ b/code/controllers/subsystem/mapping.dm
@@ -471,7 +471,7 @@ GLOBAL_LIST_EMPTY(the_station_areas)
if(!GLOB.the_gateway)
- if(alert("There's no home gateway on the station. You sure you want to continue ?", "Uh oh", "Yes", "No") != "Yes")
+ if(tgui_alert(usr, "There's no home gateway on the station. You sure you want to continue ?", "Uh oh", list("Yes", "No")) != "Yes")
return
var/list/possible_options = GLOB.potentialRandomZlevels + "Custom"
diff --git a/code/controllers/subsystem/shuttle.dm b/code/controllers/subsystem/shuttle.dm
index 02a3aa44f7f..b964200b343 100644
--- a/code/controllers/subsystem/shuttle.dm
+++ b/code/controllers/subsystem/shuttle.dm
@@ -953,7 +953,7 @@ SUBSYSTEM_DEF(shuttle)
SSblackbox.record_feedback("text", "shuttle_manipulator", 1, "[mdp.name]")
shuttle_loading = FALSE
if(emergency == mdp) //you just changed the emergency shuttle, there are events in game + captains that can change your snowflake choice.
- var/set_purchase = alert(usr, "Do you want to also disable shuttle purchases/random events that would change the shuttle?", "Butthurt Admin Prevention", "Yes, disable purchases/events", "No, I want to possibly get owned")
+ var/set_purchase = tgui_alert(usr, "Do you want to also disable shuttle purchases/random events that would change the shuttle?", "Butthurt Admin Prevention", list("Yes, disable purchases/events", "No, I want to possibly get owned"))
if(set_purchase == "Yes, disable purchases/events")
SSshuttle.shuttle_purchased = SHUTTLEPURCHASE_FORCED
diff --git a/code/datums/components/deadchat_control.dm b/code/datums/components/deadchat_control.dm
index bbbf0eeb939..03f8ba2592a 100644
--- a/code/datums/components/deadchat_control.dm
+++ b/code/datums/components/deadchat_control.dm
@@ -142,7 +142,7 @@
/// Async proc handling the alert input and associated logic for an admin removing this component via the VV dropdown.
/datum/component/deadchat_control/proc/async_handle_vv_topic(mob/user, list/href_list)
- if(alert(user, "Remove deadchat control from [parent]?", "Deadchat Plays [parent]", "Remove", "Cancel") == "Remove")
+ if(tgui_alert(user, "Remove deadchat control from [parent]?", "Deadchat Plays [parent]", list("Remove", "Cancel")) == "Remove")
// Quick sanity check as this is an async call.
if(QDELETED(src))
return
diff --git a/code/datums/components/storage/concrete/bag_of_holding.dm b/code/datums/components/storage/concrete/bag_of_holding.dm
index 65e45392961..984c83c963c 100644
--- a/code/datums/components/storage/concrete/bag_of_holding.dm
+++ b/code/datums/components/storage/concrete/bag_of_holding.dm
@@ -11,7 +11,7 @@
/datum/component/storage/concrete/bluespace/bag_of_holding/proc/recursive_insertion(obj/item/W, mob/living/user)
var/atom/A = parent
- var/safety = alert(user, "Doing this will have extremely dire consequences for the station and its crew. Be sure you know what you're doing.", "Put in [A.name]?", "Proceed", "Abort")
+ var/safety = tgui_alert(user, "Doing this will have extremely dire consequences for the station and its crew. Be sure you know what you're doing.", "Put in [A.name]?", list("Proceed", "Abort"))
if(safety != "Proceed" || QDELETED(A) || QDELETED(W) || QDELETED(user) || !user.canUseTopic(A, BE_CLOSE, iscarbon(user)))
return
var/turf/loccheck = get_turf(A)
diff --git a/code/game/atoms.dm b/code/game/atoms.dm
index c255ca562f5..f52d1a2d489 100644
--- a/code/game/atoms.dm
+++ b/code/game/atoms.dm
@@ -1217,7 +1217,7 @@
if(reagents)
var/chosen_id
- switch(alert(usr, "Choose a method.", "Add Reagents", "Search", "Choose from a list", "I'm feeling lucky"))
+ switch(tgui_alert(usr, "Choose a method.", "Add Reagents", list("Search", "Choose from a list", "I'm feeling lucky")))
if("Search")
var/valid_id
while(!valid_id)
@@ -1288,7 +1288,7 @@
if(href_list[VV_HK_AUTO_RENAME] && check_rights(R_VAREDIT))
var/newname = input(usr, "What do you want to rename this to?", "Automatic Rename") as null|text
// Check the new name against the chat filter. If it triggers the IC chat filter, give an option to confirm.
- if(newname && !(CHAT_FILTER_CHECK(newname) && alert(usr, "Your selected name contains words restricted by IC chat filters. Confirm this new name?", "IC Chat Filter Conflict", "Confirm", "Cancel") != "Confirm"))
+ if(newname && !(CHAT_FILTER_CHECK(newname) && tgui_alert(usr, "Your selected name contains words restricted by IC chat filters. Confirm this new name?", "IC Chat Filter Conflict", list("Confirm", "Cancel")) != "Confirm"))
vv_auto_rename(newname)
if(href_list[VV_HK_EDIT_FILTERS] && check_rights(R_VAREDIT))
diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm
index 53be1702134..af0203a10c6 100644
--- a/code/game/atoms_movable.dm
+++ b/code/game/atoms_movable.dm
@@ -1127,7 +1127,7 @@
return
if(href_list[VV_HK_DEADCHAT_PLAYS] && check_rights(R_FUN))
- if(alert(usr, "Allow deadchat to control [src] via chat commands?", "Deadchat Plays [src]", "Allow", "Cancel") == "Cancel")
+ if(tgui_alert(usr, "Allow deadchat to control [src] via chat commands?", "Deadchat Plays [src]", list("Allow", "Cancel")) == "Cancel")
return
// Alert is async, so quick sanity check to make sure we should still be doing this.
diff --git a/code/game/gamemodes/dynamic/dynamic.dm b/code/game/gamemodes/dynamic/dynamic.dm
index 94d15e97e00..461c11f48a3 100644
--- a/code/game/gamemodes/dynamic/dynamic.dm
+++ b/code/game/gamemodes/dynamic/dynamic.dm
@@ -308,7 +308,7 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1)
/datum/game_mode/dynamic/proc/show_threatlog(mob/admin)
if(!SSticker.HasRoundStarted())
- alert("The round hasn't started yet!")
+ tgui_alert(usr, "The round hasn't started yet!")
return
if(!check_rights(R_ADMIN))
diff --git a/code/game/machinery/computer/launchpad_control.dm b/code/game/machinery/computer/launchpad_control.dm
index e0456a2f171..58dd05b4b4f 100644
--- a/code/game/machinery/computer/launchpad_control.dm
+++ b/code/game/machinery/computer/launchpad_control.dm
@@ -116,7 +116,7 @@
return
current_pad.display_name = new_name
if("remove")
- if(usr && alert(usr, "Are you sure?", "Unlink Launchpad", "I'm Sure", "Abort") != "Abort")
+ if(usr && tgui_alert(usr, "Are you sure?", "Unlink Launchpad", list("I'm Sure", "Abort")) != "Abort")
launchpads -= current_pad
selected_id = null
. = TRUE
diff --git a/code/game/machinery/computer/mechlaunchpad.dm b/code/game/machinery/computer/mechlaunchpad.dm
index 7c03c97063d..0e5f850bfe7 100644
--- a/code/game/machinery/computer/mechlaunchpad.dm
+++ b/code/game/machinery/computer/mechlaunchpad.dm
@@ -154,7 +154,7 @@
return
current_pad.display_name = new_name
if("remove")
- if(usr && alert(usr, "Are you sure?", "Unlink Orbital Pad", "I'm Sure", "Abort") != "Abort")
+ if(usr && tgui_alert(usr, "Are you sure?", "Unlink Orbital Pad", list("I'm Sure", "Abort")) != "Abort")
mechpads -= current_pad
LAZYREMOVE(current_pad.consoles, src)
selected_id = null
diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm
index ae497ce5266..7511b317b4f 100644
--- a/code/game/machinery/computer/security.dm
+++ b/code/game/machinery/computer/security.dm
@@ -745,7 +745,7 @@ What a mess.*/
temp += "
"
temp += ""
else
- alert(usr, "You do not have the required rank to do this!")
+ tgui_alert(usr, "You do not have the required rank to do this!")
//TEMPORARY MENU FUNCTIONS
else//To properly clear as per clear screen.
temp=null
diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm
index 4016bb5cfce..759ff6b438a 100644
--- a/code/game/machinery/cryopod.dm
+++ b/code/game/machinery/cryopod.dm
@@ -299,9 +299,9 @@ GLOBAL_LIST_EMPTY(cryopod_computers)
var/datum/job/target_job = SSjob.GetJob(target.mind.assigned_role)
if(target_job && target_job.req_admin_notify)
- tgalert(target, "You're an important role! [AHELP_FIRST_MESSAGE]")
+ tgui_alert(target, "You're an important role! [AHELP_FIRST_MESSAGE]")
if(antag)
- tgalert(target, "You're \a [antag.name]! [AHELP_FIRST_MESSAGE]")
+ tgui_alert(target, "You're \a [antag.name]! [AHELP_FIRST_MESSAGE]")
if(!istype(target) || !can_interact(user) || !target.Adjacent(user) || !ismob(target) || isanimal(target) || !istype(user.loc, /turf) || target.buckled)
return
diff --git a/code/game/machinery/launch_pad.dm b/code/game/machinery/launch_pad.dm
index 85a5fb921ca..44e6a359ccb 100644
--- a/code/game/machinery/launch_pad.dm
+++ b/code/game/machinery/launch_pad.dm
@@ -380,7 +380,7 @@
pad.display_name = new_name
if("remove")
. = TRUE
- if(usr && alert(usr, "Are you sure?", "Unlink Launchpad", "I'm Sure", "Abort") != "Abort")
+ if(usr && tgui_alert(usr, "Are you sure?", "Unlink Launchpad", list("I'm Sure", "Abort")) != "Abort")
pad = null
if("launch")
sending = TRUE
diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm
index 2edb5b16746..58ce37261c2 100644
--- a/code/game/machinery/newscaster.dm
+++ b/code/game/machinery/newscaster.dm
@@ -564,7 +564,7 @@ GLOBAL_LIST_EMPTY(allCasters)
if(channel_name == "" || channel_name == "\[REDACTED\]" || scanned_user == "Unknown" || check || (scanned_user in existing_authors) )
screen=7
else
- var/choice = alert("Please confirm Feed channel creation","Network Channel Handler","Confirm","Cancel")
+ var/choice = tgui_alert(usr, "Please confirm Feed channel creation","Network Channel Handler", list("Confirm","Cancel"))
if(choice=="Confirm")
scan_user(usr)
GLOB.news_network.CreateFeedChannel(channel_name, scanned_user, c_locked)
@@ -634,7 +634,7 @@ GLOBAL_LIST_EMPTY(allCasters)
if(msg == "" || channel_name == "" || scanned_user == "Unknown")
screen = 16
else
- var/choice = alert("Please confirm Wanted Issue [(input_param==1) ? ("creation.") : ("edit.")]","Network Security Handler","Confirm","Cancel")
+ var/choice = tgui_alert(usr, "Please confirm Wanted Issue [(input_param==1) ? ("creation.") : ("edit.")]","Network Security Handler",list("Confirm","Cancel"))
if(choice=="Confirm")
scan_user(usr)
if(input_param==1) //If input_param == 1 we're submitting a new wanted issue. At 2 we're just editing an existing one.
@@ -642,16 +642,16 @@ GLOBAL_LIST_EMPTY(allCasters)
screen = 15
else
if(GLOB.news_network.wanted_issue.isAdminMsg)
- alert("The wanted issue has been distributed by a Nanotrasen higherup. You cannot edit it.","Ok")
+ tgui_alert(usr,"The wanted issue has been distributed by a Nanotrasen higherup. You cannot edit it.")
return
GLOB.news_network.submitWanted(channel_name, msg, scanned_user, picture)
screen = 19
updateUsrDialog()
else if(href_list["cancel_wanted"])
if(GLOB.news_network.wanted_issue.isAdminMsg)
- alert("The wanted issue has been distributed by a Nanotrasen higherup. You cannot take it down.","Ok")
+ tgui_alert(usr,"The wanted issue has been distributed by a Nanotrasen higherup. You cannot take it down.")
return
- var/choice = alert("Please confirm Wanted Issue removal","Network Security Handler","Confirm","Cancel")
+ var/choice = tgui_alert(usr,"Please confirm Wanted Issue removal","Network Security Handler",list("Confirm","Cancel"))
if(choice=="Confirm")
GLOB.news_network.deleteWanted()
screen=17
@@ -662,21 +662,21 @@ GLOBAL_LIST_EMPTY(allCasters)
else if(href_list["censor_channel_author"])
var/datum/newscaster/feed_channel/FC = locate(href_list["censor_channel_author"]) in GLOB.news_network.network_channels
if(FC.is_admin_channel)
- alert("This channel was created by a Nanotrasen Officer. You cannot censor it.","Ok")
+ tgui_alert(usr,"This channel was created by a Nanotrasen Officer. You cannot censor it.")
return
FC.toggleCensorAuthor()
updateUsrDialog()
else if(href_list["censor_channel_story_author"])
var/datum/newscaster/feed_message/MSG = locate(href_list["censor_channel_story_author"]) in viewing_channel.messages
if(MSG.is_admin_message)
- alert("This message was created by a Nanotrasen Officer. You cannot censor its author.","Ok")
+ tgui_alert(usr,"This message was created by a Nanotrasen Officer. You cannot censor its author.")
return
MSG.toggleCensorAuthor()
updateUsrDialog()
else if(href_list["censor_channel_story_body"])
var/datum/newscaster/feed_message/MSG = locate(href_list["censor_channel_story_body"]) in viewing_channel.messages
if(MSG.is_admin_message)
- alert("This channel was created by a Nanotrasen Officer. You cannot censor it.","Ok")
+ tgui_alert(usr,"This channel was created by a Nanotrasen Officer. You cannot censor it.")
return
MSG.toggleCensorBody()
updateUsrDialog()
@@ -688,7 +688,7 @@ GLOBAL_LIST_EMPTY(allCasters)
else if(href_list["toggle_d_notice"])
var/datum/newscaster/feed_channel/FC = locate(href_list["toggle_d_notice"]) in GLOB.news_network.network_channels
if(FC.is_admin_channel)
- alert("This channel was created by a Nanotrasen Officer. You cannot place a D-Notice upon it.","Ok")
+ tgui_alert(usr,"This channel was created by a Nanotrasen Officer. You cannot place a D-Notice upon it.")
return
FC.toggleCensorDclass()
updateUsrDialog()
diff --git a/code/game/machinery/syndicatebomb.dm b/code/game/machinery/syndicatebomb.dm
index 2c81d8d104a..e395b53578b 100644
--- a/code/game/machinery/syndicatebomb.dm
+++ b/code/game/machinery/syndicatebomb.dm
@@ -201,7 +201,7 @@
if(in_range(src, user) && isliving(user)) //No running off and setting bombs from across the station
timer_set = clamp(new_timer, minimum_timer, maximum_timer)
loc.visible_message("[icon2html(src, viewers(src))] timer set for [timer_set] seconds.")
- if(alert(user,"Would you like to start the countdown now?",,"Yes","No") == "Yes" && in_range(src, user) && isliving(user))
+ if(tgui_alert(user,"Would you like to start the countdown now?",,list("Yes","No")) == "Yes" && in_range(src, user) && isliving(user))
if(!active)
visible_message("[icon2html(src, viewers(loc))] [timer_set] seconds until detonation, please clear the area.")
activate()
diff --git a/code/game/objects/items/AI_modules.dm b/code/game/objects/items/AI_modules.dm
index 50ea296f126..aa2c02e02b0 100644
--- a/code/game/objects/items/AI_modules.dm
+++ b/code/game/objects/items/AI_modules.dm
@@ -235,7 +235,7 @@ AI MODULES
if(newpos == null)
return
if(newpos < 15)
- var/response = alert("Error: The law priority of [newpos] is invalid, Law priorities below 14 are reserved for core laws, Would you like to change that that to 15?", "Invalid law priority", "Change to 15", "Cancel")
+ var/response = tgui_alert(usr, "Error: The law priority of [newpos] is invalid, Law priorities below 14 are reserved for core laws, Would you like to change that that to 15?", "Invalid law priority", list("Change to 15", "Cancel"))
if (!response || response == "Cancel")
return
newpos = 15
diff --git a/code/game/objects/items/cards_ids.dm b/code/game/objects/items/cards_ids.dm
index ce387343936..9da3a679365 100644
--- a/code/game/objects/items/cards_ids.dm
+++ b/code/game/objects/items/cards_ids.dm
@@ -1159,7 +1159,7 @@
/obj/item/card/id/advanced/chameleon/attack_self(mob/user)
if(isliving(user) && user.mind)
- var/popup_input = alert(user, "Choose Action", "Agent ID", "Show", "Forge/Reset", "Change Account ID")
+ var/popup_input = tgui_alert(user, "Choose Action", "Agent ID", list("Show", "Forge/Reset", "Change Account ID"))
if(user.incapacitated())
return
if(!user.is_holding(src))
@@ -1179,7 +1179,7 @@
registered_name = input_name
- var/change_trim = alert(user, "Adjust the appearance of your card's trim?", "Modify Trim", "Yes", "No")
+ var/change_trim = tgui_alert(user, "Adjust the appearance of your card's trim?", "Modify Trim", list("Yes", "No"))
if(change_trim == "Yes")
var/list/blacklist = typecacheof(type) + typecacheof(/obj/item/card/id/advanced/simple_bot)
var/list/trim_list = list()
diff --git a/code/game/objects/items/crab17.dm b/code/game/objects/items/crab17.dm
index d57cf15d188..0928d34afe6 100644
--- a/code/game/objects/items/crab17.dm
+++ b/code/game/objects/items/crab17.dm
@@ -15,7 +15,7 @@
if(dumped)
to_chat(user, "You already activated Protocol CRAB-17.")
return FALSE
- if(alert(user, "Are you sure you want to crash this market with no survivors?", "Protocol CRAB-17", "Yes", "No") == "Yes")
+ if(tgui_alert(user, "Are you sure you want to crash this market with no survivors?", "Protocol CRAB-17", list("Yes", "No")) == "Yes")
if(dumped || QDELETED(src)) //Prevents fuckers from cheesing alert
return FALSE
var/turf/targetturf = get_safe_random_station_turf()
diff --git a/code/game/objects/items/devices/aicard.dm b/code/game/objects/items/devices/aicard.dm
index 29f174134e6..7a648e43e26 100644
--- a/code/game/objects/items/devices/aicard.dm
+++ b/code/game/objects/items/devices/aicard.dm
@@ -87,7 +87,7 @@
if(flush)
flush = FALSE
else
- var/confirm = alert("Are you sure you want to wipe this card's memory?", name, "Yes", "No")
+ var/confirm = tgui_alert(usr, "Are you sure you want to wipe this card's memory?", name, list("Yes", "No"))
if(confirm == "Yes" && !..())
flush = TRUE
if(AI && AI.loc == src)
diff --git a/code/game/objects/items/devices/paicard.dm b/code/game/objects/items/devices/paicard.dm
index 2c812bbd64b..bf567a158de 100644
--- a/code/game/objects/items/devices/paicard.dm
+++ b/code/game/objects/items/devices/paicard.dm
@@ -107,7 +107,7 @@
to_chat(pai, "You have been bound to a new master.")
pai.emittersemicd = FALSE
if(href_list["wipe"])
- var/confirm = input("Are you CERTAIN you wish to delete the current personality? This action cannot be undone.", "Personality Wipe") in list("Yes", "No")
+ var/confirm = tgui_alert(usr, "Are you CERTAIN you wish to delete the current personality? This action cannot be undone.", "Personality Wipe", list("Yes", "No"))
if(confirm == "Yes")
if(pai)
to_chat(pai, "You feel yourself slipping away from reality.")
diff --git a/code/game/objects/items/devices/pipe_painter.dm b/code/game/objects/items/devices/pipe_painter.dm
index 82ee393c771..a4d4432d260 100644
--- a/code/game/objects/items/devices/pipe_painter.dm
+++ b/code/game/objects/items/devices/pipe_painter.dm
@@ -24,7 +24,7 @@
user.visible_message("[user] paints \the [P] [paint_color].","You paint \the [P] [paint_color].")
/obj/item/pipe_painter/attack_self(mob/user)
- paint_color = input("Which colour do you want to use?","Pipe painter") in GLOB.pipe_paint_colors
+ paint_color = tgui_input_list(usr, "Which colour do you want to use?","Pipe painter",GLOB.pipe_paint_colors)
/obj/item/pipe_painter/examine(mob/user)
. = ..()
diff --git a/code/game/objects/items/implants/implant_explosive.dm b/code/game/objects/items/implants/implant_explosive.dm
index c854193b042..1578cc90b09 100644
--- a/code/game/objects/items/implants/implant_explosive.dm
+++ b/code/game/objects/items/implants/implant_explosive.dm
@@ -38,7 +38,7 @@
return 0
if(cause == "action_button" && !popup)
popup = TRUE
- var/response = alert(imp_in, "Are you sure you want to activate your [name]? This will cause you to explode!", "[name] Confirmation", "Yes", "No")
+ var/response = tgui_alert(imp_in, "Are you sure you want to activate your [name]? This will cause you to explode!", "[name] Confirmation", list("Yes", "No"))
popup = FALSE
if(response == "No")
return 0
diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm
index fc3df6bb3b3..b68fba6d1cb 100644
--- a/code/game/objects/objs.dm
+++ b/code/game/objects/objs.dm
@@ -280,14 +280,14 @@
message_admins("[key_name_admin(usr)] modified the armor on [src] ([type]) to melee: [armor.melee], bullet: [armor.bullet], laser: [armor.laser], energy: [armor.energy], bomb: [armor.bomb], bio: [armor.bio], rad: [armor.rad], fire: [armor.fire], acid: [armor.acid]")
if(href_list[VV_HK_MASS_DEL_TYPE])
if(check_rights(R_DEBUG|R_SERVER))
- var/action_type = alert("Strict type ([type]) or type and all subtypes?",,"Strict type","Type and subtypes","Cancel")
+ var/action_type = tgui_alert(usr, "Strict type ([type]) or type and all subtypes?",,list("Strict type","Type and subtypes","Cancel"))
if(action_type == "Cancel" || !action_type)
return
- if(alert("Are you really sure you want to delete all objects of type [type]?",,"Yes","No") != "Yes")
+ if(tgui_alert(usr, "Are you really sure you want to delete all objects of type [type]?",,list("Yes","No")) != "Yes")
return
- if(alert("Second confirmation required. Delete?",,"Yes","No") != "Yes")
+ if(tgui_alert(usr, "Second confirmation required. Delete?",,list("Yes","No")) != "Yes")
return
var/O_type = type
diff --git a/code/game/objects/structures/ghost_role_spawners.dm b/code/game/objects/structures/ghost_role_spawners.dm
index f2715d1b956..9da7f801e5a 100644
--- a/code/game/objects/structures/ghost_role_spawners.dm
+++ b/code/game/objects/structures/ghost_role_spawners.dm
@@ -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("[user.name] climbs back into cryosleep...")
diff --git a/code/game/objects/structures/mirror.dm b/code/game/objects/structures/mirror.dm
index ffd542217d5..bb70ae55e9b 100644
--- a/code/game/objects/structures/mirror.dm
+++ b/code/game/objects/structures/mirror.dm
@@ -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?
diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm
index ce8153099d0..65a477cb2f1 100644
--- a/code/modules/admin/admin.dm
+++ b/code/modules/admin/admin.dm
@@ -461,7 +461,7 @@
options += "Server Restart (Kill and restart DD)";
if(SSticker.admin_delay_notice)
- if(alert(usr, "Are you sure? An admin has already delayed the round end for the following reason: [SSticker.admin_delay_notice]", "Confirmation", "Yes", "No") != "Yes")
+ if(tgui_alert(usr, "Are you sure? An admin has already delayed the round end for the following reason: [SSticker.admin_delay_notice]", "Confirmation", list("Yes", "No")) != "Yes")
return FALSE
var/result = input(usr, "Select reboot method", "World Reboot", options[1]) as null|anything in options
@@ -471,7 +471,7 @@
switch(result)
if("Regular Restart")
if(!(isnull(usr.client.address) || (usr.client.address in localhost_addresses)))
- if(alert("Are you sure you want to restart the server?","This server is live","Restart","Cancel") != "Restart")
+ if(tgui_alert(usr, "Are you sure you want to restart the server?","This server is live",list("Restart","Cancel")) != "Restart")
return FALSE
SSticker.Reboot(init_by, "admin reboot - by [usr.key] [usr.client.holder.fakekey ? "(stealth)" : ""]", 10)
if("Regular Restart (with delay)")
@@ -479,7 +479,7 @@
if(!delay)
return FALSE
if(!(isnull(usr.client.address) || (usr.client.address in localhost_addresses)))
- if(alert("Are you sure you want to restart the server?","This server is live","Restart","Cancel") != "Restart")
+ if(tgui_alert(usr,"Are you sure you want to restart the server?","This server is live",list("Restart","Cancel")) != "Restart")
return FALSE
SSticker.Reboot(init_by, "admin reboot - by [usr.key] [usr.client.holder.fakekey ? "(stealth)" : ""]", delay * 10)
if("Hard Restart (No Delay, No Feeback Reason)")
@@ -499,7 +499,7 @@
if (!usr.client.holder)
return
- var/confirm = alert("End the round and restart the game world?", "End Round", "Yes", "Cancel")
+ var/confirm = tgui_alert(usr, "End the round and restart the game world?", "End Round", list("Yes", "Cancel"))
if(confirm == "Cancel")
return
if(confirm == "Yes")
@@ -572,7 +572,7 @@
if(!SSticker.start_immediately)
var/localhost_addresses = list("127.0.0.1", "::1")
if(!(isnull(usr.client.address) || (usr.client.address in localhost_addresses)))
- if(alert("Are you sure you want to start the round?","Start Now","Start Now","Cancel") != "Start Now")
+ if(tgui_alert(usr, "Are you sure you want to start the round?","Start Now",list("Start Now","Cancel")) != "Start Now")
return FALSE
SSticker.start_immediately = TRUE
log_admin("[usr.key] has started the game.")
@@ -643,7 +643,7 @@
var/newtime = input("Set a new time in seconds. Set -1 for indefinite delay.","Set Delay",round(SSticker.GetTimeLeft()/10)) as num|null
if(SSticker.current_state > GAME_STATE_PREGAME)
- return alert("Too late... The game has already started!")
+ return tgui_alert(usr, "Too late... The game has already started!")
if(newtime)
newtime = newtime*10
SSticker.SetTimeLeft(newtime)
@@ -665,7 +665,7 @@
message_admins("[key_name_admin(usr)] has unprisoned [key_name_admin(M)]")
log_admin("[key_name(usr)] has unprisoned [key_name(M)]")
else
- alert("[M.name] is not prisoned.")
+ tgui_alert(usr,"[M.name] is not prisoned.")
SSblackbox.record_feedback("tally", "admin_verb", 1, "Unprison") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
////////////////////////////////////////////////////////////////////////////////////////////////ADMIN HELPER PROCS
@@ -832,7 +832,7 @@
var/count = 0
if(!SSjob.initialized)
- alert(usr, "You cannot manage jobs before the job subsystem is initialized!")
+ tgui_alert(usr, "You cannot manage jobs before the job subsystem is initialized!")
return
dat += "
"
@@ -931,7 +931,7 @@
question = "This mob already has a user ([tomob.key]) in control of it! "
question += "Are you sure you want to place [frommob.name]([frommob.key]) in control of [tomob.name]?"
- var/ask = alert(question, "Place ghost in control of mob?", "Yes", "No")
+ var/ask = tgui_alert(usr, question, "Place ghost in control of mob?", list("Yes", "No"))
if (ask != "Yes")
return TRUE
diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm
index ebb8cbf9d88..7d204eb632c 100644
--- a/code/modules/admin/admin_verbs.dm
+++ b/code/modules/admin/admin_verbs.dm
@@ -509,7 +509,7 @@ GLOBAL_PROTECT(admin_verbs_hideable)
if(range_flash == null)
return
if(range_devastation > GLOB.MAX_EX_DEVESTATION_RANGE || range_heavy > GLOB.MAX_EX_HEAVY_RANGE || range_light > GLOB.MAX_EX_LIGHT_RANGE || range_flash > GLOB.MAX_EX_FLASH_RANGE)
- if(alert("Bomb is bigger than the maxcap. Continue?",,"Yes","No") != "Yes")
+ if(tgui_alert(usr, "Bomb is bigger than the maxcap. Continue?",,list("Yes","No")) != "Yes")
return
epicenter = mob.loc //We need to reupdate as they may have moved again
explosion(epicenter, devastation_range = range_devastation, heavy_impact_range = range_heavy, light_impact_range = range_light, flash_range = range_flash, adminlog = TRUE, ignorecap = TRUE)
@@ -626,7 +626,7 @@ GLOBAL_PROTECT(admin_verbs_hideable)
if(!spell_desc)
return
- var/robeless = (alert(usr, "Would you like to force this spell to be robeless?", "Robeless Casting?", "Force Robeless", "Use Spell Setting") == "Force Robeless")
+ var/robeless = (tgui_alert(usr, "Would you like to force this spell to be robeless?", "Robeless Casting?", list("Force Robeless", "Use Spell Setting")) == "Force Robeless")
if(QDELETED(spell_recipient))
to_chat(usr, "The intended spell recipient no longer exists.")
diff --git a/code/modules/admin/antag_panel.dm b/code/modules/admin/antag_panel.dm
index b0b78c791cb..b784ce7468c 100644
--- a/code/modules/admin/antag_panel.dm
+++ b/code/modules/admin/antag_panel.dm
@@ -91,10 +91,10 @@ GLOBAL_VAR(antag_prototypes)
/datum/mind/proc/traitor_panel()
if(!SSticker.HasRoundStarted())
- alert("Not before round-start!", "Alert")
+ tgui_alert(usr, "Not before round-start!", "Alert")
return
if(QDELETED(src))
- alert("This mind doesn't have a mob, or is deleted! For some reason!", "Edit Memory")
+ tgui_alert(usr, "This mind doesn't have a mob, or is deleted! For some reason!", "Edit Memory")
return
var/out = "[name][(current && (current.real_name!=name))?" (as [current.real_name])":""] "
diff --git a/code/modules/admin/callproc/callproc.dm b/code/modules/admin/callproc/callproc.dm
index b58e1f50b5b..e4cfb280e21 100644
--- a/code/modules/admin/callproc/callproc.dm
+++ b/code/modules/admin/callproc/callproc.dm
@@ -12,7 +12,7 @@
var/targetselected = FALSE
var/returnval
- switch(alert("Proc owned by something?",,"Yes","No"))
+ switch(tgui_alert(usr,"Proc owned by something?",,list("Yes","No")))
if("Yes")
targetselected = TRUE
var/list/value = vv_get_value(default_class = VV_ATOM_REFERENCE, classes = list(VV_ATOM_REFERENCE, VV_DATUM_REFERENCE, VV_MOB_REFERENCE, VV_CLIENT, VV_MARKED_DATUM, VV_TEXT_LOCATE, VV_PROCCALL_RETVAL))
diff --git a/code/modules/admin/check_antagonists.dm b/code/modules/admin/check_antagonists.dm
index a0363e4cfdf..05a6c244094 100644
--- a/code/modules/admin/check_antagonists.dm
+++ b/code/modules/admin/check_antagonists.dm
@@ -134,7 +134,7 @@
/datum/admins/proc/check_antagonists()
if(!SSticker.HasRoundStarted())
- alert("The game hasn't started yet!")
+ tgui_alert(usr, "The game hasn't started yet!")
return
var/list/dat = list("Round Status
Round Status
")
if(SSticker.mode.replacementmode)
diff --git a/code/modules/admin/outfit_editor.dm b/code/modules/admin/outfit_editor.dm
index 9a99d8b20ee..a144b37779b 100644
--- a/code/modules/admin/outfit_editor.dm
+++ b/code/modules/admin/outfit_editor.dm
@@ -117,11 +117,11 @@
if(!choice)
return
if(!ispath(choice))
- alert(owner, "Invalid item", OUTFIT_EDITOR_NAME, "oh no")
+ tgui_alert(owner, "Invalid item", OUTFIT_EDITOR_NAME, list("oh no"))
return
if(initial(choice.icon_state) == null) //hacky check copied from experimentor code
var/msg = "Warning: This item's icon_state is null, indicating it is very probably not actually a usable item."
- if(alert(owner, msg, OUTFIT_EDITOR_NAME, "Use it anyway", "Cancel") != "Use it anyway")
+ if(tgui_alert(owner, msg, OUTFIT_EDITOR_NAME, list("Use it anyway", "Cancel")) != "Use it anyway")
return
if(drip.vars.Find(slot))
diff --git a/code/modules/admin/permissionedit.dm b/code/modules/admin/permissionedit.dm
index 56f4f693886..83dfb8a6999 100644
--- a/code/modules/admin/permissionedit.dm
+++ b/code/modules/admin/permissionedit.dm
@@ -167,7 +167,7 @@
to_chat(usr, "Unable to connect to database, changes are temporary only.", confidential = TRUE)
use_db = FALSE
else
- use_db = alert("Permanent changes are saved to the database for future rounds, temporary changes will affect only the current round", "Permanent or Temporary?", "Permanent", "Temporary", "Cancel")
+ use_db = tgui_alert(usr,"Permanent changes are saved to the database for future rounds, temporary changes will affect only the current round", "Permanent or Temporary?", list("Permanent", "Temporary", "Cancel"))
if(use_db == "Cancel")
return
if(use_db == "Permanent")
@@ -249,7 +249,7 @@
qdel(query_add_admin_log)
/datum/admins/proc/remove_admin(admin_ckey, admin_key, use_db, datum/admins/D)
- if(alert("Are you sure you want to remove [admin_ckey]?","Confirm Removal","Do it","Cancel") == "Do it")
+ if(tgui_alert(usr,"Are you sure you want to remove [admin_ckey]?","Confirm Removal",list("Do it","Cancel")) == "Do it")
GLOB.admin_datums -= admin_ckey
GLOB.deadmins -= admin_ckey
if(D)
@@ -494,7 +494,7 @@
to_chat(usr, "Error: Rank deletion attempted while rank still used; Tell a coder, this shouldn't happen.", confidential = TRUE)
return
qdel(query_admins_with_rank)
- if(alert("Are you sure you want to remove [admin_rank]?","Confirm Removal","Do it","Cancel") == "Do it")
+ if(tgui_alert(usr,"Are you sure you want to remove [admin_rank]?","Confirm Removal",list("Do it","Cancel")) == "Do it")
var/m1 = "[key_name_admin(usr)] removed rank [admin_rank] permanently"
var/m2 = "[key_name(usr)] removed rank [admin_rank] permanently"
var/datum/db_query/query_add_rank = SSdbcore.NewQuery(
diff --git a/code/modules/admin/smites/bad_luck.dm b/code/modules/admin/smites/bad_luck.dm
index b8bac94b1ca..083b5015a95 100644
--- a/code/modules/admin/smites/bad_luck.dm
+++ b/code/modules/admin/smites/bad_luck.dm
@@ -9,8 +9,8 @@
var/permanent
/datum/smite/bad_luck/configure(client/user)
- silent = alert(user, "Do you want to apply the omen with a player notification?", "Notify Player?", "Notify", "Silent") == "Silent"
- permanent = alert(user, "Would you like this to be permanent or removed automatically after the first accident?", "Permanent?", "Permanent", "Temporary") == "Permanent"
+ silent = tgui_alert(user, "Do you want to apply the omen with a player notification?", "Notify Player?", list("Notify", "Silent")) == "Silent"
+ permanent = tgui_alert(user, "Would you like this to be permanent or removed automatically after the first accident?", "Permanent?", list("Permanent", "Temporary")) == "Permanent"
/datum/smite/bad_luck/effect(client/user, mob/living/target)
. = ..()
diff --git a/code/modules/admin/smites/rod.dm b/code/modules/admin/smites/rod.dm
index 4797b3ab97e..8598258e36b 100644
--- a/code/modules/admin/smites/rod.dm
+++ b/code/modules/admin/smites/rod.dm
@@ -4,7 +4,7 @@
var/force_looping = FALSE
/datum/smite/rod/configure(client/user)
- var/loop_input = alert("Would you like this rod to force-loop across space z-levels?", "Loopy McLoopface", "Yes", "No")
+ var/loop_input = tgui_alert(usr,"Would you like this rod to force-loop across space z-levels?", "Loopy McLoopface", list("Yes", "No"))
force_looping = (loop_input == "Yes")
diff --git a/code/modules/admin/smites/supply_pod_quick.dm b/code/modules/admin/smites/supply_pod_quick.dm
index 45b1e0acbb2..6012e84ccac 100644
--- a/code/modules/admin/smites/supply_pod_quick.dm
+++ b/code/modules/admin/smites/supply_pod_quick.dm
@@ -28,7 +28,7 @@
if(!ispath(delivery))
delivery = pick_closest_path(attempted_target_path)
if(!delivery)
- alert(user, "ERROR: Incorrect / improper path given.")
+ tgui_alert(user, "ERROR: Incorrect / improper path given.")
return FALSE
target_path = delivery
diff --git a/code/modules/admin/sql_ban_system.dm b/code/modules/admin/sql_ban_system.dm
index 1f0f94f5257..c6a253ae6e9 100644
--- a/code/modules/admin/sql_ban_system.dm
+++ b/code/modules/admin/sql_ban_system.dm
@@ -473,11 +473,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)
@@ -733,7 +733,7 @@
to_chat(usr, "Failed to establish database connection.", 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)
@@ -793,11 +793,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)
diff --git a/code/modules/admin/sql_message_system.dm b/code/modules/admin/sql_message_system.dm
index 9476837d733..f5ef2e89b02 100644
--- a/code/modules/admin/sql_message_system.dm
+++ b/code/modules/admin/sql_message_system.dm
@@ -18,7 +18,7 @@
qdel(query_find_ckey)
return
if(!query_find_ckey.NextRow())
- if(alert(usr, "[new_key]/([new_ckey]) has not been seen before, are you sure you want to create a [type] for them?", "Unknown ckey", "Yes", "No", "Cancel") != "Yes")
+ if(tgui_alert(usr, "[new_key]/([new_ckey]) has not been seen before, are you sure you want to create a [type] for them?", "Unknown ckey", list("Yes", "No", "Cancel")) != "Yes")
qdel(query_find_ckey)
return
qdel(query_find_ckey)
@@ -45,7 +45,7 @@
if (ssqlname)
server = ssqlname
if(isnull(secret))
- switch(alert("Hide note from being viewed by players?", "Secret note?","Yes","No","Cancel"))
+ switch(tgui_alert(usr,"Hide note from being viewed by players?", "Secret note?",list("Yes","No","Cancel")))
if("Yes")
secret = 1
if("No")
@@ -53,7 +53,7 @@
else
return
if(isnull(expiry))
- if(alert(usr, "Set an expiry time? Expired messages are hidden like deleted ones.", "Expiry time?", "Yes", "No", "Cancel") == "Yes")
+ if(tgui_alert(usr, "Set an expiry time? Expired messages are hidden like deleted ones.", "Expiry time?", list("Yes", "No", "Cancel")) == "Yes")
var/expire_time = input("Set expiry time for [type] as format YYYY-MM-DD HH:MM:SS. All times in server time. HH:MM:SS is optional and 24-hour. Must be later than current time for obvious reasons.", "Set expiry time", SQLtime()) as null|text
if(!expire_time)
return
diff --git a/code/modules/admin/stickyban.dm b/code/modules/admin/stickyban.dm
index daeec4cfbcf..065e7e3edfb 100644
--- a/code/modules/admin/stickyban.dm
+++ b/code/modules/admin/stickyban.dm
@@ -61,7 +61,7 @@
if (!ban)
to_chat(usr, "Error: No sticky ban for [ckey] found!", confidential = TRUE)
return
- if (alert("Are you sure you want to remove the sticky ban on [ckey]?","Are you sure","Yes","No") == "No")
+ if (tgui_alert(usr,"Are you sure you want to remove the sticky ban on [ckey]?","Are you sure",list("Yes","No")) == "No")
return
if (!get_stickyban_from_ckey(ckey))
to_chat(usr, "Error: The ban disappeared.", confidential = TRUE)
@@ -98,7 +98,7 @@
to_chat(usr, "Error: [alt] is not linked to [ckey]'s sticky ban!", confidential = TRUE)
return
- if (alert("Are you sure you want to disassociate [alt] from [ckey]'s sticky ban? \nNote: Nothing stops byond from re-linking them, Use \[E] to exempt them","Are you sure","Yes","No") == "No")
+ if (tgui_alert(usr,"Are you sure you want to disassociate [alt] from [ckey]'s sticky ban? \nNote: Nothing stops byond from re-linking them, Use \[E] to exempt them","Are you sure",list("Yes","No")) == "No")
return
//we have to do this again incase something changes
@@ -180,7 +180,7 @@
to_chat(usr, "Error: [alt] is not linked to [ckey]'s sticky ban!", confidential = TRUE)
return
- if (alert("Are you sure you want to exempt [alt] from [ckey]'s sticky ban?","Are you sure","Yes","No") == "No")
+ if (tgui_alert(usr,"Are you sure you want to exempt [alt] from [ckey]'s sticky ban?","Are you sure",list("Yes","No")) == "No")
return
//we have to do this again incase something changes
@@ -230,7 +230,7 @@
to_chat(usr, "Error: [alt] is not exempt from [ckey]'s sticky ban!", confidential = TRUE)
return
- if (alert("Are you sure you want to unexempt [alt] from [ckey]'s sticky ban?","Are you sure","Yes","No") == "No")
+ if (tgui_alert(usr,"Are you sure you want to unexempt [alt] from [ckey]'s sticky ban?","Are you sure",list("Yes","No")) == "No")
return
//we have to do this again incase something changes
@@ -272,7 +272,7 @@
var/ckey = data["ckey"]
- if (alert("Are you sure you want to put [ckey]'s stickyban on timeout until next round (or removed)?","Are you sure","Yes","No") == "No")
+ if (tgui_alert(usr,"Are you sure you want to put [ckey]'s stickyban on timeout until next round (or removed)?","Are you sure",list("Yes","No")) == "No")
return
var/ban = get_stickyban_from_ckey(ckey)
if (!ban)
@@ -298,7 +298,7 @@
return
var/ckey = data["ckey"]
- if (alert("Are you sure you want to lift the timeout on [ckey]'s stickyban?","Are you sure","Yes","No") == "No")
+ if (tgui_alert(usr,"Are you sure you want to lift the timeout on [ckey]'s stickyban?","Are you sure",list("Yes","No")) == "No")
return
var/ban = get_stickyban_from_ckey(ckey)
@@ -323,7 +323,7 @@
if (!data["ckey"])
return
var/ckey = data["ckey"]
- if (alert("Are you sure you want to revert the sticky ban on [ckey] to its state at round start (or last edit)?","Are you sure","Yes","No") == "No")
+ if (tgui_alert(usr,"Are you sure you want to revert the sticky ban on [ckey] to its state at round start (or last edit)?","Are you sure",list("Yes","No")) == "No")
return
var/ban = get_stickyban_from_ckey(ckey)
if (!ban)
diff --git a/code/modules/admin/team_panel.dm b/code/modules/admin/team_panel.dm
index 75abbb5391c..b2a21b6f23f 100644
--- a/code/modules/admin/team_panel.dm
+++ b/code/modules/admin/team_panel.dm
@@ -24,7 +24,7 @@
/datum/admins/proc/check_teams()
if(!SSticker.HasRoundStarted())
- alert("The game hasn't started yet!")
+ tgui_alert(usr,"The game hasn't started yet!")
return
var/datum/browser/popup = new(usr, "teams", "Team Listing", 500, 500)
diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm
index 6e3d10969ad..27fd52a20a1 100644
--- a/code/modules/admin/topic.dm
+++ b/code/modules/admin/topic.dm
@@ -56,7 +56,7 @@
var/datum/round_event/event = E.runEvent()
if(event.announceWhen>0)
event.processing = FALSE
- var/prompt = alert(usr, "Would you like to alert the crew?", "Alert", "Yes", "No", "Cancel")
+ var/prompt = tgui_alert(usr, "Would you like to alert the crew?", "Alert", list("Yes", "No", "Cancel"))
switch(prompt)
if("Yes")
event.announceChance = 100
@@ -225,7 +225,7 @@
if(isnull(SSticker.admin_delay_notice))
return
else
- if(alert(usr, "Really cancel current round end delay? The reason for the current delay is: \"[SSticker.admin_delay_notice]\"", "Undelay round end", "Yes", "No") != "Yes")
+ if(tgui_alert(usr, "Really cancel current round end delay? The reason for the current delay is: \"[SSticker.admin_delay_notice]\"", "Undelay round end", list("Yes", "No")) != "Yes")
return
SSticker.admin_delay_notice = null
SSticker.delay_end = !SSticker.delay_end
@@ -241,8 +241,8 @@
return
message_admins("[key_name_admin(usr)] is considering ending the round.")
- if(alert(usr, "This will end the round, are you SURE you want to do this?", "Confirmation", "Yes", "No") == "Yes")
- if(alert(usr, "Final Confirmation: End the round NOW?", "Confirmation", "Yes", "No") == "Yes")
+ if(tgui_alert(usr, "This will end the round, are you SURE you want to do this?", "Confirmation", list("Yes", "No")) == "Yes")
+ if(tgui_alert(usr, "Final Confirmation: End the round NOW?", "Confirmation", list("Yes", "No")) == "Yes")
message_admins("[key_name_admin(usr)] has ended the round.")
SSticker.force_ending = 1 //Yeah there we go APC destroyed mission accomplished
return
@@ -262,7 +262,7 @@
var/delmob = TRUE
if(!isobserver(M))
- switch(alert("Delete old mob?","Message","Yes","No","Cancel"))
+ switch(tgui_alert(usr,"Delete old mob?","Message",list("Yes","No","Cancel")))
if("Cancel")
return
if("No")
@@ -337,7 +337,7 @@
if(!check_if_greater_rights_than(M.client))
to_chat(usr, "Error: They have more rights than you do.", confidential = TRUE)
return
- if(alert(usr, "Kick [key_name(M)]?", "Confirm", "Yes", "No") != "Yes")
+ if(tgui_alert(usr, "Kick [key_name(M)]?", "Confirm", list("Yes", "No")) != "Yes")
return
if(!M)
to_chat(usr, "Error: [M] no longer exists!", confidential = TRUE)
@@ -391,7 +391,7 @@
else if(href_list["deletemessage"])
if(!check_rights(R_ADMIN))
return
- var/safety = alert("Delete message/note?",,"Yes","No");
+ var/safety = tgui_alert(usr,"Delete message/note?",,list("Yes","No"));
if (safety == "Yes")
var/message_id = href_list["deletemessage"]
delete_message(message_id)
@@ -399,7 +399,7 @@
else if(href_list["deletemessageempty"])
if(!check_rights(R_ADMIN))
return
- var/safety = alert("Delete message/note?",,"Yes","No");
+ var/safety = tgui_alert(usr,"Delete message/note?",,list("Yes","No"));
if (safety == "Yes")
var/message_id = href_list["deletemessageempty"]
delete_message(message_id, browse = TRUE)
@@ -514,9 +514,9 @@
if(!check_rights(R_ADMIN))
return
if(SSticker?.mode)
- return alert(usr, "The game has already started.", null, null, null, null)
+ return tgui_alert(usr, "The game has already started.")
if(!SSticker.is_mode("dynamic"))
- return alert(usr, "The game mode has to be dynamic mode.", null, null, null, null)
+ return tgui_alert(usr, "The game mode has to be dynamic mode.")
var/roundstart_rules = list()
for (var/rule in subtypesof(/datum/dynamic_ruleset/roundstart))
var/datum/dynamic_ruleset/roundstart/newrule = new rule()
@@ -550,9 +550,9 @@
return
if(SSticker?.mode)
- return alert(usr, "The game has already started.", null, null, null, null)
+ return tgui_alert(usr, "The game has already started.")
if(!SSticker.is_mode("dynamic"))
- return alert(usr, "The game mode has to be dynamic mode!", null, null, null, null)
+ return tgui_alert(usr, "The game mode has to be dynamic mode!")
dynamic_mode_options(usr)
else if(href_list["f_dynamic_force_extended"])
@@ -560,7 +560,7 @@
return
if(!SSticker.is_mode("dynamic"))
- return alert(usr, "The game mode has to be dynamic mode!", null, null, null, null)
+ return tgui_alert(usr, "The game mode has to be dynamic mode!")
GLOB.dynamic_forced_extended = !GLOB.dynamic_forced_extended
log_admin("[key_name(usr)] set 'forced_extended' to [GLOB.dynamic_forced_extended].")
@@ -572,7 +572,7 @@
return
if(!SSticker.is_mode("dynamic"))
- return alert(usr, "The game mode has to be dynamic mode!", null, null, null, null)
+ return tgui_alert(usr, "The game mode has to be dynamic mode!")
GLOB.dynamic_no_stacking = !GLOB.dynamic_no_stacking
log_admin("[key_name(usr)] set 'no_stacking' to [GLOB.dynamic_no_stacking].")
@@ -583,7 +583,7 @@
return
if(!SSticker.is_mode("dynamic"))
- return alert(usr, "The game mode has to be dynamic mode!", null, null, null, null)
+ return tgui_alert(usr, "The game mode has to be dynamic mode!")
GLOB.dynamic_stacking_limit = input(usr,"Change the threat limit at which round-endings rulesets will start to stack.", "Change stacking limit", null) as num
log_admin("[key_name(usr)] set 'stacking_limit' to [GLOB.dynamic_stacking_limit].")
@@ -595,14 +595,14 @@
return
if(SSticker?.mode)
- return alert(usr, "The game has already started.", null, null, null, null)
+ return tgui_alert(usr, "The game has already started.")
if(!SSticker.is_mode("dynamic"))
- return alert(usr, "The game mode has to be dynamic mode!", null, null, null, null)
+ return tgui_alert(usr, "The game mode has to be dynamic mode!")
var/new_value = input(usr, "Enter the forced threat level for dynamic mode.", "Forced threat level") as num
if (new_value > 100)
- return alert(usr, "The value must be be under 100.", null, null, null, null)
+ return tgui_alert(usr, "The value must be be under 100.")
GLOB.dynamic_forced_threat_level = new_value
log_admin("[key_name(usr)] set 'forced_threat_level' to [GLOB.dynamic_forced_threat_level].")
@@ -677,7 +677,7 @@
to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai.", confidential = TRUE)
return
- if(alert(usr, "Send [key_name(M)] to Prison?", "Message", "Yes", "No") != "Yes")
+ if(tgui_alert(usr, "Send [key_name(M)] to Prison?", "Message", list("Yes", "No")) != "Yes")
return
M.forceMove(pick(GLOB.prisonwarp))
@@ -700,7 +700,7 @@
to_chat(usr, "[M] doesn't seem to have an active client.", confidential = TRUE)
return
- if(alert(usr, "Send [key_name(M)] back to Lobby?", "Message", "Yes", "No") != "Yes")
+ if(tgui_alert(usr, "Send [key_name(M)] back to Lobby?", "Message", list("Yes", "No")) != "Yes")
return
log_admin("[key_name(usr)] has sent [key_name(M)] back to the Lobby.")
@@ -714,7 +714,7 @@
if(!check_rights(R_FUN))
return
- if(alert(usr, "Confirm?", "Message", "Yes", "No") != "Yes")
+ if(tgui_alert(usr, "Confirm?", "Message", list("Yes", "No")) != "Yes")
return
var/mob/M = locate(href_list["tdome1"])
@@ -740,7 +740,7 @@
if(!check_rights(R_FUN))
return
- if(alert(usr, "Confirm?", "Message", "Yes", "No") != "Yes")
+ if(tgui_alert(usr, "Confirm?", "Message", list("Yes", "No")) != "Yes")
return
var/mob/M = locate(href_list["tdome2"])
@@ -766,7 +766,7 @@
if(!check_rights(R_FUN))
return
- if(alert(usr, "Confirm?", "Message", "Yes", "No") != "Yes")
+ if(tgui_alert(usr, "Confirm?", "Message", list("Yes", "No")) != "Yes")
return
var/mob/M = locate(href_list["tdomeadmin"])
@@ -789,7 +789,7 @@
if(!check_rights(R_FUN))
return
- if(alert(usr, "Confirm?", "Message", "Yes", "No") != "Yes")
+ if(tgui_alert(usr, "Confirm?", "Message", list("Yes", "No")) != "Yes")
return
var/mob/M = locate(href_list["tdomeobserve"])
@@ -838,7 +838,7 @@
return
var/move = TRUE
- switch(alert(usr,"Move new AI to AI spawn location?","Move AI?", "Yes", "No","Cancel"))
+ switch(tgui_alert(usr,"Move new AI to AI spawn location?","Move AI?", list("Yes", "No","Cancel")))
if("Cancel")
return
if("No")
@@ -1174,7 +1174,7 @@
if(!check_rights(R_ADMIN))
return
- if(alert(usr, "Confirm?", "Message", "Yes", "No") != "Yes")
+ if(tgui_alert(usr, "Confirm?", "Message", list("Yes", "No")) != "Yes")
return
var/mob/M = locate(href_list["getmob"])
usr.client.Getmob(M)
@@ -1235,7 +1235,7 @@
return
if(!SSticker.HasRoundStarted())
- alert("The game hasn't started yet!")
+ tgui_alert(usr,"The game hasn't started yet!")
return
var/mob/M = locate(href_list["traitor"])
@@ -1254,7 +1254,7 @@
return
if(!SSticker.HasRoundStarted())
- alert("The game hasn't started yet!")
+ tgui_alert(usr,"The game hasn't started yet!")
return
var/target = locate(href_list["skill"])
@@ -1336,10 +1336,10 @@
paths += path
if(!paths)
- alert("The path list you sent is empty.")
+ tgui_alert(usr,"The path list you sent is empty.")
return
if(length(paths) > 5)
- alert("Select fewer object types, (max 5).")
+ tgui_alert(usr,"Select fewer object types, (max 5).")
return
var/list/offset = splittext(href_list["offset"],",")
@@ -1467,7 +1467,7 @@
if(src.admincaster_feed_channel.channel_name == "" || src.admincaster_feed_channel.channel_name == "\[REDACTED\]" || check )
src.admincaster_screen=7
else
- var/choice = alert("Please confirm Feed channel creation.","Network Channel Handler","Confirm","Cancel")
+ var/choice = tgui_alert(usr,"Please confirm Feed channel creation.","Network Channel Handler",list("Confirm","Cancel"))
if(choice=="Confirm")
GLOB.news_network.CreateFeedChannel(src.admincaster_feed_channel.channel_name, src.admin_signature, src.admincaster_feed_channel.locked, 1)
SSblackbox.record_feedback("tally", "newscaster_channels", 1, src.admincaster_feed_channel.channel_name)
@@ -1562,7 +1562,7 @@
if(src.admincaster_wanted_message.criminal == "" || src.admincaster_wanted_message.body == "")
src.admincaster_screen = 16
else
- var/choice = alert("Please confirm Wanted Issue [(input_param==1) ? ("creation.") : ("edit.")]","Network Security Handler","Confirm","Cancel")
+ var/choice = tgui_alert(usr,"Please confirm Wanted Issue [(input_param==1) ? ("creation.") : ("edit.")]","Network Security Handler",list("Confirm","Cancel"))
if(choice=="Confirm")
if(input_param==1) //If input_param == 1 we're submitting a new wanted issue. At 2 we're just editing an existing one. See the else below
GLOB.news_network.submitWanted(admincaster_wanted_message.criminal, admincaster_wanted_message.body, admin_signature, null, 1, 1)
@@ -1576,7 +1576,7 @@
else if(href_list["ac_cancel_wanted"])
if(!check_rights(R_ADMIN))
return
- var/choice = alert("Please confirm Wanted Issue removal.","Network Security Handler","Confirm","Cancel")
+ var/choice = tgui_alert(usr,"Please confirm Wanted Issue removal.","Network Security Handler",list("Confirm","Cancel"))
if(choice=="Confirm")
GLOB.news_network.deleteWanted()
src.admincaster_screen=17
@@ -1690,7 +1690,7 @@
return
if(SSticker.IsRoundInProgress())
var/afkonly = text2num(href_list["afkonly"])
- if(alert("Are you sure you want to kick all [afkonly ? "AFK" : ""] clients from the lobby??","Message","Yes","Cancel") != "Yes")
+ if(tgui_alert(usr,"Are you sure you want to kick all [afkonly ? "AFK" : ""] clients from the lobby??","Message",list("Yes","Cancel")) != "Yes")
to_chat(usr, "Kick clients from lobby aborted", confidential = TRUE)
return
var/list/listkicked = kick_clients_in_lobby("You were kicked from the lobby by [usr.client.holder.fakekey ? "an Administrator" : "[usr.client.key]"].", afkonly)
@@ -1716,7 +1716,7 @@
if(!check_rights(R_ADMIN))
return
var/list/type_choices = typesof(/datum/station_goal)
- var/picked = input("Choose goal type") in type_choices|null
+ var/picked = tgui_input_list(usr, "Choose goal type",, type_choices)
if(!picked)
return
var/datum/station_goal/G = new picked()
@@ -1841,7 +1841,7 @@
var/answer = href_list["slowquery"]
if(answer == "yes")
log_query_debug("[usr.key] | Reported a server hang")
- if(alert(usr, "Had you just press any admin buttons?", "Query server hang report", "Yes", "No") == "Yes")
+ if(tgui_alert(usr, "Had you just press any admin buttons?", "Query server hang report", list("Yes", "No")) == "Yes")
var/response = input(usr,"What were you just doing?","Query server hang report") as null|text
if(response)
log_query_debug("[usr.key] | [response]")
@@ -1856,7 +1856,7 @@
else if(href_list["rebootworld"])
if(!check_rights(R_ADMIN))
return
- var/confirm = alert("Are you sure you want to reboot the server?", "Confirm Reboot", "Yes", "No")
+ var/confirm = tgui_alert(usr,"Are you sure you want to reboot the server?", "Confirm Reboot", list("Yes", "No"))
if(confirm == "No")
return
if(confirm == "Yes")
diff --git a/code/modules/admin/verbs/anonymousnames.dm b/code/modules/admin/verbs/anonymousnames.dm
index 6857a8fa7d9..c46425e0a95 100644
--- a/code/modules/admin/verbs/anonymousnames.dm
+++ b/code/modules/admin/verbs/anonymousnames.dm
@@ -9,7 +9,7 @@
set name = "Setup Anonymous Names"
if(SSticker.anonymousnames)
- var/response = alert(usr, "Anon mode is currently enabled. Disable?", "cold feet", "Disable Anon Names", "Keep it Enabled")
+ var/response = tgui_alert(usr, "Anon mode is currently enabled. Disable?", "cold feet", list("Disable Anon Names", "Keep it Enabled"))
if(response != "Disable Anon Names")
return
QDEL_NULL(SSticker.anonymousnames)
@@ -38,7 +38,7 @@
result = input_list[result]
var/alert_players = "No"
if(SSticker.current_state > GAME_STATE_PREGAME) //before anonnames is done, for asking a sleep
- alert_players = alert(usr, "Alert crew? These are IC Themed FROM centcom.", "2016 admins didn't miss roundstart", "Yes", "No")
+ alert_players = tgui_alert(usr, "Alert crew? These are IC Themed FROM centcom.", "2016 admins didn't miss roundstart", list("Yes", "No"))
SSticker.anonymousnames = new result()
if(alert_players == "Yes")
priority_announce(SSticker.anonymousnames.announcement_alert, "Identity Loss", SSstation.announcer.get_rand_alert_sound())
diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm
index f022a2dea21..62bd0b2995e 100644
--- a/code/modules/admin/verbs/debug.dm
+++ b/code/modules/admin/verbs/debug.dm
@@ -42,7 +42,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
set name = "Make Robot"
if(!SSticker.HasRoundStarted())
- alert("Wait until the game starts")
+ tgui_alert(usr,"Wait until the game starts")
return
if(ishuman(M))
log_admin("[key_name(src)] has robotized [M.key].")
@@ -50,21 +50,21 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
INVOKE_ASYNC(H, /mob/living/carbon/human.proc/Robotize)
else
- alert("Invalid mob")
+ tgui_alert(usr,"Invalid mob")
/client/proc/cmd_admin_blobize(mob/M in GLOB.mob_list)
set category = "Admin.Fun"
set name = "Make Blob"
if(!SSticker.HasRoundStarted())
- alert("Wait until the game starts")
+ tgui_alert(usr,"Wait until the game starts")
return
if(ishuman(M))
log_admin("[key_name(src)] has blobized [M.key].")
var/mob/living/carbon/human/H = M
H.become_overmind()
else
- alert("Invalid mob")
+ tgui_alert(usr,"Invalid mob")
/client/proc/cmd_admin_animalize(mob/M in GLOB.mob_list)
@@ -72,15 +72,15 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
set name = "Make Simple Animal"
if(!SSticker.HasRoundStarted())
- alert("Wait until the game starts")
+ tgui_alert(usr,"Wait until the game starts")
return
if(!M)
- alert("That mob doesn't seem to exist, close the panel and try again.")
+ tgui_alert(usr,"That mob doesn't seem to exist, close the panel and try again.")
return
if(isnewplayer(M))
- alert("The mob must not be a new_player.")
+ tgui_alert(usr,"The mob must not be a new_player.")
return
log_admin("[key_name(src)] has animalized [M.key].")
@@ -96,11 +96,11 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
for(var/mob/C in GLOB.mob_list)
if(C.key)
available.Add(C)
- var/mob/choice = input("Choose a player to play the pAI", "Spawn pAI") in sortNames(available)
+ var/mob/choice = tgui_input_list(usr, "Choose a player to play the pAI", "Spawn pAI", sortNames(available))
if(!choice)
return
if(!isobserver(choice))
- var/confirm = input("[choice.key] isn't ghosting right now. Are you sure you want to yank him out of them out of their body and place them in this pAI?", "Spawn pAI Confirmation", "No") in list("Yes", "No")
+ var/confirm = tgui_alert(usr, "[choice.key] isn't ghosting right now. Are you sure you want to yank him out of them out of their body and place them in this pAI?", "Spawn pAI Confirmation", list("Yes", "No"))
if(confirm != "Yes")
return
var/obj/item/paicard/card = new(T)
@@ -125,7 +125,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
set name = "Make Alien"
if(!SSticker.HasRoundStarted())
- alert("Wait until the game starts")
+ tgui_alert(usr,"Wait until the game starts")
return
if(ishuman(M))
INVOKE_ASYNC(M, /mob/living/carbon/human/proc/Alienize)
@@ -133,14 +133,14 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
log_admin("[key_name(usr)] made [key_name(M)] into an alien at [AREACOORD(M)].")
message_admins("[key_name_admin(usr)] made [ADMIN_LOOKUPFLW(M)] into an alien.")
else
- alert("Invalid mob")
+ tgui_alert(usr,"Invalid mob")
/client/proc/cmd_admin_slimeize(mob/M in GLOB.mob_list)
set category = "Admin.Fun"
set name = "Make slime"
if(!SSticker.HasRoundStarted())
- alert("Wait until the game starts")
+ tgui_alert(usr,"Wait until the game starts")
return
if(ishuman(M))
INVOKE_ASYNC(M, /mob/living/carbon/human/proc/slimeize)
@@ -148,7 +148,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
log_admin("[key_name(usr)] made [key_name(M)] into a slime at [AREACOORD(M)].")
message_admins("[key_name_admin(usr)] made [ADMIN_LOOKUPFLW(M)] into a slime.")
else
- alert("Invalid mob")
+ tgui_alert(usr,"Invalid mob")
//TODO: merge the vievars version into this or something maybe mayhaps
@@ -189,7 +189,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
set name = "Grant Full Access"
if(!SSticker.HasRoundStarted())
- alert("Wait until the game starts")
+ tgui_alert(usr,"Wait until the game starts")
return
if(ishuman(M))
var/mob/living/carbon/human/H = M
@@ -223,7 +223,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
H.equip_to_slot(id,ITEM_SLOT_ID)
else
- alert("Invalid mob")
+ tgui_alert(usr,"Invalid mob")
SSblackbox.record_feedback("tally", "admin_verb", 1, "Grant Full Access") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(src)] has granted [M.key] full access.")
message_admins("[key_name_admin(usr)] has granted [M.key] full access.")
@@ -234,7 +234,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
set desc = "Direct intervention"
if(M.ckey)
- if(alert("This mob is being controlled by [M.key]. Are you sure you wish to assume control of it? [M.key] will be made a ghost.",,"Yes","No") != "Yes")
+ if(tgui_alert(usr,"This mob is being controlled by [M.key]. Are you sure you wish to assume control of it? [M.key] will be made a ghost.",,list("Yes","No")) != "Yes")
return
if(!M || QDELETED(M))
to_chat(usr, "The target mob no longer exists.")
@@ -257,12 +257,12 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
if(!M)
return
if(M.ckey)
- if(alert("This mob is being controlled by [M.key]. Are you sure you wish to give someone else control of it? [M.key] will be made a ghost.",,"Yes","No") != "Yes")
+ if(tgui_alert(usr,"This mob is being controlled by [M.key]. Are you sure you wish to give someone else control of it? [M.key] will be made a ghost.",,list("Yes","No")) != "Yes")
return
var/client/newkey = input(src, "Pick the player to put in control.", "New player") as null|anything in sortList(GLOB.clients)
var/mob/oldmob = newkey.mob
var/delmob = FALSE
- if((isobserver(oldmob) || alert("Do you want to delete [newkey]'s old mob?","Delete?","Yes","No") != "No"))
+ if((isobserver(oldmob) || tgui_alert(usr,"Do you want to delete [newkey]'s old mob?","Delete?",list("Yes","No")) != "No"))
delmob = TRUE
if(!M || QDELETED(M))
to_chat(usr, "The target mob no longer exists, aborting.")
@@ -552,7 +552,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
set name = "Debug Mob Lists"
set desc = "For when you just gotta know"
- switch(input("Which list?") in list("Players","Admins","Mobs","Living Mobs","Dead Mobs","Clients","Joined Clients"))
+ switch(tgui_input_list(usr, "Which list?",, list("Players","Admins","Mobs","Living Mobs","Dead Mobs","Clients","Joined Clients")))
if("Players")
to_chat(usr, jointext(GLOB.player_list,","), confidential = TRUE)
if("Admins")
@@ -684,7 +684,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
return
var/datum/map_template/ruin/template = data[1]
if (exists[template])
- var/response = alert("There is already a [template] in existence.", "Spawn Ruin", "Jump", "Place Another", "Cancel")
+ var/response = tgui_alert(usr,"There is already a [template] in existence.", "Spawn Ruin", list("Jump", "Place Another", "Cancel"))
if (response == "Jump")
usr.forceMove(get_turf(exists[template]))
return
@@ -708,7 +708,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
set desc = "Deallocates all reserved space, restoring it to round start conditions."
if(!holder)
return
- var/answer = alert("WARNING: THIS WILL WIPE ALL RESERVED SPACE TO A CLEAN SLATE! ANY MOVING SHUTTLES, ELEVATORS, OR IN-PROGRESS PHOTOGRAPHY WILL BE DELETED!", "Really wipe dynamic turfs?", "YES", "NO")
+ var/answer = tgui_alert(usr,"WARNING: THIS WILL WIPE ALL RESERVED SPACE TO A CLEAN SLATE! ANY MOVING SHUTTLES, ELEVATORS, OR IN-PROGRESS PHOTOGRAPHY WILL BE DELETED!", "Really wipe dynamic turfs?", list("YES", "NO"))
if(answer != "YES")
return
message_admins("[key_name_admin(src)] cleared dynamic transit space.")
@@ -797,7 +797,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
set desc = "Force config reload to world default"
if(!check_rights(R_DEBUG))
return
- if(alert(usr, "Are you absolutely sure you want to reload the configuration from the default path on the disk, wiping any in-round modificatoins?", "Really reset?", "No", "Yes") == "Yes")
+ if(tgui_alert(usr, "Are you absolutely sure you want to reload the configuration from the default path on the disk, wiping any in-round modificatoins?", "Really reset?", list("No", "Yes")) == "Yes")
config.admin_reload()
/// A debug verb to check the sources of currently running timers
diff --git a/code/modules/admin/verbs/diagnostics.dm b/code/modules/admin/verbs/diagnostics.dm
index 82ca517abd4..8dfa120141b 100644
--- a/code/modules/admin/verbs/diagnostics.dm
+++ b/code/modules/admin/verbs/diagnostics.dm
@@ -72,7 +72,7 @@
if(!src.holder)
return
- var/confirm = alert(src, "Are you sure you want to reload all admins?", "Confirm", "Yes", "No")
+ var/confirm = tgui_alert(usr, "Are you sure you want to reload all admins?", "Confirm", list("Yes", "No"))
if(confirm !="Yes")
return
@@ -84,7 +84,7 @@
set name = "Toggle CDN"
set category = "Server"
var/static/admin_disabled_cdn_transport = null
- if (alert(usr, "Are you sure you want to toggle the CDN asset transport?", "Confirm", "Yes", "No") != "Yes")
+ if (tgui_alert(usr, "Are you sure you want to toggle the CDN asset transport?", "Confirm", list("Yes", "No")) != "Yes")
return
var/current_transport = CONFIG_GET(string/asset_transport)
if (!current_transport || current_transport == "simple")
@@ -96,7 +96,7 @@
log_admin("[key_name(usr)] re-enabled the CDN asset transport")
else
to_chat(usr, "The CDN is not enabled!")
- if (alert(usr, "The CDN asset transport is not enabled! If you having issues with assets you can also try disabling filename mutations.", "The CDN asset transport is not enabled!", "Try disabling filename mutations", "Nevermind") == "Try disabling filename mutations")
+ if (tgui_alert(usr, "The CDN asset transport is not enabled! If you having issues with assets you can also try disabling filename mutations.", "The CDN asset transport is not enabled!", list("Try disabling filename mutations", "Nevermind")) == "Try disabling filename mutations")
SSassets.transport.dont_mutate_filenames = !SSassets.transport.dont_mutate_filenames
message_admins("[key_name_admin(usr)] [(SSassets.transport.dont_mutate_filenames ? "disabled" : "re-enabled")] asset filename transforms")
log_admin("[key_name(usr)] [(SSassets.transport.dont_mutate_filenames ? "disabled" : "re-enabled")] asset filename transforms")
diff --git a/code/modules/admin/verbs/fps.dm b/code/modules/admin/verbs/fps.dm
index a3e7c5f5df0..f75be2e4a66 100644
--- a/code/modules/admin/verbs/fps.dm
+++ b/code/modules/admin/verbs/fps.dm
@@ -14,7 +14,7 @@
to_chat(src, "Error: set_server_fps(): Invalid world.fps value. No changes made.", confidential = TRUE)
return
if(new_fps > cfg_fps * 1.5)
- if(alert(src, "You are setting fps to a high value:\n\t[new_fps] frames-per-second\n\tconfig.fps = [cfg_fps]","Warning!","Confirm","ABORT-ABORT-ABORT") != "Confirm")
+ if(tgui_alert(usr, "You are setting fps to a high value:\n\t[new_fps] frames-per-second\n\tconfig.fps = [cfg_fps]","Warning!",list("Confirm","ABORT-ABORT-ABORT")) != "Confirm")
return
var/msg = "[key_name(src)] has modified world.fps to [new_fps]"
diff --git a/code/modules/admin/verbs/getlogs.dm b/code/modules/admin/verbs/getlogs.dm
index 1f706091c6b..77b43f9b49f 100644
--- a/code/modules/admin/verbs/getlogs.dm
+++ b/code/modules/admin/verbs/getlogs.dm
@@ -22,7 +22,7 @@
return
message_admins("[key_name_admin(src)] accessed file: [path]")
- switch(alert("View (in game), Open (in your system's text editor), or Download?", path, "View", "Open", "Download"))
+ switch(tgui_alert(usr,"View (in game), Open (in your system's text editor), or Download?", path, list("View", "Open", "Download")))
if ("View")
src << browse("
[html_encode(file2text(file(path)))]
", list2params(list("window" = "viewfile.[path]")))
if ("Open")
diff --git a/code/modules/admin/verbs/highlander_datum.dm b/code/modules/admin/verbs/highlander_datum.dm
index 18dd23ca83b..52a1a2fd759 100644
--- a/code/modules/admin/verbs/highlander_datum.dm
+++ b/code/modules/admin/verbs/highlander_datum.dm
@@ -72,7 +72,7 @@ GLOBAL_DATUM(highlander_controller, /datum/highlander_controller)
*/
/client/proc/only_one(was_delayed = FALSE)
if(!SSticker.HasRoundStarted())
- alert("The game hasn't started yet!")
+ tgui_alert(usr,"The game hasn't started yet!")
return
if(was_delayed) //sends more accurate logs
diff --git a/code/modules/admin/verbs/map_template_loadverb.dm b/code/modules/admin/verbs/map_template_loadverb.dm
index 93a34344d98..b4908c40870 100644
--- a/code/modules/admin/verbs/map_template_loadverb.dm
+++ b/code/modules/admin/verbs/map_template_loadverb.dm
@@ -15,7 +15,7 @@
var/list/preview = list()
var/center
- var/centeralert = alert(src,"Center Template.","Template Centering","Yes","No")
+ var/centeralert = tgui_alert(usr,"Center Template.","Template Centering",list("Yes","No"))
switch(centeralert)
if("Yes")
center = TRUE
@@ -28,7 +28,7 @@
item.plane = ABOVE_LIGHTING_PLANE
preview += item
images += preview
- if(alert(src,"Confirm location.","Template Confirm","Yes","No") == "Yes")
+ if(tgui_alert(usr,"Confirm location.","Template Confirm",list("Yes","No")) == "Yes")
if(template.load(T, centered = center))
var/affected = template.get_affected_turfs(T, centered = center)
for(var/AT in affected)
@@ -53,7 +53,7 @@
to_chat(src, "Filename must end in '.dmm': [map]", confidential = TRUE)
return
var/datum/map_template/M
- switch(alert(src, "What kind of map is this?", "Map type", "Normal", "Shuttle", "Cancel"))
+ switch(tgui_alert(usr, "What kind of map is this?", "Map type", list("Normal", "Shuttle", "Cancel")))
if("Normal")
M = new /datum/map_template(map, "[map]", TRUE)
if("Shuttle")
@@ -71,11 +71,11 @@
report_link = " - validation report"
to_chat(src, "Map template '[map]' failed validation.", confidential = TRUE)
if(report.loadable)
- var/response = alert(src, "The map failed validation, would you like to load it anyways?", "Map Errors", "Cancel", "Upload Anyways")
+ var/response = tgui_alert(usr, "The map failed validation, would you like to load it anyways?", "Map Errors", list("Cancel", "Upload Anyways"))
if(response != "Upload Anyways")
return
else
- alert(src, "The map failed validation and cannot be loaded.", "Map Errors", "Oh Darn")
+ tgui_alert(usr, "The map failed validation and cannot be loaded.", "Map Errors", list("Oh Darn"))
return
SSmapping.map_templates[M.name] = M
diff --git a/code/modules/admin/verbs/mapping.dm b/code/modules/admin/verbs/mapping.dm
index c3b0a0fa440..16511eac815 100644
--- a/code/modules/admin/verbs/mapping.dm
+++ b/code/modules/admin/verbs/mapping.dm
@@ -109,7 +109,7 @@ GLOBAL_LIST_EMPTY(dirty_vars)
set name = "Camera Report"
if(!Master)
- alert(usr,"Master_controller not found.","Sec Camera Report")
+ tgui_alert(usr,"Master_controller not found.","Sec Camera Report")
return FALSE
var/list/obj/machinery/camera/CL = list()
diff --git a/code/modules/admin/verbs/maprotation.dm b/code/modules/admin/verbs/maprotation.dm
index 428bbdce59e..554d751a869 100644
--- a/code/modules/admin/verbs/maprotation.dm
+++ b/code/modules/admin/verbs/maprotation.dm
@@ -1,7 +1,7 @@
/client/proc/forcerandomrotate()
set category = "Server"
set name = "Trigger Random Map Rotation"
- var/rotate = alert("Force a random map rotation to trigger?", "Rotate map?", "Yes", "Cancel")
+ var/rotate = tgui_alert(usr,"Force a random map rotation to trigger?", "Rotate map?", list("Yes", "Cancel"))
if (rotate != "Yes")
return
message_admins("[key_name_admin(usr)] is forcing a random map rotation.")
@@ -32,7 +32,7 @@
mapname += "\]"
maprotatechoices[mapname] = VM
- var/chosenmap = input("Choose a map to change to", "Change Map") as null|anything in sortList(maprotatechoices)|"Custom"
+ var/chosenmap = tgui_input_list(usr, "Choose a map to change to", "Change Map", sortList(maprotatechoices)|"Custom")
if (!chosenmap)
return
@@ -69,7 +69,7 @@
qdel(M)
- var/shuttles = alert("Do you want to modify the shuttles?", "Map Shuttles", "Yes", "No")
+ var/shuttles = tgui_alert(usr,"Do you want to modify the shuttles?", "Map Shuttles", list("Yes", "No"))
if(shuttles == "Yes")
for(var/s in VM.shuttles)
var/shuttle = input(s, "Map Shuttles") as null|text
diff --git a/code/modules/admin/verbs/panicbunker.dm b/code/modules/admin/verbs/panicbunker.dm
index c0e229ef6e7..5a751f4dca7 100644
--- a/code/modules/admin/verbs/panicbunker.dm
+++ b/code/modules/admin/verbs/panicbunker.dm
@@ -16,7 +16,7 @@
CONFIG_SET(number/panic_bunker_living, time_rec)
CONFIG_SET(string/panic_bunker_message, message)
- var/interview_sys = alert(src, "Should the interview system be enabled? (Allows players to connect under the hour limit and force them to be manually approved to play)", "Enable interviews?", "Enable", "Disable")
+ var/interview_sys = tgui_alert(usr, "Should the interview system be enabled? (Allows players to connect under the hour limit and force them to be manually approved to play)", "Enable interviews?", list("Enable", "Disable"))
interview = interview_sys == "Enable"
CONFIG_SET(flag/panic_bunker_interview, interview)
CONFIG_SET(flag/panic_bunker, new_pb)
diff --git a/code/modules/admin/verbs/playsound.dm b/code/modules/admin/verbs/playsound.dm
index 319ff4a7d21..7a64db1acff 100644
--- a/code/modules/admin/verbs/playsound.dm
+++ b/code/modules/admin/verbs/playsound.dm
@@ -20,7 +20,7 @@
admin_sound.status = SOUND_STREAM
admin_sound.volume = vol
- var/res = alert(usr, "Show the title of this song to the players?",, "Yes","No", "Cancel")
+ var/res = tgui_alert(usr, "Show the title of this song to the players?",, list("Yes","No", "Cancel"))
switch(res)
if("Yes")
to_chat(world, "An admin played: [S]", confidential = TRUE)
@@ -113,7 +113,7 @@
music_extra_data["link"] = data["webpage_url"]
music_extra_data["title"] = data["title"]
- var/res = alert(usr, "Show the title of and link to this song to the players?\n[title]",, "No", "Yes", "Cancel")
+ var/res = tgui_alert(usr, "Show the title of and link to this song to the players?\n[title]",, list("No", "Yes", "Cancel"))
switch(res)
if("Yes")
to_chat(world, "An admin played: [webpage_url]", confidential = TRUE)
diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm
index 38e341f0910..cebc9b9f2ac 100644
--- a/code/modules/admin/verbs/randomverbs.dm
+++ b/code/modules/admin/verbs/randomverbs.dm
@@ -4,7 +4,7 @@
if(!check_rights(R_ADMIN))
return
- var/confirm = alert(src, "Make [M] drop everything?", "Message", "Yes", "No")
+ var/confirm = tgui_alert(usr, "Make [M] drop everything?", "Message", list("Yes", "No"))
if(confirm != "Yes")
return
@@ -358,7 +358,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(G_found.mind && !G_found.mind.active) //mind isn't currently in use by someone/something
//Check if they were an alien
if(G_found.mind.assigned_role == ROLE_ALIEN)
- if(alert("This character appears to have been an alien. Would you like to respawn them as such?",,"Yes","No")=="Yes")
+ if(tgui_alert(usr,"This character appears to have been an alien. Would you like to respawn them as such?",,list("Yes","No"))=="Yes")
var/turf/T
if(GLOB.xeno_spawn.len)
T = pick(GLOB.xeno_spawn)
@@ -393,7 +393,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
//check if they were a monkey
else if(findtext(G_found.real_name,"monkey"))
- if(alert("This character appears to have been a monkey. Would you like to respawn them as such?",,"Yes","No")=="Yes")
+ if(tgui_alert(usr,"This character appears to have been a monkey. Would you like to respawn them as such?",,list("Yes","No"))=="Yes")
var/mob/living/carbon/human/species/monkey/new_monkey = new
SSjob.SendToLateJoin(new_monkey)
G_found.mind.transfer_to(new_monkey) //be careful when doing stuff like this! I've already checked the mind isn't in use
@@ -487,10 +487,10 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!issilicon(new_character))//If they are not a cyborg/AI.
if(!record_found&&new_character.mind.assigned_role!=new_character.mind.special_role)//If there are no records for them. If they have a record, this info is already in there. MODE people are not announced anyway.
//Power to the user!
- if(alert(new_character,"Warning: No data core entry detected. Would you like to announce the arrival of this character by adding them to various databases, such as medical records?",,"No","Yes")=="Yes")
+ if(tgui_alert(new_character,"Warning: No data core entry detected. Would you like to announce the arrival of this character by adding them to various databases, such as medical records?",,list("No","Yes"))=="Yes")
GLOB.data_core.manifest_inject(new_character)
- if(alert(new_character,"Would you like an active AI to announce this character?",,"No","Yes")=="Yes")
+ if(tgui_alert(new_character,"Would you like an active AI to announce this character?",,list("No","Yes"))=="Yes")
AnnounceArrival(new_character, new_character.mind.assigned_role)
var/msg = "[admin] has respawned [player_key] as [new_character.real_name]."
@@ -516,7 +516,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
log_admin("Admin [key_name(usr)] has added a new AI law - [input]")
message_admins("Admin [key_name_admin(usr)] has added a new AI law - [input]")
- var/show_log = alert(src, "Show ion message?", "Message", "Yes", "No")
+ var/show_log = tgui_alert(usr, "Show ion message?", "Message", list("Yes", "No"))
var/announce_ion_laws = (show_log == "Yes" ? 100 : 0)
var/datum/round_event/ion_storm/add_law_only/ion = new()
@@ -535,7 +535,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!mob)
return
if(!istype(M))
- alert("Cannot revive a ghost")
+ tgui_alert(usr,"Cannot revive a ghost")
return
M.revive(full_heal = TRUE, admin_revive = TRUE)
@@ -588,7 +588,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if ((devastation != -1) || (heavy != -1) || (light != -1) || (flash != -1) || (flames != -1))
if ((devastation > 20) || (heavy > 20) || (light > 20) || (flames > 20))
- if (alert(src, "Are you sure you want to do this? It will laaag.", "Confirmation", "Yes", "No") == "No")
+ if (tgui_alert(usr, "Are you sure you want to do this? It will laaag.", "Confirmation", list("Yes", "No")) == "No")
return
explosion(O, devastation, heavy, light, flames, flash)
@@ -631,7 +631,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!check_rights(R_ADMIN))
return
- var/confirm = alert(src, "Drop a brain?", "Confirm", "Yes", "No","Cancel")
+ var/confirm = tgui_alert(usr, "Drop a brain?", "Confirm", list("Yes", "No","Cancel"))
if(confirm == "Cancel")
return
//Due to the delay here its easy for something to have happened to the mob
@@ -658,7 +658,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
set name = "Gibself"
set category = "Admin.Fun"
- var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No")
+ var/confirm = tgui_alert(usr, "You sure?", "Confirm", list("Yes", "No"))
if(confirm == "Yes")
log_admin("[key_name(usr)] used gibself.")
message_admins("[key_name_admin(usr)] used gibself.")
@@ -702,7 +702,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!check_rights(R_ADMIN))
return
- var/confirm = alert(src, "You sure?", "Confirm", "Yes", "Yes (No Recall)", "No")
+ var/confirm = tgui_alert(usr, "You sure?", "Confirm", list("Yes", "Yes (No Recall)", "No"))
switch(confirm)
if(null, "No")
return
@@ -721,7 +721,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
set name = "Cancel Shuttle"
if(!check_rights(0))
return
- if(alert(src, "You sure?", "Confirm", "Yes", "No") != "Yes")
+ if(tgui_alert(usr, "You sure?", "Confirm", list("Yes", "No")) != "Yes")
return
if(SSshuttle.adminEmergencyNoRecall)
@@ -748,7 +748,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
to_chat(usr, "Error, shuttle is already disabled.")
return
- if(alert(src, "You sure?", "Confirm", "Yes", "No") != "Yes")
+ if(tgui_alert(usr, "You sure?", "Confirm", list("Yes", "No")) != "Yes")
return
message_admins("[key_name_admin(usr)] disabled the shuttle.")
@@ -771,7 +771,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
to_chat(usr, "Error, shuttle not disabled.")
return
- if(alert(src, "You sure?", "Confirm", "Yes", "No") != "Yes")
+ if(tgui_alert(usr, "You sure?", "Confirm", list("Yes", "No")) != "Yes")
return
message_admins("[key_name_admin(usr)] enabled the emergency shuttle.")
@@ -803,7 +803,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
return
- var/notifyplayers = alert(src, "Do you want to notify the players?", "Options", "Yes", "No", "Cancel")
+ var/notifyplayers = tgui_alert(usr, "Do you want to notify the players?", "Options", list("Yes", "No", "Cancel"))
if(notifyplayers == "Cancel")
return
@@ -936,7 +936,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!check_rights(R_ADMIN))
return
- var/confirm = alert(src, "Please confirm you want to add latent zombie organs in all humans?", "Confirm Zombies", "Yes", "No")
+ var/confirm = tgui_alert(usr, "Please confirm you want to add latent zombie organs in all humans?", "Confirm Zombies", list("Yes", "No"))
if(confirm != "Yes")
return
@@ -955,7 +955,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!check_rights(R_ADMIN))
return
- var/confirm = alert(src, "Please confirm you want to cure all zombies?", "Confirm Zombie Cure", "Yes", "No")
+ var/confirm = tgui_alert(usr, "Please confirm you want to cure all zombies?", "Confirm Zombie Cure", list("Yes", "No"))
if(confirm != "Yes")
return
@@ -974,7 +974,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!check_rights(R_ADMIN))
return
- var/confirm = alert(src, "Please confirm you want polymorph all mobs?", "Confirm Polymorph", "Yes", "No")
+ var/confirm = tgui_alert(usr, "Please confirm you want polymorph all mobs?", "Confirm Polymorph", list("Yes", "No"))
if(confirm != "Yes")
return
diff --git a/code/modules/admin/verbs/reestablish_db_connection.dm b/code/modules/admin/verbs/reestablish_db_connection.dm
index 0e5af33fb72..016b1e98a57 100644
--- a/code/modules/admin/verbs/reestablish_db_connection.dm
+++ b/code/modules/admin/verbs/reestablish_db_connection.dm
@@ -7,10 +7,10 @@
if (SSdbcore.IsConnected())
if (!check_rights(R_DEBUG,0))
- alert("The database is already connected! (Only those with +debug can force a reconnection)", "The database is already connected!")
+ tgui_alert(usr,"The database is already connected! (Only those with +debug can force a reconnection)", "The database is already connected!")
return
- var/reconnect = alert("The database is already connected! If you *KNOW* that this is incorrect, you can force a reconnection", "The database is already connected!", "Force Reconnect", "Cancel")
+ var/reconnect = tgui_alert(usr,"The database is already connected! If you *KNOW* that this is incorrect, you can force a reconnection", "The database is already connected!", list("Force Reconnect", "Cancel"))
if (reconnect != "Force Reconnect")
return
diff --git a/code/modules/admin/verbs/secrets.dm b/code/modules/admin/verbs/secrets.dm
index eb36482c0d4..f66dd91812a 100644
--- a/code/modules/admin/verbs/secrets.dm
+++ b/code/modules/admin/verbs/secrets.dm
@@ -94,7 +94,7 @@
message_admins("[key_name_admin(holder)] has removed the cap on security officers.")
//Buttons for helpful stuff. This is where people land in the tgui
if("clear_virus")
- var/choice = input("Are you sure you want to cure all disease?") in list("Yes", "Cancel")
+ var/choice = tgui_alert(usr, "Are you sure you want to cure all disease?",, list("Yes", "Cancel"))
if(choice == "Yes")
message_admins("[key_name_admin(holder)] has cured all diseases.")
for(var/thing in SSdisease.active_diseases)
@@ -120,11 +120,11 @@
holder.holder.output_ai_laws()//huh, inconvenient var naming, huh?
if("showgm")
if(!SSticker.HasRoundStarted())
- alert("The game hasn't started yet!")
+ tgui_alert(usr,"The game hasn't started yet!")
else if (SSticker.mode)
- alert("The game mode is [SSticker.mode.name]")
+ tgui_alert(usr,"The game mode is [SSticker.mode.name]")
else
- alert("For some reason there's a SSticker, but not a game mode")
+ tgui_alert(usr,"For some reason there's a SSticker, but not a game mode")
if("manifest")
var/dat = "Showing Crew Manifest."
dat += "
Name
Position
"
@@ -153,7 +153,7 @@
if("ctfbutton")
toggle_id_ctf(holder, "centcom")
if("tdomereset")
- var/delete_mobs = alert("Clear all mobs?","Confirm","Yes","No","Cancel")
+ var/delete_mobs = tgui_alert(usr,"Clear all mobs?","Confirm",list("Yes","No","Cancel"))
if(delete_mobs == "Cancel")
return
@@ -185,7 +185,7 @@
message_admins("[key_name_admin(holder)] reset the station name.")
priority_announce("[command_name()] has renamed the station to \"[new_name]\".")
if("night_shift_set")
- var/val = alert(holder, "What do you want to set night shift to? This will override the automatic system until set to automatic again.", "Night Shift", "On", "Off", "Automatic")
+ var/val = tgui_alert(holder, "What do you want to set night shift to? This will override the automatic system until set to automatic again.", "Night Shift", list("On", "Off", "Automatic"))
switch(val)
if("Automatic")
if(CONFIG_GET(flag/enable_night_shifts))
@@ -224,7 +224,7 @@
if(!is_funmin)
return
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Virus Outbreak"))
- switch(alert("Do you want this to be a random disease or do you have something in mind?",,"Make Your Own","Random","Choose"))
+ switch(tgui_alert(usr,"Do you want this to be a random disease or do you have something in mind?",,list("Make Your Own","Random","Choose")))
if("Make Your Own")
AdminCreateVirus(holder)
if("Random")
@@ -282,7 +282,7 @@
if("onlyone")
if(!is_funmin)
return
- var/response = alert("Delay by 40 seconds?", "There can, in fact, only be one", "Instant!", "40 seconds (crush the hope of a normal shift)")
+ var/response = tgui_alert(usr,"Delay by 40 seconds?", "There can, in fact, only be one", list("Instant!", "40 seconds (crush the hope of a normal shift)"))
if(response == "Instant!")
holder.only_one()
else
@@ -293,7 +293,7 @@
return
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Summon Guns"))
var/survivor_probability = 0
- switch(alert("Do you want this to create survivors antagonists?",,"No Antags","Some Antags","All Antags!"))
+ switch(tgui_alert(usr,"Do you want this to create survivors antagonists?",,list("No Antags","Some Antags","All Antags!")))
if("Some Antags")
survivor_probability = 25
if("All Antags!")
@@ -305,7 +305,7 @@
return
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Summon Magic"))
var/survivor_probability = 0
- switch(alert("Do you want this to create magician antagonists?",,"No Antags","Some Antags","All Antags!"))
+ switch(tgui_alert(usr,"Do you want this to create magician antagonists?",,list("No Antags","Some Antags","All Antags!")))
if("Some Antags")
survivor_probability = 25
if("All Antags!")
@@ -316,12 +316,12 @@
if(!is_funmin)
return
if(!SSevents.wizardmode)
- if(alert("Do you want to toggle summon events on?",,"Yes","No") == "Yes")
+ if(tgui_alert(usr,"Do you want to toggle summon events on?",,list("Yes","No")) == "Yes")
summonevents()
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Summon Events", "Activate"))
else
- switch(alert("What would you like to do?",,"Intensify Summon Events","Turn Off Summon Events","Nothing"))
+ switch(tgui_alert(usr,"What would you like to do?",,list("Intensify Summon Events","Turn Off Summon Events","Nothing")))
if("Intensify Summon Events")
summonevents()
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Summon Events", "Intensify"))
@@ -457,7 +457,7 @@
if(!is_funmin)
return
if(!SSticker.HasRoundStarted())
- alert("The game hasn't started yet!")
+ tgui_alert(usr,"The game hasn't started yet!")
return
var/objective = stripped_input(holder, "Enter an objective")
if(!objective)
@@ -492,11 +492,11 @@
if("anime")
if(!is_funmin)
return
- var/animetype = alert("Would you like to have the clothes be changed?",,"Yes","No","Cancel")
+ var/animetype = tgui_alert(usr,"Would you like to have the clothes be changed?",,list("Yes","No","Cancel"))
var/droptype
if(animetype =="Yes")
- droptype = alert("Make the uniforms Nodrop?",,"Yes","No","Cancel")
+ droptype = tgui_alert(usr,"Make the uniforms Nodrop?",,list("Yes","No","Cancel"))
if(animetype == "Cancel" || droptype == "Cancel")
return
@@ -586,7 +586,7 @@
if(E)
E.processing = FALSE
if(E.announceWhen>0)
- switch(alert(holder, "Would you like to alert the crew?", "Alert", "Yes", "No", "Cancel"))
+ switch(tgui_alert(holder, "Would you like to alert the crew?", "Alert", list("Yes", "No", "Cancel")))
if("Yes")
E.announceChance = 100
if("Cancel")
diff --git a/code/modules/admin/verbs/selectequipment.dm b/code/modules/admin/verbs/selectequipment.dm
index 4184fed68ff..75081f42a44 100644
--- a/code/modules/admin/verbs/selectequipment.dm
+++ b/code/modules/admin/verbs/selectequipment.dm
@@ -37,7 +37,7 @@
user = CLIENT_FROM_VAR(_user)
if(!ishuman(target) && !isobserver(target))
- alert("Invalid mob")
+ tgui_alert(usr,"Invalid mob")
return
target_mob = target
@@ -196,7 +196,7 @@
/client/proc/admin_apply_outfit(mob/target, dresscode)
if(!ishuman(target) && !isobserver(target))
- alert("Invalid mob")
+ tgui_alert(usr,"Invalid mob")
return
if(!dresscode)
@@ -209,7 +209,7 @@
else
human_target = target
if(human_target.l_store || human_target.r_store || human_target.s_store) //saves a lot of time for admins and coders alike
- if(alert("Drop Items in Pockets? No will delete them.", "Robust quick dress shop", "Yes", "No") == "No")
+ if(tgui_alert(usr,"Drop Items in Pockets? No will delete them.", "Robust quick dress shop", list("Yes", "No")) == "No")
delete_pocket = TRUE
SSblackbox.record_feedback("tally", "admin_verb", 1, "Select Equipment") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
diff --git a/code/modules/admin/verbs/shuttlepanel.dm b/code/modules/admin/verbs/shuttlepanel.dm
index 7552936136e..ef584272b73 100644
--- a/code/modules/admin/verbs/shuttlepanel.dm
+++ b/code/modules/admin/verbs/shuttlepanel.dm
@@ -35,12 +35,12 @@
setTimer(ignitionTime)
if("Delete Shuttle")
- if(alert(user, "Really delete [name || id]?", "Delete Shuttle", "Cancel", "Really!") != "Really!")
+ if(tgui_alert(user, "Really delete [name || id]?", "Delete Shuttle", list("Cancel", "Really!")) != "Really!")
return
jumpToNullSpace()
if("Into The Sunset (delete & greentext 'escape')")
- if(alert(user, "Really delete [name || id] and greentext escape objectives?", "Delete Shuttle", "Cancel", "Really!") != "Really!")
+ if(tgui_alert(user, "Really delete [name || id] and greentext escape objectives?", "Delete Shuttle", list("Cancel", "Really!")) != "Really!")
return
intoTheSunset()
@@ -52,7 +52,7 @@
return // use the existing verbs for this
/obj/docking_port/mobile/arrivals/admin_fly_shuttle(mob/user)
- switch(alert(user, "Would you like to fly the arrivals shuttle once or change its destination?", "Fly Shuttle", "Fly", "Retarget", "Cancel"))
+ switch(tgui_alert(user, "Would you like to fly the arrivals shuttle once or change its destination?", "Fly Shuttle", list("Fly", "Retarget", "Cancel")))
if("Cancel")
return
if("Fly")
diff --git a/code/modules/admin/view_variables/admin_delete.dm b/code/modules/admin/view_variables/admin_delete.dm
index 947ad5db2ca..2da53df20e8 100644
--- a/code/modules/admin/view_variables/admin_delete.dm
+++ b/code/modules/admin/view_variables/admin_delete.dm
@@ -10,7 +10,7 @@
else
jmp_coords = coords = "in nullspace"
- if (alert(src, "Are you sure you want to delete:\n[D]\n[coords]?", "Confirmation", "Yes", "No") == "Yes")
+ if (tgui_alert(usr, "Are you sure you want to delete:\n[D]\n[coords]?", "Confirmation", list("Yes", "No")) == "Yes")
log_admin("[key_name(usr)] deleted [D] [coords]")
message_admins("[key_name_admin(usr)] deleted [D] [jmp_coords]")
SSblackbox.record_feedback("tally", "admin_verb", 1, "Delete") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
diff --git a/code/modules/admin/view_variables/get_variables.dm b/code/modules/admin/view_variables/get_variables.dm
index 1c197dd7429..f624233fe06 100644
--- a/code/modules/admin/view_variables/get_variables.dm
+++ b/code/modules/admin/view_variables/get_variables.dm
@@ -264,10 +264,10 @@
break
D = locate(ref)
if(!D)
- alert("Invalid ref!")
+ tgui_alert(usr,"Invalid ref!")
continue
if(!D.can_vv_mark())
- alert("Datum can not be marked!")
+ tgui_alert(usr,"Datum can not be marked!")
continue
while(!D)
.["type"] = D.type
diff --git a/code/modules/admin/view_variables/mass_edit_variables.dm b/code/modules/admin/view_variables/mass_edit_variables.dm
index b01506a6001..138dd573379 100644
--- a/code/modules/admin/view_variables/mass_edit_variables.dm
+++ b/code/modules/admin/view_variables/mass_edit_variables.dm
@@ -5,7 +5,7 @@
var/method = 0 //0 means strict type detection while 1 means this type and all subtypes (IE: /obj/item with this set to 1 will set it to ALL items)
- if(tgui_alert(src, "Are you sure you'd like to mass-modify every instance of the [var_name] variable? This can break everything if you do not know what you are doing.", "Slow down, chief!", list("Yes", "No")) != "Yes")
+ if(tgui_alert(usr, "Are you sure you'd like to mass-modify every instance of the [var_name] variable? This can break everything if you do not know what you are doing.", "Slow down, chief!", list("Yes", "No"), 60 SECONDS) != "Yes")
return
if(!check_rights(R_VAREDIT))
@@ -52,7 +52,7 @@
if(variable in GLOB.VVpixelmovement)
if(!check_rights(R_DEBUG))
return
- var/prompt = alert(src, "Editing this var may irreparably break tile gliding for the rest of the round. THIS CAN'T BE UNDONE", "DANGER", "ABORT ", "Continue", " ABORT")
+ var/prompt = tgui_alert(usr, "Editing this var may irreparably break tile gliding for the rest of the round. THIS CAN'T BE UNDONE", "DANGER", list("ABORT ", "Continue", " ABORT"))
if (prompt != "Continue")
return
@@ -118,7 +118,7 @@
var/pre_processing = new_value
var/unique
if (varsvars?.len)
- unique = alert(usr, "Process vars unique to each instance, or same for all?", "Variable Association", "Unique", "Same")
+ unique = tgui_alert(usr, "Process vars unique to each instance, or same for all?", "Variable Association", list("Unique", "Same"))
if(unique == "Unique")
unique = TRUE
else
@@ -145,7 +145,7 @@
CHECK_TICK
if (VV_NEW_TYPE)
- var/many = alert(src, "Create only one [value["type"]] and assign each or a new one for each thing", "How Many", "One", "Many", "Cancel")
+ var/many = tgui_alert(usr, "Create only one [value["type"]] and assign each or a new one for each thing", "How Many", list("One", "Many", "Cancel"))
if (many == "Cancel")
return
if (many == "Many")
diff --git a/code/modules/admin/view_variables/modify_variables.dm b/code/modules/admin/view_variables/modify_variables.dm
index 07e85a7177f..b97a76ef064 100644
--- a/code/modules/admin/view_variables/modify_variables.dm
+++ b/code/modules/admin/view_variables/modify_variables.dm
@@ -9,7 +9,7 @@ GLOBAL_PROTECT(VVpixelmovement)
/client/proc/vv_parse_text(O, new_var)
if(O && findtext(new_var,"\["))
- var/process_vars = alert(usr,"\[] detected in string, process as variables?","Process Variables?","Yes","No")
+ var/process_vars = tgui_alert(usr,"\[] detected in string, process as variables?","Process Variables?",list("Yes","No"))
if(process_vars == "Yes")
. = string2listofvars(new_var, O)
@@ -24,7 +24,7 @@ GLOBAL_PROTECT(VVpixelmovement)
if (!subtypes || !subtypes.len)
return FALSE
if (subtypes?.len)
- switch(alert("Strict object type detection?", "Type detection", "Strictly this type","This type and subtypes", "Cancel"))
+ switch(tgui_alert(usr,"Strict object type detection?", "Type detection", list("Strictly this type","This type and subtypes", "Cancel")))
if("Strictly this type")
return FALSE
if("This type and subtypes")
@@ -97,7 +97,7 @@ GLOBAL_PROTECT(VVpixelmovement)
L += var_value
- switch(alert("Would you like to associate a value with the list entry?",,"Yes","No"))
+ switch(tgui_alert(usr,"Would you like to associate a value with the list entry?",,list("Yes","No")))
if("Yes")
L[var_value] = mod_list_add_ass(O) //hehe
if (O)
@@ -116,7 +116,7 @@ GLOBAL_PROTECT(VVpixelmovement)
return
if(L.len > 1000)
- var/confirm = alert(src, "The list you're trying to edit is very long, continuing may crash the server.", "Warning", "Continue", "Abort")
+ var/confirm = tgui_alert(usr, "The list you're trying to edit is very long, continuing may crash the server.", "Warning", list("Continue", "Abort"))
if(confirm != "Continue")
return
@@ -178,7 +178,7 @@ GLOBAL_PROTECT(VVpixelmovement)
if (index == null)
return
var/assoc = 0
- var/prompt = alert(src, "Do you want to edit the key or its assigned value?", "Associated List", "Key", "Assigned Value", "Cancel")
+ var/prompt = tgui_alert(usr, "Do you want to edit the key or its assigned value?", "Associated List", list("Key", "Assigned Value", "Cancel"))
if (prompt == "Cancel")
return
if (prompt == "Assigned Value")
diff --git a/code/modules/admin/view_variables/reference_tracking.dm b/code/modules/admin/view_variables/reference_tracking.dm
index c7129a1ebae..da3bc4dfe4c 100644
--- a/code/modules/admin/view_variables/reference_tracking.dm
+++ b/code/modules/admin/view_variables/reference_tracking.dm
@@ -20,7 +20,7 @@
SSgarbage.next_fire = world.time + world.tick_lag
return
- if(!skip_alert && alert("Running this will lock everything up for about 5 minutes. Would you like to begin the search?", "Find References", "Yes", "No") != "Yes")
+ if(!skip_alert && tgui_alert(usr,"Running this will lock everything up for about 5 minutes. Would you like to begin the search?", "Find References", list("Yes", "No")) != "Yes")
running_find_references = null
return
diff --git a/code/modules/admin/view_variables/topic.dm b/code/modules/admin/view_variables/topic.dm
index 13a378a6047..2a323c4e8e3 100644
--- a/code/modules/admin/view_variables/topic.dm
+++ b/code/modules/admin/view_variables/topic.dm
@@ -32,7 +32,7 @@
// If the new name is something that would be restricted by IC chat filters,
// give the admin a warning but allow them to do it anyway if they want.
- if(CHAT_FILTER_CHECK(new_name) && alert(usr, "Your selected name contains words restricted by IC chat filters. Confirm this new name?", "IC Chat Filter Conflict", "Confirm", "Cancel") == "Cancel")
+ if(CHAT_FILTER_CHECK(new_name) && tgui_alert(usr, "Your selected name contains words restricted by IC chat filters. Confirm this new name?", "IC Chat Filter Conflict", list("Confirm", "Cancel")) == "Cancel")
return
if( !new_name || !M )
@@ -69,7 +69,7 @@
to_chat(usr, "This can only be done to monkeys", confidential = TRUE)
return
- if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform")
+ if(tgui_alert(usr,"Confirm mob type change?",,list("Transform","Cancel")) != "Transform")
return
if(!Mo)
to_chat(usr, "Mob doesn't exist anymore", confidential = TRUE)
diff --git a/code/modules/admin/view_variables/topic_list.dm b/code/modules/admin/view_variables/topic_list.dm
index 6bd99253429..c5dece8139f 100644
--- a/code/modules/admin/view_variables/topic_list.dm
+++ b/code/modules/admin/view_variables/topic_list.dm
@@ -9,7 +9,7 @@
mod_list(target, null, "list", "contents", target_index, autodetect_class = FALSE)
if(href_list[VV_HK_LIST_REMOVE])
var/variable = target[target_index]
- var/prompt = alert("Do you want to remove item number [target_index] from list?", "Confirm", "Yes", "No")
+ var/prompt = tgui_alert(usr,"Do you want to remove item number [target_index] from list?", "Confirm", list("Yes", "No"))
if (prompt != "Yes")
return
target.Cut(target_index, target_index+1)
diff --git a/code/modules/antagonists/abductor/abductor.dm b/code/modules/antagonists/abductor/abductor.dm
index 3d107e6e9b2..a195c98631f 100644
--- a/code/modules/antagonists/abductor/abductor.dm
+++ b/code/modules/antagonists/abductor/abductor.dm
@@ -120,7 +120,7 @@ GLOBAL_LIST_INIT(possible_abductor_names, list("Alpha","Beta","Gamma","Delta","E
to_chat(admin, "This only works on humans!")
return
var/mob/living/carbon/human/H = owner.current
- var/gear = alert(admin,"Agent or Scientist Gear","Gear","Agent","Scientist")
+ var/gear = tgui_alert(admin,"Agent or Scientist Gear","Gear",list("Agent","Scientist"))
if(gear)
if(gear=="Agent")
H.equipOutfit(/datum/outfit/abductor/agent)
diff --git a/code/modules/antagonists/blob/blob_mobs.dm b/code/modules/antagonists/blob/blob_mobs.dm
index becedd94172..d91fc703838 100644
--- a/code/modules/antagonists/blob/blob_mobs.dm
+++ b/code/modules/antagonists/blob/blob_mobs.dm
@@ -145,7 +145,7 @@
return
if(key || stat)
return
- var/pod_ask = alert("Become a blob spore?", "Are you bulbous enough?", "Yes", "No")
+ var/pod_ask = tgui_alert(usr,"Become a blob spore?", "Are you bulbous enough?", list("Yes", "No"))
if(pod_ask == "No" || !src || QDELETED(src))
return
if(key)
diff --git a/code/modules/antagonists/brainwashing/brainwashing.dm b/code/modules/antagonists/brainwashing/brainwashing.dm
index d7389b5324e..4c42894c392 100644
--- a/code/modules/antagonists/brainwashing/brainwashing.dm
+++ b/code/modules/antagonists/brainwashing/brainwashing.dm
@@ -59,9 +59,9 @@
var/objective = stripped_input(admin, "Add an objective, or leave empty to finish.", "Brainwashing", null, MAX_MESSAGE_LEN)
if(objective)
objectives += objective
- while(alert(admin,"Add another objective?","More Brainwashing","Yes","No") == "Yes")
+ while(tgui_alert(admin,"Add another objective?","More Brainwashing",list("Yes","No")) == "Yes")
- if(alert(admin,"Confirm Brainwashing?","Are you sure?","Yes","No") == "No")
+ if(tgui_alert(admin,"Confirm Brainwashing?","Are you sure?",list("Yes","No")) == "No")
return
if(!LAZYLEN(objectives))
diff --git a/code/modules/antagonists/changeling/powers/fakedeath.dm b/code/modules/antagonists/changeling/powers/fakedeath.dm
index 9a93e759c7c..7bf4a48ebb8 100644
--- a/code/modules/antagonists/changeling/powers/fakedeath.dm
+++ b/code/modules/antagonists/changeling/powers/fakedeath.dm
@@ -63,7 +63,7 @@
to_chat(user, "We are already reviving.")
return
if(!user.stat && !revive_ready) //Confirmation for living changelings if they want to fake their death
- switch(alert("Are we sure we wish to fake our own death?",,"Yes", "No"))
+ switch(tgui_alert(usr,"Are we sure we wish to fake our own death?",,list("Yes", "No")))
if("No")
return
return ..()
diff --git a/code/modules/antagonists/changeling/powers/headcrab.dm b/code/modules/antagonists/changeling/powers/headcrab.dm
index 855fa4dc572..b25abdbd287 100644
--- a/code/modules/antagonists/changeling/powers/headcrab.dm
+++ b/code/modules/antagonists/changeling/powers/headcrab.dm
@@ -9,7 +9,7 @@
/datum/action/changeling/headcrab/sting_action(mob/living/user)
set waitfor = FALSE
- if(alert("Are we sure we wish to kill ourself and create a headslug?",,"Yes", "No") == "No")
+ if(tgui_alert(usr,"Are we sure we wish to kill ourself and create a headslug?",,list("Yes", "No")) == "No")
return
..()
var/datum/mind/M = user.mind
diff --git a/code/modules/antagonists/cult/cult_comms.dm b/code/modules/antagonists/cult/cult_comms.dm
index 8d853a83732..a87190b30c9 100644
--- a/code/modules/antagonists/cult/cult_comms.dm
+++ b/code/modules/antagonists/cult/cult_comms.dm
@@ -81,7 +81,7 @@
return ..()
/datum/action/innate/cult/mastervote/Activate()
- var/choice = alert(owner, "The mantle of leadership is heavy. Success in this role requires an expert level of communication and experience. Are you sure?",, "Yes", "No")
+ var/choice = tgui_alert(owner, "The mantle of leadership is heavy. Success in this role requires an expert level of communication and experience. Are you sure?",, list("Yes", "No"))
if(choice == "Yes" && IsAvailable())
var/datum/antagonist/cult/C = owner.mind.has_antag_datum(/datum/antagonist/cult,TRUE)
pollCultists(owner,C.cult_team)
diff --git a/code/modules/antagonists/cult/ritual.dm b/code/modules/antagonists/cult/ritual.dm
index e670e52e8c6..a3f6f454b84 100644
--- a/code/modules/antagonists/cult/ritual.dm
+++ b/code/modules/antagonists/cult/ritual.dm
@@ -111,7 +111,7 @@ This file contains the cult dagger and rune list code
if(!(A in summon_objective.summon_spots))
to_chat(user, "The Geometer can only be summoned where the veil is weak - in [english_list(summon_objective.summon_spots)]!")
return
- var/confirm_final = alert(user, "This is the FINAL step to summon Nar'Sie; it is a long, painful ritual and the crew will be alerted to your presence", "Are you prepared for the final battle?", "My life for Nar'Sie!", "No")
+ var/confirm_final = tgui_alert(user, "This is the FINAL step to summon Nar'Sie; it is a long, painful ritual and the crew will be alerted to your presence", "Are you prepared for the final battle?", list("My life for Nar'Sie!", "No"))
if(confirm_final == "No")
to_chat(user, "You decide to prepare further before scribing the rune.")
return
diff --git a/code/modules/antagonists/cult/runes.dm b/code/modules/antagonists/cult/runes.dm
index e12147e29f2..5a80d38c279 100644
--- a/code/modules/antagonists/cult/runes.dm
+++ b/code/modules/antagonists/cult/runes.dm
@@ -60,7 +60,7 @@ Runes can either be invoked by one's self or with many different cultists. Each
/obj/effect/rune/attackby(obj/I, mob/user, params)
if(istype(I, /obj/item/melee/cultblade/dagger) && IS_CULTIST(user))
if(log_when_erased)
- var/confirm = alert(user, "Erasing this [cultist_name] rune might be against your goal to summon Nar'Sie.", "Begin to erase the [cultist_name] rune?", "Proceed", "Abort")
+ var/confirm = tgui_alert(user, "Erasing this [cultist_name] rune might be against your goal to summon Nar'Sie.", "Begin to erase the [cultist_name] rune?", list("Proceed", "Abort"))
if(confirm != "Proceed")
return
if(!user.is_holding_item_of_type(/obj/item/melee/cultblade/dagger) || !Adjacent(user) || user.incapacitated() || user.stat == DEAD) //Gee, good thing we made sure cultists can't input stall to grief their team and get banned anyway
@@ -781,7 +781,7 @@ structure_check() searches for nearby cultist structures required for the invoca
. = ..()
var/mob/living/user = invokers[1]
var/turf/T = get_turf(src)
- var/choice = alert(user,"You tear open a connection to the spirit realm...",,"Summon a Cult Ghost","Ascend as a Dark Spirit","Cancel")
+ var/choice = tgui_alert(user,"You tear open a connection to the spirit realm...",,list("Summon a Cult Ghost","Ascend as a Dark Spirit","Cancel"))
if(choice == "Summon a Cult Ghost")
if(!is_station_level(T.z))
to_chat(user, "The veil is not weak enough here to manifest spirits, you must be on station!")
diff --git a/code/modules/antagonists/disease/disease_mob.dm b/code/modules/antagonists/disease/disease_mob.dm
index cae8cec3157..35d2a445029 100644
--- a/code/modules/antagonists/disease/disease_mob.dm
+++ b/code/modules/antagonists/disease/disease_mob.dm
@@ -308,7 +308,7 @@ the new instance inside the host to be updated to the template's stats.
/mob/camera/disease/ClickOn(atom/A, params)
if(freemove && ishuman(A))
var/mob/living/carbon/human/H = A
- if(alert(src, "Select [H.name] as your initial host?", "Select Host", "Yes", "No") != "Yes")
+ if(tgui_alert(usr, "Select [H.name] as your initial host?", "Select Host", list("Yes", "No")) != "Yes")
return
if(!freemove)
return
diff --git a/code/modules/antagonists/monkey/monkey.dm b/code/modules/antagonists/monkey/monkey.dm
index 4374c78d26c..f52c1fc2cc2 100644
--- a/code/modules/antagonists/monkey/monkey.dm
+++ b/code/modules/antagonists/monkey/monkey.dm
@@ -77,7 +77,7 @@
/datum/antagonist/monkey/admin_remove(mob/admin)
var/mob/living/carbon/human/M = owner.current
if(ismonkey(M))
- switch(alert(admin, "Humanize?", "Humanize", "Yes", "No"))
+ switch(tgui_alert(admin, "Humanize?", "Humanize", list("Yes", "No")))
if("Yes")
if(admin == M)
admin = M.humanize()
@@ -96,7 +96,7 @@
/datum/antagonist/monkey/leader/admin_add(datum/mind/new_owner,mob/admin)
var/mob/living/carbon/human/H = new_owner.current
if(istype(H))
- switch(alert(admin, "Monkeyize?", "Monkeyize", "Yes", "No"))
+ switch(tgui_alert(admin, "Monkeyize?", "Monkeyize", list("Yes", "No")))
if("Yes")
if(admin == H)
admin = H.monkeyize()
diff --git a/code/modules/antagonists/nukeop/equipment/nuclear_challenge.dm b/code/modules/antagonists/nukeop/equipment/nuclear_challenge.dm
index a74e111fad2..e1902f551a5 100644
--- a/code/modules/antagonists/nukeop/equipment/nuclear_challenge.dm
+++ b/code/modules/antagonists/nukeop/equipment/nuclear_challenge.dm
@@ -23,7 +23,7 @@ GLOBAL_LIST_EMPTY(jam_on_wardec)
return
declaring_war = TRUE
- var/are_you_sure = alert(user, "Consult your team carefully before you declare war on [station_name()]]. Are you sure you want to alert the enemy crew? You have [DisplayTimeText(world.time-SSticker.round_start_time - CHALLENGE_TIME_LIMIT)] to decide", "Declare war?", "Yes", "No")
+ var/are_you_sure = tgui_alert(user, "Consult your team carefully before you declare war on [station_name()]]. Are you sure you want to alert the enemy crew? You have [DisplayTimeText(world.time-SSticker.round_start_time - CHALLENGE_TIME_LIMIT)] to decide", "Declare war?", list("Yes", "No"))
declaring_war = FALSE
if(!check_allowed(user))
@@ -36,7 +36,7 @@ GLOBAL_LIST_EMPTY(jam_on_wardec)
var/war_declaration = "A syndicate fringe group has declared their intent to utterly destroy [station_name()] with a nuclear device, and dares the crew to try and stop them."
declaring_war = TRUE
- var/custom_threat = alert(user, "Do you want to customize your declaration?", "Customize?", "Yes", "No")
+ var/custom_threat = tgui_alert(user, "Do you want to customize your declaration?", "Customize?", list("Yes", "No"))
declaring_war = FALSE
if(!check_allowed(user))
@@ -70,14 +70,14 @@ GLOBAL_LIST_EMPTY(jam_on_wardec)
///Admin only proc to bypass checks and force a war declaration. Button on antag panel.
/obj/item/nuclear_challenge/proc/force_war()
- var/are_you_sure = alert(usr, "Are you sure you wish to force a war declaration?", "Declare war?", "Yes", "No")
+ var/are_you_sure = tgui_alert(usr, "Are you sure you wish to force a war declaration?", "Declare war?", list("Yes", "No"))
if(are_you_sure != "Yes")
return
var/war_declaration = "A syndicate fringe group has declared their intent to utterly destroy [station_name()] with a nuclear device, and dares the crew to try and stop them."
- var/custom_threat = alert(usr, "Do you want to customize the declaration?", "Customize?", "Yes", "No")
+ var/custom_threat = tgui_alert(usr, "Do you want to customize the declaration?", "Customize?", list("Yes", "No"))
if(custom_threat == "Yes")
war_declaration = stripped_input(usr, "Insert your custom declaration", "Declaration")
diff --git a/code/modules/antagonists/traitor/equipment/Malf_Modules.dm b/code/modules/antagonists/traitor/equipment/Malf_Modules.dm
index d26bd32f60e..d0904f26d77 100644
--- a/code/modules/antagonists/traitor/equipment/Malf_Modules.dm
+++ b/code/modules/antagonists/traitor/equipment/Malf_Modules.dm
@@ -192,7 +192,7 @@ GLOBAL_LIST_INIT(malf_modules, subtypesof(/datum/ai_module))
if(!istype(T) || !is_station_level(T.z))
to_chat(owner, "You cannot activate the doomsday device while off-station!")
return
- if(alert(owner, "Send arming signal? (true = arm, false = cancel)", "purge_all_life()", "confirm = TRUE;", "confirm = FALSE;") != "confirm = TRUE;")
+ if(tgui_alert(owner, "Send arming signal? (true = arm, false = cancel)", "purge_all_life()", list("confirm = TRUE;", "confirm = FALSE;")) != "confirm = TRUE;")
return
if (active || owner_AI.stat == DEAD)
return //prevent the AI from activating an already active doomsday or while they are dead
@@ -609,7 +609,7 @@ GLOBAL_LIST_INIT(malf_modules, subtypesof(/datum/ai_module))
if(!owner_AI.can_place_transformer(src))
return
active = TRUE
- if(alert(owner, "Are you sure you want to place the machine here?", "Are you sure?", "Yes", "No") == "No")
+ if(tgui_alert(owner, "Are you sure you want to place the machine here?", "Are you sure?", list("Yes", "No")) == "No")
active = FALSE
return
if(!owner_AI.can_place_transformer(src))
diff --git a/code/modules/assembly/holder.dm b/code/modules/assembly/holder.dm
index 04a038174d2..393569a5c62 100644
--- a/code/modules/assembly/holder.dm
+++ b/code/modules/assembly/holder.dm
@@ -119,7 +119,7 @@
to_chat(user, "Assembly part missing!")
return
if(istype(a_left,a_right.type))//If they are the same type it causes issues due to window code
- switch(alert("Which side would you like to use?",,"Left","Right"))
+ switch(tgui_alert(usr,"Which side would you like to use?",,list("Left","Right")))
if("Left")
a_left.attack_self(user)
if("Right")
diff --git a/code/modules/awaymissions/corpse.dm b/code/modules/awaymissions/corpse.dm
index abc8a99babf..f85510a5290 100644
--- a/code/modules/awaymissions/corpse.dm
+++ b/code/modules/awaymissions/corpse.dm
@@ -40,7 +40,7 @@
/obj/effect/mob_spawn/attack_ghost(mob/user)
if(!SSticker.HasRoundStarted() || !loc || !ghost_usable)
return
- var/ghost_role = alert("Become [mob_name]? (Warning, You can no longer be revived!)",,"Yes","No")
+ var/ghost_role = tgui_alert(usr,"Become [mob_name]? (Warning, You can no longer be revived!)",,list("Yes","No"))
if(ghost_role == "No" || !loc || QDELETED(user))
return
if(!(GLOB.ghost_role_flags & GHOSTROLE_SPAWNER) && !(flags_1 & ADMIN_SPAWNED_1))
diff --git a/code/modules/awaymissions/signpost.dm b/code/modules/awaymissions/signpost.dm
index a0b2a1d8112..d27630eb7d6 100644
--- a/code/modules/awaymissions/signpost.dm
+++ b/code/modules/awaymissions/signpost.dm
@@ -16,7 +16,7 @@
. = ..()
if(.)
return
- if(alert(question,name,"Yes","No") == "Yes" && Adjacent(user))
+ if(tgui_alert(usr,question,name,list("Yes","No")) == "Yes" && Adjacent(user))
var/turf/T = find_safe_turf(zlevels=zlevels)
if(T)
diff --git a/code/modules/buildmode/submodes/advanced.dm b/code/modules/buildmode/submodes/advanced.dm
index 1dbc5fbb348..02735485061 100644
--- a/code/modules/buildmode/submodes/advanced.dm
+++ b/code/modules/buildmode/submodes/advanced.dm
@@ -22,11 +22,11 @@
if(!ispath(objholder))
objholder = pick_closest_path(target_path)
if(!objholder)
- alert("No path was selected")
+ tgui_alert(usr,"No path was selected")
return
else if(ispath(objholder, /area))
objholder = null
- alert("That path is not allowed.")
+ tgui_alert(usr,"That path is not allowed.")
return
/datum/buildmode_mode/advanced/handle_click(client/c, params, obj/object)
diff --git a/code/modules/buildmode/submodes/delete.dm b/code/modules/buildmode/submodes/delete.dm
index 8a4129fc40f..05de87cc460 100644
--- a/code/modules/buildmode/submodes/delete.dm
+++ b/code/modules/buildmode/submodes/delete.dm
@@ -22,14 +22,14 @@
if(isturf(object))
return
var/atom/deleting = object
- var/action_type = alert("Strict type ([deleting.type]) or type and all subtypes?",,"Strict type","Type and subtypes","Cancel")
+ var/action_type = tgui_alert(usr,"Strict type ([deleting.type]) or type and all subtypes?",,list("Strict type","Type and subtypes","Cancel"))
if(action_type == "Cancel" || !action_type)
return
- if(alert("Are you really sure you want to delete all instances of type [deleting.type]?",,"Yes","No") != "Yes")
+ if(tgui_alert(usr,"Are you really sure you want to delete all instances of type [deleting.type]?",,list("Yes","No")) != "Yes")
return
- if(alert("Second confirmation required. Delete?",,"Yes","No") != "Yes")
+ if(tgui_alert(usr,"Second confirmation required. Delete?",,list("Yes","No")) != "Yes")
return
var/O_type = deleting.type
diff --git a/code/modules/buildmode/submodes/fill.dm b/code/modules/buildmode/submodes/fill.dm
index f2d37cdfcd5..747bc6ac463 100644
--- a/code/modules/buildmode/submodes/fill.dm
+++ b/code/modules/buildmode/submodes/fill.dm
@@ -19,11 +19,11 @@
if(!ispath(objholder))
objholder = pick_closest_path(target_path)
if(!objholder)
- alert("No path has been selected.")
+ tgui_alert(usr,"No path has been selected.")
return
else if(ispath(objholder, /area))
objholder = null
- alert("Area paths are not supported for this mode, use the area edit mode instead.")
+ tgui_alert(usr,"Area paths are not supported for this mode, use the area edit mode instead.")
return
deselect_region()
@@ -56,7 +56,7 @@
var/selection_size = abs(cornerA.x - cornerB.x) * abs(cornerA.y - cornerB.y)
if(selection_size > FILL_WARNING_MIN) // Confirm fill if the number of tiles in the selection is greater than FILL_WARNING_MIN
- var/choice = alert("Your selected area is [selection_size] tiles! Continue?", "Large Fill Confirmation", "Yes", "No")
+ var/choice = tgui_alert(usr,"Your selected area is [selection_size] tiles! Continue?", "Large Fill Confirmation", list("Yes", "No"))
if(choice != "Yes")
return
diff --git a/code/modules/buildmode/submodes/mapgen.dm b/code/modules/buildmode/submodes/mapgen.dm
index 60aad0f088d..475afb5b5a0 100644
--- a/code/modules/buildmode/submodes/mapgen.dm
+++ b/code/modules/buildmode/submodes/mapgen.dm
@@ -32,7 +32,7 @@
/datum/buildmode_mode/mapgen/handle_selected_area(client/c, params)
var/list/modifiers = params2list(params)
-
+
if(LAZYACCESS(modifiers, LEFT_CLICK))
var/datum/map_generator/G = new generator_path
if(istype(G, /datum/map_generator/repair/reload_station_map))
@@ -42,7 +42,7 @@
return
G.defineRegion(cornerA, cornerB, 1)
highlight_region(G.map)
- var/confirm = alert("Are you sure you want to run the map generator?", "Run generator", "Yes", "No")
+ var/confirm = tgui_alert(usr,"Are you sure you want to run the map generator?", "Run generator", list("Yes", "No"))
if(confirm == "Yes")
G.generate()
log_admin("Build Mode: [key_name(c)] ran the map generator '[G.buildmode_name]' in the region from [AREACOORD(cornerA)] to [AREACOORD(cornerB)]")
diff --git a/code/modules/capture_the_flag/capture_the_flag.dm b/code/modules/capture_the_flag/capture_the_flag.dm
index 4e9805d58d5..dae361b3ef6 100644
--- a/code/modules/capture_the_flag/capture_the_flag.dm
+++ b/code/modules/capture_the_flag/capture_the_flag.dm
@@ -279,7 +279,7 @@
/obj/machinery/capture_the_flag/attack_ghost(mob/user)
if(ctf_enabled == FALSE)
if(user.client && user.client.holder)
- var/response = alert("Enable this CTF game?", "CTF", "Yes", "No")
+ var/response = tgui_alert(usr,"Enable this CTF game?", "CTF", list("Yes", "No"))
if(response == "Yes")
toggle_id_ctf(user, game_id)
return
@@ -360,7 +360,7 @@
else //2-3 choices
var/list/names_only = assoc_list_strip_value(ctf_gear)
names_only.len += 1 //create a new null entry so if it's a 2-sized list, names_only[3] is null instead of out of bounds
- var/result = alert(new_team_member, "Select a class.", "CTF", names_only[1], names_only[2], names_only[3])
+ var/result = tgui_alert(new_team_member, "Select a class.", "CTF", list(names_only[1], names_only[2], names_only[3]))
if(!result || !(GLOB.ghost_role_flags & GHOSTROLE_MINIGAME) || (new_team_member.ckey in recently_dead_ckeys) || !isobserver(new_team_member.mob))
return //picked nothing, admin disabled it, cheating to respawn faster, cheating to respawn... while in game?
chosen_class = ctf_gear[result]
diff --git a/code/modules/cargo/centcom_podlauncher.dm b/code/modules/cargo/centcom_podlauncher.dm
index 3fe9eb80f2c..d3d7d8f7521 100644
--- a/code/modules/cargo/centcom_podlauncher.dm
+++ b/code/modules/cargo/centcom_podlauncher.dm
@@ -288,7 +288,7 @@
if (isnull(boomInput[i]))
return
if (!isnum(boomInput[i])) //If the user doesn't input a number, set that specific explosion value to zero
- alert(usr, "That wasn't a number! Value set to default (zero) instead.")
+ tgui_alert(usr, "That wasn't a number! Value set to default (zero) instead.")
boomInput = 0
explosionChoice = 1
temp_pod.explosionSize = boomInput
@@ -310,7 +310,7 @@
if (isnull(damageInput))
return
if (!isnum(damageInput)) //Sanitize the input for damage to deal.s
- alert(usr, "That wasn't a number! Value set to default (zero) instead.")
+ tgui_alert(usr, "That wasn't a number! Value set to default (zero) instead.")
damageInput = 0
damageChoice = 1
temp_pod.damage = damageInput
@@ -351,7 +351,7 @@
if (isnull(shrapnelMagnitude))
return
if (!isnum(shrapnelMagnitude))
- alert(usr, "That wasn't a number! Value set to 3 instead.")
+ tgui_alert(usr, "That wasn't a number! Value set to 3 instead.")
shrapnelMagnitude = 3
temp_pod.shrapnel_type = shrapnelInput
temp_pod.shrapnel_magnitude = shrapnelMagnitude
@@ -452,7 +452,7 @@
if (isnull(soundLen))
return
if (!isnum(soundLen))
- alert(usr, "That wasn't a number! Value set to default ([initial(temp_pod.fallingSoundLength)*0.1]) instead.")
+ tgui_alert(usr, "That wasn't a number! Value set to default ([initial(temp_pod.fallingSoundLength)*0.1]) instead.")
temp_pod.fallingSound = soundInput
temp_pod.fallingSoundLength = 10 * soundLen
. = TRUE
@@ -521,7 +521,7 @@
updateSelector()
. = TRUE
if("clearBay") //Delete all mobs and objs in the selected bay
- if(alert(usr, "This will delete all objs and mobs in [bay]. Are you sure?", "Confirmation", "Delete that shit", "No") == "Delete that shit")
+ if(tgui_alert(usr, "This will delete all objs and mobs in [bay]. Are you sure?", "Confirmation", list("Delete that shit", "No")) == "Delete that shit")
clearBay()
refreshBay()
. = TRUE
diff --git a/code/modules/client/client_procs.dm b/code/modules/client/client_procs.dm
index e4f7a7eba6d..6b8ae2ea237 100644
--- a/code/modules/client/client_procs.dm
+++ b/code/modules/client/client_procs.dm
@@ -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
diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm
index d708bbc2ba7..6366421e357 100644
--- a/code/modules/client/preferences.dm
+++ b/code/modules/client/preferences.dm
@@ -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
diff --git a/code/modules/client/preferences_toggles.dm b/code/modules/client/preferences_toggles.dm
index 122a1183144..c0e8dd5d8eb 100644
--- a/code/modules/client/preferences_toggles.dm
+++ b/code/modules/client/preferences_toggles.dm
@@ -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")
diff --git a/code/modules/client/verbs/ooc.dm b/code/modules/client/verbs/ooc.dm
index 739a9e332a2..7c45078d42c 100644
--- a/code/modules/client/verbs/ooc.dm
+++ b/code/modules/client/verbs/ooc.dm
@@ -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!")
diff --git a/code/modules/client/verbs/suicide.dm b/code/modules/client/verbs/suicide.dm
index 79882c81cb0..583e44a6c5b 100644
--- a/code/modules/client/verbs/suicide.dm
+++ b/code/modules/client/verbs/suicide.dm
@@ -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("[src] flashes a message across its screen, \"Wiping core files. Please acquire a new personality to continue using pAI device functions.\"", 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")
diff --git a/code/modules/events/immovable_rod.dm b/code/modules/events/immovable_rod.dm
index 5ea74019772..926c248d396 100644
--- a/code/modules/events/immovable_rod.dm
+++ b/code/modules/events/immovable_rod.dm
@@ -19,10 +19,10 @@ In my current plan for it, 'solid' will be defined as anything with density == 1
if(!check_rights(R_FUN))
return
- var/aimed = alert("Aimed at current location?", "Sniperod", "Yes", "No")
+ var/aimed = tgui_alert(usr,"Aimed at current location?", "Sniperod", list("Yes", "No"))
if(aimed == "Yes")
special_target = get_turf(usr)
- var/looper = alert("Would you like this rod to force-loop across space z-levels?", "Loopy McLoopface", "Yes", "No")
+ var/looper = tgui_alert(usr,"Would you like this rod to force-loop across space z-levels?", "Loopy McLoopface", list("Yes", "No"))
if(looper == "Yes")
force_looping = TRUE
message_admins("[key_name_admin(usr)] has aimed an immovable rod [force_looping ? "(forced looping)" : ""] at [AREACOORD(special_target)].")
diff --git a/code/modules/events/pirates.dm b/code/modules/events/pirates.dm
index 880560e7bc0..9f5405be70d 100644
--- a/code/modules/events/pirates.dm
+++ b/code/modules/events/pirates.dm
@@ -157,7 +157,7 @@
/obj/machinery/shuttle_scrambler/interact(mob/user)
if(!active)
- if(alert(user, "Turning the scrambler on will make the shuttle trackable by GPS. Are you sure you want to do it?", "Scrambler", "Yes", "Cancel") == "Cancel")
+ if(tgui_alert(user, "Turning the scrambler on will make the shuttle trackable by GPS. Are you sure you want to do it?", "Scrambler", list("Yes", "Cancel")) == "Cancel")
return
if(active || !user.canUseTopic(src, BE_CLOSE))
return
diff --git a/code/modules/events/spacevine.dm b/code/modules/events/spacevine.dm
index 3cc3a413352..5140e8942db 100644
--- a/code/modules/events/spacevine.dm
+++ b/code/modules/events/spacevine.dm
@@ -451,7 +451,7 @@
/datum/spacevine_controller/vv_do_topic(href_list)
. = ..()
if(href_list[VV_HK_SPACEVINE_PURGE])
- if(alert(usr, "Are you sure you want to delete this spacevine cluster?", "Delete Vines", "Yes", "No") == "Yes")
+ if(tgui_alert(usr, "Are you sure you want to delete this spacevine cluster?", "Delete Vines", list("Yes", "No")) == "Yes")
DeleteVines()
/datum/spacevine_controller/proc/DeleteVines() //this is kill
diff --git a/code/modules/events/wizard/departmentrevolt.dm b/code/modules/events/wizard/departmentrevolt.dm
index 063657b50ca..3f05aba548b 100644
--- a/code/modules/events/wizard/departmentrevolt.dm
+++ b/code/modules/events/wizard/departmentrevolt.dm
@@ -15,11 +15,11 @@
var/list/options = list("Random", "Uprising of Assistants", "Medical", "Engineering", "Science", "Supply", "Service", "Security")
picked_department = input(usr,"Which department should revolt?","Select a department") as null|anything in options
- var/announce_question = alert(usr, "Announce This New Independent State?", "Secession", "Announce", "No Announcement")
+ var/announce_question = tgui_alert(usr, "Announce This New Independent State?", "Secession", list("Announce", "No Announcement"))
if(announce_question == "Announce")
announce = TRUE
- var/dangerous_question = alert(usr, "Dangerous Nation? This means they will fight other nations.", "Conquest", "Yes", "No")
+ var/dangerous_question = tgui_alert(usr, "Dangerous Nation? This means they will fight other nations.", "Conquest", list("Yes", "No"))
if(dangerous_question == "No")
dangerous_nation = FALSE
diff --git a/code/modules/hydroponics/beekeeping/beebox.dm b/code/modules/hydroponics/beekeeping/beebox.dm
index cd1d16948e8..14e20fbecc8 100644
--- a/code/modules/hydroponics/beekeeping/beebox.dm
+++ b/code/modules/hydroponics/beekeeping/beebox.dm
@@ -213,7 +213,7 @@
else
visible_message("[user] disturbs the [name] to no effect!")
else
- var/option = alert(user, "What action do you wish to perform?","Apiary","Remove a Honey Frame","Remove the Queen Bee", "Cancel")
+ var/option = tgui_alert(user, "What action do you wish to perform?","Apiary",list("Remove a Honey Frame","Remove the Queen Bee", "Cancel"))
if(!Adjacent(user))
return
switch(option)
diff --git a/code/modules/hydroponics/grown/replicapod.dm b/code/modules/hydroponics/grown/replicapod.dm
index 230ef074779..e4af248fa03 100644
--- a/code/modules/hydroponics/grown/replicapod.dm
+++ b/code/modules/hydroponics/grown/replicapod.dm
@@ -122,7 +122,7 @@
if(!make_podman)
// Prevent accidental harvesting. Make sure the user REALLY wants to do this if there's a chance of this coming from a living creature.
if(mind || ckey)
- var/choice = alert("The pod is currently devoid of soul. There is a possibility that a soul could claim this creature, or you could harvest it for seeds.", "Harvest Seeds?", "Harvest Seeds", "Cancel")
+ var/choice = tgui_alert(usr,"The pod is currently devoid of soul. There is a possibility that a soul could claim this creature, or you could harvest it for seeds.", "Harvest Seeds?", list("Harvest Seeds", "Cancel"))
if(choice == "Cancel")
return result
diff --git a/code/modules/hydroponics/hydroponics.dm b/code/modules/hydroponics/hydroponics.dm
index 69169a35758..d3b52c026a8 100644
--- a/code/modules/hydroponics/hydroponics.dm
+++ b/code/modules/hydroponics/hydroponics.dm
@@ -780,7 +780,7 @@
if(!anchored)
update_appearance()
return FALSE
- var/warning = alert(user, "Are you sure you wish to empty the tray's nutrient beaker?","Empty Tray Nutrients?", "Yes", "No")
+ var/warning = tgui_alert(user, "Are you sure you wish to empty the tray's nutrient beaker?","Empty Tray Nutrients?", list("Yes", "No"))
if(warning == "Yes" && user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
reagents.clear_reagents()
to_chat(user, "You empty [src]'s nutrient tank.")
diff --git a/code/modules/hydroponics/seeds.dm b/code/modules/hydroponics/seeds.dm
index 0bfa2c3a4f8..e19dd28db27 100644
--- a/code/modules/hydroponics/seeds.dm
+++ b/code/modules/hydroponics/seeds.dm
@@ -505,7 +505,7 @@
/obj/item/seeds/attackby(obj/item/O, mob/user, params)
if(istype(O, /obj/item/pen))
- var/choice = input("What would you like to change?") in list("Plant Name", "Seed Description", "Product Description", "Cancel")
+ var/choice = tgui_input_list(usr, "What would you like to change?",, list("Plant Name", "Seed Description", "Product Description", "Cancel"))
if(!user.canUseTopic(src, BE_CLOSE))
return
switch(choice)
diff --git a/code/modules/language/language_menu.dm b/code/modules/language/language_menu.dm
index 4e0e1299ef4..cb8b4d49146 100644
--- a/code/modules/language/language_menu.dm
+++ b/code/modules/language/language_menu.dm
@@ -97,7 +97,7 @@
spoken = TRUE
understood = TRUE
if(language_holder.blocked_languages && language_holder.blocked_languages[language_datum])
- choice = alert(user, "Do you want to lift the blockage that's also preventing the language to be spoken or understood?", "[language_datum]", "Yes", "No")
+ choice = tgui_alert(user, "Do you want to lift the blockage that's also preventing the language to be spoken or understood?", "[language_datum]", list("Yes", "No"))
if(choice == "Yes")
language_holder.remove_blocked_language(language_datum, LANGUAGE_ALL)
language_holder.grant_language(language_datum, understood, spoken)
diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm
index b6e1b86e321..7229f78445c 100644
--- a/code/modules/library/lib_items.dm
+++ b/code/modules/library/lib_items.dm
@@ -250,7 +250,7 @@
if(!literate)
to_chat(user, "You scribble illegibly on the cover of [src]!")
return
- var/choice = input("What would you like to change?") in list("Title", "Contents", "Author", "Cancel")
+ var/choice = tgui_input_list(usr, "What would you like to change?",,list("Title", "Contents", "Author", "Cancel"))
if(!user.canUseTopic(src, BE_CLOSE, literate))
return
switch(choice)
diff --git a/code/modules/library/lib_machines.dm b/code/modules/library/lib_machines.dm
index 92f56aefaf0..5cc077e0247 100644
--- a/code/modules/library/lib_machines.dm
+++ b/code/modules/library/lib_machines.dm
@@ -120,7 +120,7 @@
else
title = null
if(href_list["setcategory"])
- var/newcategory = input("Choose a category to search for:") in list("Any", "Fiction", "Non-Fiction", "Adult", "Reference", "Religion")
+ var/newcategory = tgui_input_list(usr, "Choose a category to search for:",, list("Any", "Fiction", "Non-Fiction", "Adult", "Reference", "Religion"))
if(newcategory)
category = sanitize(newcategory)
else
@@ -413,16 +413,16 @@
if(newauthor)
scanner.cache.author = newauthor
if(href_list["setcategory"])
- var/newcategory = input("Choose a category: ") in list("Fiction", "Non-Fiction", "Adult", "Reference", "Religion","Technical")
+ var/newcategory = tgui_input_list(usr, "Choose a category: ",, list("Fiction", "Non-Fiction", "Adult", "Reference", "Religion","Technical"))
if(newcategory)
upload_category = newcategory
if(href_list["upload"])
if(scanner)
if(scanner.cache)
- var/choice = input("Are you certain you wish to upload this title to the Archive?") in list("Confirm", "Abort")
+ var/choice = tgui_alert(usr, "Are you certain you wish to upload this title to the Archive?",, list("Confirm", "Abort"))
if(choice == "Confirm")
if (!SSdbcore.Connect())
- alert("Connection to Archive has been severed. Aborting.")
+ tgui_alert(usr,"Connection to Archive has been severed. Aborting.")
else
var/msg = "[key_name(usr)] has uploaded the book titled [scanner.cache.name], [length(scanner.cache.dat)] signs"
var/datum/db_query/query_library_upload = SSdbcore.NewQuery({"
@@ -431,15 +431,15 @@
"}, list("title" = scanner.cache.name, "author" = scanner.cache.author, "content" = scanner.cache.dat, "category" = upload_category, "ckey" = usr.ckey, "round_id" = GLOB.round_id))
if(!query_library_upload.Execute())
qdel(query_library_upload)
- alert("Database error encountered uploading to Archive")
+ tgui_alert(usr,"Database error encountered uploading to Archive")
return
else
log_game(msg)
qdel(query_library_upload)
- alert("Upload Complete. Uploaded title will be unavailable for printing for a short period")
+ tgui_alert(usr,"Upload Complete. Uploaded title will be unavailable for printing for a short period")
if(href_list["newspost"])
if(!GLOB.news_network)
- alert("No news network found on station. Aborting.")
+ tgui_alert(usr,"No news network found on station. Aborting.")
var/channelexists = 0
for(var/datum/newscaster/feed_channel/FC in GLOB.news_network.network_channels)
if(FC.channel_name == "Nanotrasen Book Club")
@@ -448,7 +448,7 @@
if(!channelexists)
GLOB.news_network.CreateFeedChannel("Nanotrasen Book Club", "Library", null)
GLOB.news_network.SubmitArticle(scanner.cache.dat, "[scanner.cache.name]", "Nanotrasen Book Club", null)
- alert("Upload complete. Your uploaded title is now available on station newscasters.")
+ tgui_alert(usr,"Upload complete. Your uploaded title is now available on station newscasters.")
if(href_list["orderbyid"])
if(printer_cooldown > world.time)
say("Printer unavailable. Please allow a short time before attempting to print.")
@@ -461,7 +461,7 @@
if(href_list["targetid"])
var/id = href_list["targetid"]
if (!SSdbcore.Connect())
- alert("Connection to Archive has been severed. Aborting.")
+ tgui_alert(usr,"Connection to Archive has been severed. Aborting.")
if(printer_cooldown > world.time)
say("Printer unavailable. Please allow a short time before attempting to print.")
else
diff --git a/code/modules/library/soapstone.dm b/code/modules/library/soapstone.dm
index 449b74aabd0..b0803a16494 100644
--- a/code/modules/library/soapstone.dm
+++ b/code/modules/library/soapstone.dm
@@ -272,7 +272,7 @@ but only permanently removed with the curator's soapstone.
if("delete")
if(!is_admin)
return
- var/confirm = alert(user, "Confirm deletion of engraved message?", "Confirm Deletion", "Yes", "No")
+ var/confirm = tgui_alert(user, "Confirm deletion of engraved message?", "Confirm Deletion", list("Yes", "No"))
if(confirm == "Yes")
persists = FALSE
qdel(src)
diff --git a/code/modules/mob/dead/dead.dm b/code/modules/mob/dead/dead.dm
index 14592d9ebf4..3cb8210a400 100644
--- a/code/modules/mob/dead/dead.dm
+++ b/code/modules/mob/dead/dead.dm
@@ -75,7 +75,7 @@ INITIALIZE_IMMEDIATE(/mob/dead)
var/addr = csa[pick]
- if(alert(src, "Jump to server [pick] ([addr])?", "Server Hop", "Yes", "No") != "Yes")
+ if(tgui_alert(usr, "Jump to server [pick] ([addr])?", "Server Hop", list("Yes", "No")) != "Yes")
return
var/client/C = client
diff --git a/code/modules/mob/dead/new_player/new_player.dm b/code/modules/mob/dead/new_player/new_player.dm
index fb50d80e502..63edf46c39e 100644
--- a/code/modules/mob/dead/new_player/new_player.dm
+++ b/code/modules/mob/dead/new_player/new_player.dm
@@ -214,7 +214,7 @@
ready = PLAYER_NOT_READY
return FALSE
- var/this_is_like_playing_right = alert(src,"Are you sure you wish to observe? You will not be able to play this round!","Player Setup","Yes","No")
+ var/this_is_like_playing_right = tgui_alert(usr, "Are you sure you wish to observe? You will not be able to play this round!","Player Setup",list("Yes","No"))
if(QDELETED(src) || !src.client || this_is_like_playing_right != "Yes")
ready = PLAYER_NOT_READY
@@ -292,18 +292,18 @@
/mob/dead/new_player/proc/AttemptLateSpawn(rank)
var/error = IsJobUnavailable(rank)
if(error != JOB_AVAILABLE)
- alert(src, get_job_unavailable_error_message(error, rank))
+ tgui_alert(usr, get_job_unavailable_error_message(error, rank))
return FALSE
if(SSticker.late_join_disabled)
- alert(src, "An administrator has disabled late join spawning.")
+ tgui_alert(usr, "An administrator has disabled late join spawning.")
return FALSE
var/arrivals_docked = TRUE
if(SSshuttle.arrivals)
close_spawn_windows() //In case we get held up
if(SSshuttle.arrivals.damaged && CONFIG_GET(flag/arrivals_shuttle_require_safe_latejoin))
- src << alert("The arrivals shuttle is currently malfunctioning! You cannot join.")
+ src << tgui_alert(usr,"The arrivals shuttle is currently malfunctioning! You cannot join.")
return FALSE
if(CONFIG_GET(flag/arrivals_shuttle_require_undocked))
diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm
index da5cc94e0f5..dc74147c54c 100644
--- a/code/modules/mob/dead/observer/observer.dm
+++ b/code/modules/mob/dead/observer/observer.dm
@@ -310,7 +310,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(stat == DEAD)
ghostize(TRUE)
return TRUE
- var/response = alert(src, "Are you -sure- you want to ghost?\n(You are alive. If you ghost whilst still alive you may not play again this round! You can't change your mind so choose wisely!!)","Are you sure you want to ghost?","Ghost","Stay in body")
+ var/response = tgui_alert(usr, "Are you -sure- you want to ghost?\n(You are alive. If you ghost whilst still alive you may not play again this round! You can't change your mind so choose wisely!!)","Are you sure you want to ghost?",list("Ghost","Stay in body"))
if(response != "Ghost")
return FALSE//didn't want to ghost after-all
ghostize(FALSE) // FALSE parameter is so we can never re-enter our body. U ded.
@@ -321,7 +321,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
set name = "Ghost"
set desc = "Relinquish your life and enter the land of the dead."
- var/response = alert(src, "Are you -sure- you want to ghost?\n(You are alive. If you ghost whilst still alive you may not play again this round! You can't change your mind so choose wisely!!)","Are you sure you want to ghost?","Ghost","Stay in body")
+ var/response = tgui_alert(usr, "Are you -sure- you want to ghost?\n(You are alive. If you ghost whilst still alive you may not play again this round! You can't change your mind so choose wisely!!)","Are you sure you want to ghost?",list("Ghost","Stay in body"))
if(response != "Ghost")
return
ghostize(FALSE)
@@ -378,7 +378,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
to_chat(usr, "You're already stuck out of your body!")
return FALSE
- var/response = alert(src, "Are you sure you want to prevent (almost) all means of resuscitation? This cannot be undone. ","Are you sure you want to stay dead?","DNR","Save Me")
+ var/response = tgui_alert(usr, "Are you sure you want to prevent (almost) all means of resuscitation? This cannot be undone. ","Are you sure you want to stay dead?",list("DNR","Save Me"))
if(response != "DNR")
return
@@ -647,7 +647,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
return FALSE
if(can_reenter_corpse && mind?.current)
- if(alert(src, "Your soul is still tied to your former life as [mind.current.name], if you go forward there is no going back to that life. Are you sure you wish to continue?", "Move On", "Yes", "No") == "No")
+ if(tgui_alert(usr, "Your soul is still tied to your former life as [mind.current.name], if you go forward there is no going back to that life. Are you sure you wish to continue?", "Move On", list("Yes", "No")) == "No")
return FALSE
if(target.key)
to_chat(src, "Someone has taken this body while you were choosing!")
diff --git a/code/modules/mob/living/brain/posibrain.dm b/code/modules/mob/living/brain/posibrain.dm
index b38c651117b..2cf04090e0c 100644
--- a/code/modules/mob/living/brain/posibrain.dm
+++ b/code/modules/mob/living/brain/posibrain.dm
@@ -107,7 +107,7 @@ GLOBAL_VAR(posibrain_notify_cooldown)
if(user.suiciding) //if they suicided, they're out forever.
to_chat(user, "[src] fizzles slightly. Sadly it doesn't take those who suicided!")
return
- var/posi_ask = alert("Become a [name]? (Warning, You can no longer be revived, and all past lives will be forgotten!)","Are you positive?","Yes","No")
+ var/posi_ask = tgui_alert(usr,"Become a [name]? (Warning, You can no longer be revived, and all past lives will be forgotten!)","Are you positive?",list("Yes","No"))
if(posi_ask == "No" || QDELETED(src))
return
if(brainmob.suiciding) //clear suicide status if the old occupant suicided.
diff --git a/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm b/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm
index 7e7e2e44e30..e14c1a9852e 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm
@@ -58,7 +58,7 @@ Doesn't work on other aliens/AI.*/
/obj/effect/proc_holder/alien/proc/check_vent_block(mob/living/user)
var/obj/machinery/atmospherics/components/unary/atmos_thing = locate() in user.loc
if(atmos_thing)
- var/rusure = alert(user, "Laying eggs and shaping resin here would block access to [atmos_thing]. Do you want to continue?", "Blocking Atmospheric Component", "Yes", "No")
+ var/rusure = tgui_alert(user, "Laying eggs and shaping resin here would block access to [atmos_thing]. Do you want to continue?", "Blocking Atmospheric Component", list("Yes", "No"))
if(rusure != "Yes")
return FALSE
return TRUE
diff --git a/code/modules/mob/living/carbon/alien/larva/powers.dm b/code/modules/mob/living/carbon/alien/larva/powers.dm
index 33551c82acd..33ef5980f00 100644
--- a/code/modules/mob/living/carbon/alien/larva/powers.dm
+++ b/code/modules/mob/living/carbon/alien/larva/powers.dm
@@ -42,7 +42,7 @@
to_chat(L, "Huntersare the most agile caste, tasked with hunting for hosts. They are faster than a human and can even pounce, but are not much tougher than a drone.")
to_chat(L, "Sentinelsare tasked with protecting the hive. With their ranged spit, invisibility, and high health, they make formidable guardians and acceptable secondhand hunters.")
to_chat(L, "Dronesare the weakest and slowest of the castes, but can grow into a praetorian and then queen if no queen exists, and are vital to maintaining a hive with their resin secretion abilities.")
- var/alien_caste = alert(L, "Please choose which alien caste you shall belong to.",,"Hunter","Sentinel","Drone")
+ var/alien_caste = tgui_alert(L, "Please choose which alien caste you shall belong to.",,list("Hunter","Sentinel","Drone"))
if(L.movement_type & VENTCRAWLING)
to_chat(user, "You cannot evolve while ventcrawling!")
diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm
index 461a64a4fe7..59516ec7320 100644
--- a/code/modules/mob/living/carbon/carbon.dm
+++ b/code/modules/mob/living/carbon/carbon.dm
@@ -1011,7 +1011,7 @@
if(href_list[VV_HK_MAKE_AI])
if(!check_rights(R_SPAWN))
return
- if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform")
+ if(tgui_alert(usr,"Confirm mob type change?",,list("Transform","Cancel")) != "Transform")
return
usr.client.holder.Topic("vv_override", list("makeai"=href_list[VV_HK_TARGET]))
if(href_list[VV_HK_MODIFY_ORGANS])
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index 09abada7d20..e2becf34279 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -843,25 +843,25 @@
if(href_list[VV_HK_MAKE_MONKEY])
if(!check_rights(R_SPAWN))
return
- if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform")
+ if(tgui_alert(usr,"Confirm mob type change?",,list("Transform","Cancel")) != "Transform")
return
usr.client.holder.Topic("vv_override", list("monkeyone"=href_list[VV_HK_TARGET]))
if(href_list[VV_HK_MAKE_CYBORG])
if(!check_rights(R_SPAWN))
return
- if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform")
+ if(tgui_alert(usr,"Confirm mob type change?",,list("Transform","Cancel")) != "Transform")
return
usr.client.holder.Topic("vv_override", list("makerobot"=href_list[VV_HK_TARGET]))
if(href_list[VV_HK_MAKE_ALIEN])
if(!check_rights(R_SPAWN))
return
- if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform")
+ if(tgui_alert(usr,"Confirm mob type change?",,list("Transform","Cancel")) != "Transform")
return
usr.client.holder.Topic("vv_override", list("makealien"=href_list[VV_HK_TARGET]))
if(href_list[VV_HK_MAKE_SLIME])
if(!check_rights(R_SPAWN))
return
- if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform")
+ if(tgui_alert(usr,"Confirm mob type change?",,list("Transform","Cancel")) != "Transform")
return
usr.client.holder.Topic("vv_override", list("makeslime"=href_list[VV_HK_TARGET]))
if(href_list[VV_HK_SET_SPECIES])
diff --git a/code/modules/mob/living/emote.dm b/code/modules/mob/living/emote.dm
index b7db047c760..a8196a040dc 100644
--- a/code/modules/mob/living/emote.dm
+++ b/code/modules/mob/living/emote.dm
@@ -455,7 +455,7 @@
if("Hearable")
emote_type = EMOTE_AUDIBLE
else
- alert("Unable to use this emote, must be either hearable or visible.")
+ tgui_alert(usr,"Unable to use this emote, must be either hearable or visible.")
return
message = custom_emote
else
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index 37ac76ec5dc..44cf979d26f 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -452,7 +452,7 @@
to_chat(src, "You are already sleeping!")
return
else
- if(alert(src, "You sure you want to sleep for a while?", "Sleep", "Yes", "No") == "Yes")
+ if(tgui_alert(usr, "You sure you want to sleep for a while?", "Sleep", list("Yes", "No")) == "Yes")
SetSleeping(400) //Short nap
diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm
index bedbbd8157c..d6d6589a8ec 100644
--- a/code/modules/mob/living/silicon/ai/ai.dm
+++ b/code/modules/mob/living/silicon/ai/ai.dm
@@ -646,7 +646,7 @@
if(incapacitated())
return
var/input
- switch(alert("Would you like to select a hologram based on a crew member, an animal, or switch to a unique avatar?",,"Crew Member","Unique","Animal"))
+ switch(tgui_alert(usr,"Would you like to select a hologram based on a crew member, an animal, or switch to a unique avatar?",,list("Crew Member","Unique","Animal")))
if("Crew Member")
var/list/personnel_list = list()
@@ -660,7 +660,7 @@
qdel(holo_icon)//Clear old icon so we're not storing it in memory.
holo_icon = getHologramIcon(icon(character_icon))
else
- alert("No suitable records found. Aborting.")
+ tgui_alert(usr,"No suitable records found. Aborting.")
if("Animal")
var/list/icon_list = list(
diff --git a/code/modules/mob/living/silicon/pai/personality.dm b/code/modules/mob/living/silicon/pai/personality.dm
index acf766c3429..d33891fd253 100644
--- a/code/modules/mob/living/silicon/pai/personality.dm
+++ b/code/modules/mob/living/silicon/pai/personality.dm
@@ -51,7 +51,7 @@
if (isnull(version) || version != 1)
fdel(path)
if (!silent)
- alert(user, "Your savefile was incompatible with this version and was deleted.")
+ tgui_alert(user, "Your savefile was incompatible with this version and was deleted.")
return 0
F["name"] >> src.name
diff --git a/code/modules/mob/living/silicon/pai/software.dm b/code/modules/mob/living/silicon/pai/software.dm
index d0e9df77a45..0b0205d9e4f 100644
--- a/code/modules/mob/living/silicon/pai/software.dm
+++ b/code/modules/mob/living/silicon/pai/software.dm
@@ -149,7 +149,7 @@
radio.attack_self(src)
if("image") // Set pAI card display face
- var/newImage = input("Select your new display image.", "Display Image", "Happy") in sortList(list("Happy", "Cat", "Extremely Happy", "Face", "Laugh", "Off", "Sad", "Angry", "What", "Sunglasses"))
+ var/newImage = tgui_input_list(usr, "Select your new display image.", "Display Image", sortList(list("Happy", "Cat", "Extremely Happy", "Face", "Laugh", "Off", "Sad", "Angry", "What", "Sunglasses")))
switch(newImage)
if(null)
card.emotion_icon = "null"
@@ -199,7 +199,7 @@
aiPDA.silent = !aiPDA.silent
else if(href_list["target"])
if(silent)
- return alert("Communications circuits remain uninitialized.")
+ return tgui_alert(usr,"Communications circuits remain uninitialized.")
var/target = locate(href_list["target"]) in GLOB.PDAs
aiPDA.create_message(src, target)
diff --git a/code/modules/mob/living/simple_animal/friendly/drone/interaction.dm b/code/modules/mob/living/simple_animal/friendly/drone/interaction.dm
index b40e23fbd86..38984589c03 100644
--- a/code/modules/mob/living/simple_animal/friendly/drone/interaction.dm
+++ b/code/modules/mob/living/simple_animal/friendly/drone/interaction.dm
@@ -8,7 +8,7 @@
/mob/living/simple_animal/drone/attack_drone(mob/living/simple_animal/drone/D)
if(D != src && stat == DEAD)
- var/d_input = alert(D,"Perform which action?","Drone Interaction","Reactivate","Cannibalize","Nothing")
+ var/d_input = tgui_alert(D,"Perform which action?","Drone Interaction",list("Reactivate","Cannibalize","Nothing"))
if(d_input)
switch(d_input)
if("Reactivate")
diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm
index 847087ea576..365edf45bb1 100644
--- a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm
+++ b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm
@@ -623,7 +623,7 @@
if(.)
return
if(ready_to_deploy)
- var/be_helper = alert("Become a Lightgeist? (Warning, You can no longer be revived!)",,"Yes","No")
+ var/be_helper = tgui_alert(usr,"Become a Lightgeist? (Warning, You can no longer be revived!)",,list("Yes","No"))
if(be_helper == "Yes" && !QDELETED(src) && isobserver(user))
var/mob/living/simple_animal/hostile/lightgeist/W = new /mob/living/simple_animal/hostile/lightgeist(get_turf(loc))
W.key = user.key
diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/elite.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/elite.dm
index 8e79ea1a305..99e7cc8d3c9 100644
--- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/elite.dm
+++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/elite.dm
@@ -40,7 +40,7 @@
if(istype(target, /obj/structure/elite_tumor))
var/obj/structure/elite_tumor/T = target
if(T.mychild == src && T.activity == TUMOR_PASSIVE)
- var/elite_remove = alert("Re-enter the tumor?", "Despawn yourself?", "Yes", "No")
+ var/elite_remove = tgui_alert(usr,"Re-enter the tumor?", "Despawn yourself?", list("Yes", "No"))
if(elite_remove == "No" || QDELETED(src) || !Adjacent(T))
return
T.mychild = null
diff --git a/code/modules/mob/living/simple_animal/hostile/space_dragon.dm b/code/modules/mob/living/simple_animal/hostile/space_dragon.dm
index 9827d5f5c27..4090cea337d 100644
--- a/code/modules/mob/living/simple_animal/hostile/space_dragon.dm
+++ b/code/modules/mob/living/simple_animal/hostile/space_dragon.dm
@@ -666,7 +666,7 @@
/obj/structure/carp_rift/proc/summon_carp(mob/user)
if(carp_stored <= 0)//Not enough carp points
return FALSE
- var/carp_ask = alert("Become a carp?", "Help bring forth the horde?", "Yes", "No")
+ var/carp_ask = tgui_alert(usr,"Become a carp?", "Help bring forth the horde?", list("Yes", "No"))
if(carp_ask == "No" || !src || QDELETED(src) || QDELETED(user))
return FALSE
if(carp_stored <= 0)
diff --git a/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm b/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm
index b1a7b781c11..f7a8346d958 100644
--- a/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm
+++ b/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm
@@ -196,7 +196,7 @@
/mob/living/simple_animal/hostile/venus_human_trap/proc/humanize_plant(mob/user)
if(key || !playable_plant || stat)
return
- var/plant_ask = alert("Become a venus human trap?", "Are you reverse vegan?", "Yes", "No")
+ var/plant_ask = tgui_alert(usr,"Become a venus human trap?", "Are you reverse vegan?", list("Yes", "No"))
if(plant_ask == "No" || QDELETED(src))
return
if(key)
diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm
index 036c4f7d3d6..f591dd628c0 100644
--- a/code/modules/mob/mob.dm
+++ b/code/modules/mob/mob.dm
@@ -689,7 +689,7 @@
set name = "Respawn"
set category = "OOC"
- if (CONFIG_GET(flag/norespawn) && (!check_rights_for(usr.client, R_ADMIN) || alert(usr, "Respawn configs disabled. Do you want to use your permissions to circumvent it?", "Respawn", "Yes", "No") != "Yes"))
+ if (CONFIG_GET(flag/norespawn) && (!check_rights_for(usr.client, R_ADMIN) || tgui_alert(usr, "Respawn configs disabled. Do you want to use your permissions to circumvent it?", "Respawn", list("Yes", "No")) != "Yes"))
return
if ((stat != DEAD || !( SSticker )))
diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm
index 631c646ec0f..4d67db55585 100644
--- a/code/modules/mob/transform_procs.dm
+++ b/code/modules/mob/transform_procs.dm
@@ -294,7 +294,7 @@
/mob/living/carbon/human/Animalize()
var/list/mobtypes = typesof(/mob/living/simple_animal)
- var/mobpath = input("Which type of mob should [src] turn into?", "Choose a type") in sortList(mobtypes, /proc/cmp_typepaths_asc)
+ var/mobpath = tgui_input_list(usr, "Which type of mob should [src] turn into?", "Choose a type", sortList(mobtypes, /proc/cmp_typepaths_asc))
if(!safe_animal(mobpath))
to_chat(usr, "Sorry but this mob type is currently unavailable.")
@@ -327,7 +327,7 @@
/mob/proc/Animalize()
var/list/mobtypes = typesof(/mob/living/simple_animal)
- var/mobpath = input("Which type of mob should [src] turn into?", "Choose a type") in sortList(mobtypes, /proc/cmp_typepaths_asc)
+ var/mobpath = tgui_input_list(usr, "Which type of mob should [src] turn into?", "Choose a type", sortList(mobtypes, /proc/cmp_typepaths_asc))
if(!safe_animal(mobpath))
to_chat(usr, "Sorry but this mob type is currently unavailable.")
diff --git a/code/modules/modular_computers/computers/item/computer.dm b/code/modules/modular_computers/computers/item/computer.dm
index edf69678825..cc9051f04f0 100644
--- a/code/modules/modular_computers/computers/item/computer.dm
+++ b/code/modules/modular_computers/computers/item/computer.dm
@@ -209,7 +209,7 @@
if(enabled)
ui_interact(user)
else if(isAdminGhostAI(user))
- var/response = alert(user, "This computer is turned off. Would you like to turn it on?", "Admin Override", "Yes", "No")
+ var/response = tgui_alert(user, "This computer is turned off. Would you like to turn it on?", "Admin Override", list("Yes", "No"))
if(response == "Yes")
turn_on(user)
diff --git a/code/modules/ninja/suit/ninja_equipment_actions/ninja_suit_initialisation.dm b/code/modules/ninja/suit/ninja_equipment_actions/ninja_suit_initialisation.dm
index 763d1c33c20..8b425fd15c7 100644
--- a/code/modules/ninja/suit/ninja_equipment_actions/ninja_suit_initialisation.dm
+++ b/code/modules/ninja/suit/ninja_equipment_actions/ninja_suit_initialisation.dm
@@ -97,7 +97,7 @@ GLOBAL_LIST_INIT(ninja_deinitialize_messages, list(
if (!ninja || !ninja.mind)
s_busy = FALSE
return
- if (phase == 0 && alert("Are you certain you wish to remove the suit? This will take time and remove all abilities.",,"Yes","No") == "No")
+ if (phase == 0 && tgui_alert(usr, "Are you certain you wish to remove the suit? This will take time and remove all abilities.",,list("Yes","No")) == "No")
s_busy = FALSE
return
diff --git a/code/modules/ninja/suit/suit.dm b/code/modules/ninja/suit/suit.dm
index 23e13b936e0..acdfbe44efa 100644
--- a/code/modules/ninja/suit/suit.dm
+++ b/code/modules/ninja/suit/suit.dm
@@ -159,7 +159,7 @@
* * ninja - The person wearing the suit.
*/
/obj/item/clothing/suit/space/space_ninja/proc/lockIcons(mob/living/carbon/human/ninja)
- var/design_choice = alert(ninja, "Please choose your desired suit design.",,"Original","New Age")
+ var/design_choice = tgui_alert(ninja, "Please choose your desired suit design.",,list("Original","New Age"))
switch(design_choice)
if("Original")
icon_state = ninja.body_type == "female" ? "s-ninjanf" : "s-ninjan"
diff --git a/code/modules/photography/camera/camera.dm b/code/modules/photography/camera/camera.dm
index 84511f8094a..2457b74d863 100644
--- a/code/modules/photography/camera/camera.dm
+++ b/code/modules/photography/camera/camera.dm
@@ -227,7 +227,7 @@
to_chat(user, "[pictures_left] photos left.")
var/customise = "No"
if(can_customise)
- customise = alert(user, "Do you want to customize the photo?", "Customization", "Yes", "No")
+ customise = tgui_alert(user, "Do you want to customize the photo?", "Customization", list("Yes", "No"))
if(customise == "Yes")
var/name1 = stripped_input(user, "Set a name for this photo, or leave blank. 32 characters max.", "Name", max_length = 32)
var/desc1 = stripped_input(user, "Set a description to add to photo, or leave blank. 128 characters max.", "Caption", max_length = 128)
diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm
index afd72d3065b..0716b104559 100644
--- a/code/modules/power/apc.dm
+++ b/code/modules/power/apc.dm
@@ -1191,7 +1191,7 @@
user.visible_message("[user] slots [card] into [src]...", "Transfer process initiated. Sending request for AI approval...")
playsound(src, 'sound/machines/click.ogg', 50, TRUE)
SEND_SOUND(occupier, sound('sound/misc/notice2.ogg')) //To alert the AI that someone's trying to card them if they're tabbed out
- if(alert(occupier, "[user] is attempting to transfer you to \a [card.name]. Do you consent to this?", "APC Transfer", "Yes - Transfer Me", "No - Keep Me Here") == "No - Keep Me Here")
+ if(tgui_alert(occupier, "[user] is attempting to transfer you to \a [card.name]. Do you consent to this?", "APC Transfer", list("Yes - Transfer Me", "No - Keep Me Here")) == "No - Keep Me Here")
to_chat(user, "AI denied transfer request. Process terminated.")
playsound(src, 'sound/machines/buzz-sigh.ogg', 50, TRUE)
transfer_in_progress = FALSE
diff --git a/code/modules/projectiles/pins.dm b/code/modules/projectiles/pins.dm
index c28247e98ac..3bd3af0118d 100644
--- a/code/modules/projectiles/pins.dm
+++ b/code/modules/projectiles/pins.dm
@@ -286,7 +286,7 @@
return FALSE
return TRUE
if(credit_card_details && !active_prompt)
- var/license_request = alert(user, "Do you wish to pay [payment_amount] credit[( payment_amount > 1 ) ? "s" : ""] for [( multi_payment ) ? "each shot of [gun.name]" : "usage license of [gun.name]"]?", "Weapon Purchase", "Yes", "No")
+ var/license_request = tgui_alert(user, "Do you wish to pay [payment_amount] credit[( payment_amount > 1 ) ? "s" : ""] for [( multi_payment ) ? "each shot of [gun.name]" : "usage license of [gun.name]"]?", "Weapon Purchase", list("Yes", "No"))
active_prompt = TRUE
if(!user.canUseTopic(src, BE_CLOSE))
active_prompt = FALSE
diff --git a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm
index d137a288961..97871e723ef 100644
--- a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm
+++ b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm
@@ -316,7 +316,7 @@
if("clear_recipes")
if(!is_operational)
return
- var/yesno = alert("Clear all recipes?",, "Yes","No")
+ var/yesno = tgui_alert(usr, "Clear all recipes?",, list("Yes","No"))
if(yesno == "Yes")
saved_recipes = list()
. = TRUE
@@ -331,7 +331,7 @@
var/name = stripped_input(usr,"Name","What do you want to name this recipe?", "Recipe", MAX_NAME_LEN)
if(!usr.canUseTopic(src, !issilicon(usr)))
return
- if(saved_recipes[name] && alert("\"[name]\" already exists, do you want to overwrite it?",, "Yes", "No") == "No")
+ if(saved_recipes[name] && tgui_alert(usr, "\"[name]\" already exists, do you want to overwrite it?",, list("Yes", "No")) == "No")
return
if(name && recording_recipe)
for(var/reagent in recording_recipe)
diff --git a/code/modules/reagents/reagent_containers/spray.dm b/code/modules/reagents/reagent_containers/spray.dm
index 3afbd77c6d7..16cc8170977 100644
--- a/code/modules/reagents/reagent_containers/spray.dm
+++ b/code/modules/reagents/reagent_containers/spray.dm
@@ -169,7 +169,7 @@
set src in usr
if(usr.incapacitated())
return
- if (alert(usr, "Are you sure you want to empty that?", "Empty Bottle:", "Yes", "No") != "Yes")
+ if (tgui_alert(usr, "Are you sure you want to empty that?", "Empty Bottle:", list("Yes", "No")) != "Yes")
return
if(isturf(usr.loc) && src.loc == usr)
to_chat(usr, "You empty \the [src] onto the floor.")
diff --git a/code/modules/religion/religion_sects.dm b/code/modules/religion/religion_sects.dm
index 8599f80d62c..15206db222d 100644
--- a/code/modules/religion/religion_sects.dm
+++ b/code/modules/religion/religion_sects.dm
@@ -288,7 +288,7 @@
*/
/datum/religion_sect/honorbound/proc/invite_crusader(mob/living/carbon/human/invited)
currently_asking += invited
- var/ask = tgui_alert(invited, "Join [GLOB.deity]? You will be bound to a code of honor.", "Invitation", list("Yes", "No"))
+ var/ask = tgui_alert(invited, "Join [GLOB.deity]? You will be bound to a code of honor.", "Invitation", list("Yes", "No"), 60 SECONDS)
currently_asking -= invited
if(ask == "Yes")
possible_crusaders += invited
diff --git a/code/modules/research/destructive_analyzer.dm b/code/modules/research/destructive_analyzer.dm
index 87fb2732359..863ab8b1493 100644
--- a/code/modules/research/destructive_analyzer.dm
+++ b/code/modules/research/destructive_analyzer.dm
@@ -106,7 +106,7 @@ Note: Must be placed within 3 tiles of the R&D Console
var/user_mode_string = ""
if(length(point_value))
user_mode_string = " for [json_encode(point_value)] points"
- var/choice = input("Are you sure you want to destroy [loaded_item][user_mode_string]?") in list("Proceed", "Cancel")
+ var/choice = tgui_alert(usr, "Are you sure you want to destroy [loaded_item][user_mode_string]?",, list("Proceed", "Cancel"))
if(choice == "Cancel")
return FALSE
if(QDELETED(loaded_item) || QDELETED(src))
diff --git a/code/modules/research/xenobiology/crossbreeding/_misc.dm b/code/modules/research/xenobiology/crossbreeding/_misc.dm
index a342a348658..a186233d40c 100644
--- a/code/modules/research/xenobiology/crossbreeding/_misc.dm
+++ b/code/modules/research/xenobiology/crossbreeding/_misc.dm
@@ -179,7 +179,7 @@ Slimecrossing Items
return
if(M.mind)
to_chat(user, "You offer the device to [M].")
- if(alert(M, "Would you like to enter [user]'s capture device?", "Gold Capture Device", "Yes", "No") == "Yes")
+ if(tgui_alert(M, "Would you like to enter [user]'s capture device?", "Gold Capture Device", list("Yes", "No")) == "Yes")
if(user.canUseTopic(src, BE_CLOSE) && user.canUseTopic(M, BE_CLOSE))
to_chat(user, "You store [M] in the capture device.")
to_chat(M, "The world warps around you, and you're suddenly in an endless void, with a window to the outside floating in front of you.")
diff --git a/code/modules/research/xenobiology/xenobiology.dm b/code/modules/research/xenobiology/xenobiology.dm
index 955549fc5c4..6931b1296c2 100644
--- a/code/modules/research/xenobiology/xenobiology.dm
+++ b/code/modules/research/xenobiology/xenobiology.dm
@@ -771,7 +771,7 @@
return
prompted = 1
- if(alert("This will permanently transfer your consciousness to [SM]. Are you sure you want to do this?",,"Yes","No")=="No")
+ if(tgui_alert(usr,"This will permanently transfer your consciousness to [SM]. Are you sure you want to do this?",,list("Yes","No"))=="No")
prompted = 0
return
diff --git a/code/modules/ruins/objects_and_mobs/necropolis_gate.dm b/code/modules/ruins/objects_and_mobs/necropolis_gate.dm
index 6a9ebdc690e..1f28e2d50e4 100644
--- a/code/modules/ruins/objects_and_mobs/necropolis_gate.dm
+++ b/code/modules/ruins/objects_and_mobs/necropolis_gate.dm
@@ -165,7 +165,7 @@ GLOBAL_DATUM(necropolis_gate, /obj/structure/necropolis_gate/legion_gate)
//ATTACK HAND IGNORING PARENT RETURN VALUE
/obj/structure/necropolis_gate/legion_gate/attack_hand(mob/user, list/modifiers)
if(!open && !changing_openness)
- var/safety = alert(user, "You think this might be a bad idea...", "Knock on the door?", "Proceed", "Abort")
+ var/safety = tgui_alert(user, "You think this might be a bad idea...", "Knock on the door?", list("Proceed", "Abort"))
if(safety == "Abort" || !in_range(src, user) || !src || open || changing_openness || user.incapacitated())
return
user.visible_message("[user] knocks on [src]...", "You tentatively knock on [src]...")
diff --git a/code/modules/ruins/spaceruin_code/hilbertshotel.dm b/code/modules/ruins/spaceruin_code/hilbertshotel.dm
index aa99ff480dc..1eb19980299 100644
--- a/code/modules/ruins/spaceruin_code/hilbertshotel.dm
+++ b/code/modules/ruins/spaceruin_code/hilbertshotel.dm
@@ -280,7 +280,7 @@ GLOBAL_VAR_INIT(hhMysteryRoomNumber, rand(1, 999999))
if(!parentSphere)
to_chat(user, "The door seems to be malfunctioning and refuses to operate!")
return
- if(alert(user, "Hilbert's Hotel would like to remind you that while we will do everything we can to protect the belongings you leave behind, we make no guarantees of their safety while you're gone, especially that of the health of any living creatures. With that in mind, are you ready to leave?", "Exit", "Leave", "Stay") == "Leave")
+ if(tgui_alert(user, "Hilbert's Hotel would like to remind you that while we will do everything we can to protect the belongings you leave behind, we make no guarantees of their safety while you're gone, especially that of the health of any living creatures. With that in mind, are you ready to leave?", "Exit", list("Leave", "Stay")) == "Leave")
if(HAS_TRAIT(user, TRAIT_IMMOBILIZED) || (get_dist(get_turf(src), get_turf(user)) > 1)) //no teleporting around if they're dead or moved away during the prompt.
return
user.forceMove(get_turf(parentSphere))
diff --git a/code/modules/swarmers/swarmer_objs.dm b/code/modules/swarmers/swarmer_objs.dm
index 171d1030653..b3e40362c8e 100644
--- a/code/modules/swarmers/swarmer_objs.dm
+++ b/code/modules/swarmers/swarmer_objs.dm
@@ -75,7 +75,7 @@
* * user - A reference to the ghost interacting with the beacon
*/
/obj/structure/swarmer_beacon/proc/que_swarmer(mob/user)
- var/swarm_ask = alert("Become a swarmer?", "Do you wish to consume the station?", "Yes", "No")
+ var/swarm_ask = tgui_alert(usr, "Become a swarmer?", "Do you wish to consume the station?", list("Yes", "No"))
if(swarm_ask == "No" || QDELETED(src) || QDELETED(user) || processing_swarmer)
return FALSE
var/mob/living/simple_animal/hostile/swarmer/newswarmer = new /mob/living/simple_animal/hostile/swarmer(src)
diff --git a/code/modules/tgui/tgui_alert.dm b/code/modules/tgui/tgui_alert.dm
index 1a86cca705b..2922ce4b7a6 100644
--- a/code/modules/tgui/tgui_alert.dm
+++ b/code/modules/tgui/tgui_alert.dm
@@ -9,7 +9,7 @@
* * buttons - The options that can be chosen by the user, each string is assigned a button on the UI.
* * timeout - The timeout of the alert, after which the modal will close and qdel itself. Set to zero for no timeout.
*/
-/proc/tgui_alert(mob/user, message, title, list/buttons, timeout = 60 SECONDS)
+/proc/tgui_alert(mob/user, message = null, title = null, list/buttons = list("Ok"), timeout = 0)
if (!user)
user = usr
if (!istype(user))
@@ -35,9 +35,9 @@
* * title - The of the alert modal, shown on the top of the TGUI window.
* * buttons - The options that can be chosen by the user, each string is assigned a button on the UI.
* * callback - The callback to be invoked when a choice is made.
- * * timeout - The timeout of the alert, after which the modal will close and qdel itself. Set to zero for no timeout.
+ * * timeout - The timeout of the alert, after which the modal will close and qdel itself. Disabled by default, can be set to seconds otherwise.
*/
-/proc/tgui_alert_async(mob/user, message, title, list/buttons, datum/callback/callback, timeout = 60 SECONDS)
+/proc/tgui_alert_async(mob/user, message = null, title = null, list/buttons = list("Ok"), datum/callback/callback, timeout = 0)
if (!user)
user = usr
if (!istype(user))
diff --git a/code/modules/tgui_panel/external.dm b/code/modules/tgui_panel/external.dm
index 89973a925da..e5b3602e868 100644
--- a/code/modules/tgui_panel/external.dm
+++ b/code/modules/tgui_panel/external.dm
@@ -16,8 +16,8 @@
nuke_chat()
- // Failed to fix
- action = alert(src, "Did that work?", "", "Yes", "No, switch to old ui")
+ // Failed to fix, using tgalert as fallback
+ action = tgalert(src, "Did that work?", "", "Yes", "No, switch to old ui")
if (action == "No, switch to old ui")
winset(src, "output", "on-show=&is-disabled=0&is-visible=1")
winset(src, "browseroutput", "is-disabled=1;is-visible=0")
diff --git a/interface/interface.dm b/interface/interface.dm
index 87d2076a056..9136965cab9 100644
--- a/interface/interface.dm
+++ b/interface/interface.dm
@@ -20,7 +20,7 @@
set hidden = TRUE
var/forumurl = CONFIG_GET(string/forumurl)
if(forumurl)
- if(alert("This will open the forum in your browser. Are you sure?",,"Yes","No")!="Yes")
+ if(tgui_alert(src, "This will open the forum in your browser. Are you sure?",, list("Yes","No"))!="Yes")
return
src << link(forumurl)
else
@@ -33,7 +33,7 @@
set hidden = TRUE
var/rulesurl = CONFIG_GET(string/rulesurl)
if(rulesurl)
- if(alert("This will open the rules in your browser. Are you sure?",,"Yes","No")!="Yes")
+ if(tgui_alert(src, "This will open the rules in your browser. Are you sure?",, list("Yes","No"))!="Yes")
return
src << link(rulesurl)
else
@@ -46,7 +46,7 @@
set hidden = TRUE
var/githuburl = CONFIG_GET(string/githuburl)
if(githuburl)
- if(alert("This will open the Github repository in your browser. Are you sure?",,"Yes","No")!="Yes")
+ if(tgui_alert(src, "This will open the Github repository in your browser. Are you sure?",, list("Yes","No"))!="Yes")
return
src << link(githuburl)
else
diff --git a/tgui/docs/component-reference.md b/tgui/docs/component-reference.md
index 21e38d71aae..b3259464416 100644
--- a/tgui/docs/component-reference.md
+++ b/tgui/docs/component-reference.md
@@ -1138,7 +1138,7 @@ Example:
- `title: string` - Window title.
- `width: number` - Window width.
- `height: number` - Window height.
-- `noClose: boolean` - Controls the ability to close the window.
+- `canClose: boolean` - Controls the ability to close the window.
- `children: any` - Child elements, which are rendered directly inside the
window. If you use a [Dimmer](#dimmer) or [Modal](#modal) in your UI,
they should be put as direct childs of a Window, otherwise you should be
diff --git a/tgui/packages/tgui/interfaces/AlertModal.js b/tgui/packages/tgui/interfaces/AlertModal.js
index 944c72074a1..e09991a1b94 100644
--- a/tgui/packages/tgui/interfaces/AlertModal.js
+++ b/tgui/packages/tgui/interfaces/AlertModal.js
@@ -6,67 +6,141 @@
import { clamp01 } from 'common/math';
import { useBackend } from '../backend';
-import { Box, Button, Flex } from '../components';
+import { Component, createRef } from 'inferno';
+import { Box, Flex, Section } from '../components';
import { Window } from '../layouts';
+import {
+ KEY_ENTER,
+ KEY_LEFT,
+ KEY_RIGHT,
+ KEY_SPACE,
+ KEY_TAB,
+} from 'common/keycodes';
-export const AlertModal = (props, context) => {
- const { act, data } = useBackend(context);
- const {
- title,
- message,
- buttons,
- timeout,
- } = data;
+export class AlertModal extends Component {
+ constructor() {
+ super();
- return (
-
- {timeout !== undefined && }
-
-
-
-
-
-
- {message}
-
+ this.buttonRefs = [createRef()];
+ this.state = { current: 0 };
+ }
+
+ componentDidMount() {
+ const { data } = useBackend(this.context);
+ const { buttons } = data;
+ const { current } = this.state;
+ const button = this.buttonRefs[current].current;
+
+ // Fill ref array with refs for other buttons
+ for (let i = 1; i < buttons.length; i++) {
+ this.buttonRefs.push(createRef());
+ }
+
+ setTimeout(() => button.focus(), 1);
+ }
+
+ setCurrent(current, isArrowKey) {
+ const { data } = useBackend(this.context);
+ const { buttons } = data;
+
+ // Mimic alert() behavior for tabs and arrow keys
+ if (current >= buttons.length) {
+ current = isArrowKey ? current - 1 : 0;
+ } else if (current < 0) {
+ current = isArrowKey ? 0 : buttons.length - 1;
+ }
+
+ const button = this.buttonRefs[current].current;
+
+ // Prevents an error from occurring on close
+ if (button) {
+ setTimeout(() => button.focus(), 1);
+ }
+ this.setState({ current });
+ }
+
+ render() {
+ const { act, data } = useBackend(this.context);
+ const { title, message, buttons, timeout } = data;
+ const { current } = this.state;
+ const focusCurrentButton = () => this.setCurrent(current, false);
+
+ return (
+ 0}>
+ {timeout && }
+
+
+
+
+
+
+
+ {message}
+
+
+
+
+
+
+ {buttons.map((button, buttonIndex) => (
+
+