From 0da0c5438862bb7ab5bd44fc3a44767b1c68a8c2 Mon Sep 17 00:00:00 2001 From: Aronai Sieyes Date: Fri, 25 Jun 2021 16:20:22 -0400 Subject: [PATCH] Convert almost all alert() to tgui_alert() --- code/controllers/subsystems/garbage.dm | 2 +- code/controllers/subsystems/media_tracks.dm | 4 +- code/controllers/subsystems/supply.dm | 8 +-- code/controllers/subsystems/vote.dm | 2 +- code/datums/datumvars.dm | 2 +- code/datums/ghost_query.dm | 6 +- code/datums/locations/locations.dm | 3 +- code/datums/managed_browsers/feedback_form.dm | 2 +- code/datums/mind.dm | 2 +- code/defines/obj.dm | 2 +- code/game/antagonist/antagonist_factions.dm | 2 +- code/game/antagonist/station/highlander.dm | 2 +- .../gamemodes/changeling/powers/fake_death.dm | 2 +- code/game/gamemodes/cult/ritual.dm | 4 +- code/game/gamemodes/cult/runes.dm | 2 +- .../newmalf_ability_trees/HARDWARE.dm | 4 +- .../newmalf_ability_trees/HELPERS.dm | 2 +- .../tree_interdiction.dm | 10 +-- .../newmalf_ability_trees/tree_networking.dm | 2 +- code/game/gamemodes/nuclear/pinpointer.dm | 4 +- code/game/gamemodes/sandbox/h_sandbox.dm | 2 +- .../gamemodes/technomancer/spells/control.dm | 3 +- .../gamemodes/technomancer/spells/illusion.dm | 2 +- code/game/machinery/bioprinter.dm | 2 +- code/game/machinery/camera/camera_assembly.dm | 2 +- code/game/machinery/computer/ai_core.dm | 2 +- code/game/machinery/computer/guestpass.dm | 2 +- .../game/machinery/computer/id_restorer_vr.dm | 2 +- code/game/machinery/computer/shuttle.dm | 4 +- code/game/machinery/computer/supply.dm | 2 +- code/game/machinery/cryopod.dm | 2 +- code/game/machinery/doors/firedoor.dm | 4 +- code/game/machinery/hologram.dm | 2 +- code/game/machinery/newscaster.dm | 18 ++--- code/game/machinery/pipe/pipelayer.dm | 2 +- code/game/machinery/transportpod.dm | 2 +- .../machinery/virtual_reality/ar_console.dm | 4 +- .../machinery/virtual_reality/vr_console.dm | 4 +- code/game/magic/archived_book.dm | 3 +- code/game/mecha/combat/phazon.dm | 2 +- code/game/mecha/mecha.dm | 2 +- code/game/mecha/mecha_actions.dm | 2 +- .../game/objects/effects/decals/contraband.dm | 2 +- .../objects/effects/decals/posters/posters.dm | 2 +- code/game/objects/items/bodybag.dm | 3 +- .../objects/items/devices/body_snatcher_vr.dm | 2 +- .../items/devices/communicator/phone.dm | 3 +- .../objects/items/devices/denecrotizer_vr.dm | 2 +- .../game/objects/items/devices/holowarrant.dm | 2 +- code/game/objects/items/devices/multitool.dm | 2 +- .../game/objects/items/devices/scanners_vr.dm | 4 +- .../objects/items/devices/translocator_vr.dm | 31 +++++---- code/game/objects/items/toys/toys.dm | 2 +- .../weapons/circuitboards/computer/supply.dm | 2 +- .../items/weapons/id cards/syndicate_ids.dm | 2 +- .../objects/items/weapons/implants/implant.dm | 2 +- .../objects/items/weapons/melee/energy.dm | 2 +- code/game/objects/items/weapons/shields.dm | 2 +- code/game/objects/items/weapons/syndie.dm | 2 +- .../objects/structures/ghost_pods/event_vr.dm | 2 +- .../structures/ghost_pods/ghost_pods.dm | 2 +- .../structures/ghost_pods/silicon_vr.dm | 2 +- code/game/objects/structures/trash_pile_vr.dm | 4 +- code/game/response_team.dm | 6 +- code/game/trader_visit.dm | 4 +- code/modules/admin/DB ban/functions.dm | 4 +- code/modules/admin/admin.dm | 16 ++--- code/modules/admin/admin_secrets.dm | 2 +- code/modules/admin/admin_verbs.dm | 10 +-- code/modules/admin/callproc/callproc.dm | 2 +- code/modules/admin/map_capture.dm | 2 +- code/modules/admin/player_notes.dm | 2 +- code/modules/admin/player_panel.dm | 2 +- .../secrets/admin_secrets/jump_shuttle.dm | 2 +- .../secrets/admin_secrets/launch_shuttle.dm | 2 +- .../admin_secrets/launch_shuttle_forced.dm | 2 +- .../secrets/admin_secrets/move_shuttle.dm | 2 +- .../secrets/admin_secrets/show_game_mode.dm | 4 +- code/modules/admin/topic.dm | 68 +++++++++--------- code/modules/admin/verbs/adminhelp.dm | 2 +- code/modules/admin/verbs/adminhelp_vr.dm | 2 +- code/modules/admin/verbs/adminjump.dm | 69 +++++++++++-------- code/modules/admin/verbs/atmosdebug.dm | 2 +- code/modules/admin/verbs/buildmode.dm | 6 +- code/modules/admin/verbs/change_appearance.dm | 6 +- code/modules/admin/verbs/cinematic.dm | 4 +- code/modules/admin/verbs/debug.dm | 28 ++++---- code/modules/admin/verbs/diagnostics.dm | 2 +- code/modules/admin/verbs/dice.dm | 4 +- code/modules/admin/verbs/fps.dm | 2 +- code/modules/admin/verbs/grief_fixers.dm | 2 +- code/modules/admin/verbs/lightning_strike.dm | 2 +- .../admin/verbs/map_template_loadverb.dm | 9 ++- code/modules/admin/verbs/mapping.dm | 4 +- code/modules/admin/verbs/playsound.dm | 2 +- code/modules/admin/verbs/randomverbs.dm | 54 +++++++-------- code/modules/admin/verbs/randomverbs_vr.dm | 4 +- code/modules/admin/verbs/smite_vr.dm | 2 +- code/modules/admin/verbs/striketeam.dm | 6 +- .../admin/view_variables/admin_delete.dm | 2 +- .../view_variables/mass_edit_variables.dm | 6 +- .../admin/view_variables/modify_variables.dm | 12 ++-- code/modules/admin/view_variables/topic.dm | 16 ++--- .../admin/view_variables/topic_list.dm | 2 +- code/modules/assembly/holder.dm | 2 +- code/modules/client/client procs.dm | 7 +- .../preference_setup/general/02_language.dm | 12 ++-- .../client/preference_setup/vore/02_size.dm | 2 +- .../client/preference_setup/vore/07_traits.dm | 27 +++----- code/modules/client/preferences.dm | 4 +- code/modules/client/ui_style.dm | 2 +- code/modules/client/verbs/suicide.dm | 10 +-- .../clothing/spacesuits/rig/modules/ninja.dm | 2 +- .../rig/modules/specific/self_destruct.dm | 2 +- code/modules/detectivework/tools/scanner.dm | 2 +- code/modules/economy/ATM.dm | 6 +- code/modules/economy/EFTPOS.dm | 4 +- code/modules/emotes/emote_mob.dm | 2 +- code/modules/events/event_manager.dm | 6 +- code/modules/hydroponics/seed_machines.dm | 2 +- code/modules/hydroponics/trays/tray.dm | 2 +- code/modules/library/lib_machines.dm | 10 +-- code/modules/mob/dead/observer/free_vr.dm | 4 +- code/modules/mob/dead/observer/observer.dm | 36 +++++----- code/modules/mob/dead/observer/observer_vr.dm | 2 +- code/modules/mob/living/bot/mulebot.dm | 4 +- .../living/carbon/alien/diona/progression.dm | 2 +- .../living/carbon/alien/larva/progression.dm | 2 +- .../mob/living/carbon/brain/posibrain.dm | 4 +- code/modules/mob/living/carbon/carbon.dm | 2 +- code/modules/mob/living/carbon/give.dm | 2 +- code/modules/mob/living/carbon/human/human.dm | 2 +- .../station/protean_vr/protean_powers.dm | 4 +- .../station/station_special_abilities_vr.dm | 12 ++-- code/modules/mob/living/living_vr.dm | 9 +-- code/modules/mob/living/silicon/ai/ai.dm | 10 +-- .../modules/mob/living/silicon/ai/latejoin.dm | 3 +- code/modules/mob/living/silicon/pai/pai.dm | 7 +- .../mob/living/silicon/pai/personality.dm | 2 +- .../modules/mob/living/silicon/pai/recruit.dm | 2 +- .../silicon/robot/dogborg/dog_sleeper_vr.dm | 2 +- .../mob/living/silicon/robot/drone/drone.dm | 2 +- .../mob/living/silicon/robot/robot_items.dm | 6 +- .../mob/living/silicon/robot/robot_vr.dm | 2 +- .../thinktank/thinktank_interactions.dm | 2 +- code/modules/mob/login.dm | 2 +- code/modules/mob/mob.dm | 2 +- code/modules/mob/new_player/new_player.dm | 10 +-- code/modules/mob/new_player/new_player_vr.dm | 3 +- .../computers/modular_computer/interaction.dm | 2 +- .../programs/generic/file_browser.dm | 2 +- .../programs/generic/wordprocessor.dm | 4 +- .../programs/research/ntmonitor.dm | 2 +- code/modules/multiz/ladders.dm | 2 +- .../nifsoft/software/13_soulcatcher.dm | 2 +- code/modules/overmap/bluespace_rift_vr.dm | 2 +- code/modules/paperwork/adminpaper.dm | 4 +- code/modules/paperwork/paper.dm | 2 +- code/modules/paperwork/paperbin.dm | 2 +- code/modules/random_map/drop/droppod.dm | 4 +- code/modules/random_map/drop/supply.dm | 16 ++--- code/modules/random_map/random_map_verbs.dm | 2 +- code/modules/reagents/hoses/connector.dm | 4 +- .../reagents/reagent_containers/spray.dm | 2 +- code/modules/recycling/sortingmachinery.dm | 4 +- code/modules/research/rdconsole_tgui.dm | 4 +- code/modules/research/server.dm | 4 +- code/modules/resleeving/computers.dm | 2 +- code/modules/resleeving/infomorph.dm | 5 +- code/modules/shieldgen/shield_generator.dm | 2 +- code/modules/shuttles/shuttles_web.dm | 4 +- code/modules/spells/spellbook.dm | 2 +- code/modules/surgery/robotics.dm | 4 +- code/modules/tgui/external.dm | 6 +- .../tgui/modules/admin_shuttle_controller.dm | 2 +- code/modules/tgui/modules/agentcard.dm | 2 +- code/modules/tgui/modules/communications.dm | 4 +- code/modules/tgui/tgui_alert.dm | 5 +- code/modules/vchat/vchat_client.dm | 5 +- code/modules/virus2/admin.dm | 6 +- code/modules/vore/eating/living_vr.dm | 11 ++- code/modules/vore/eating/silicon_vr.dm | 2 +- code/modules/vore/eating/simple_animal_vr.dm | 4 +- code/modules/vore/eating/vorepanel_vr.dm | 38 +++++----- .../xenoarcheaology/artifacts/artifact.dm | 2 +- .../tools/artifact_harvester.dm | 2 +- .../tools/geosample_scanner.dm | 4 +- code/modules/xenobio/items/slime_objects.dm | 4 +- .../xenobio2/machinery/gene_manipulators.dm | 2 +- interface/interface.dm | 8 +-- maps/tether/tether_things.dm | 2 +- 191 files changed, 509 insertions(+), 521 deletions(-) diff --git a/code/controllers/subsystems/garbage.dm b/code/controllers/subsystems/garbage.dm index 362a4055bc..9da198fdaf 100644 --- a/code/controllers/subsystems/garbage.dm +++ b/code/controllers/subsystems/garbage.dm @@ -362,7 +362,7 @@ SUBSYSTEM_DEF(garbage) return if(!skip_alert) - if(alert(usr, "Running this will lock everything up for about 5 minutes. Would you like to begin the search?", "Find References", "Yes", "No") == "No") + if(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")) == "No") running_find_references = null return diff --git a/code/controllers/subsystems/media_tracks.dm b/code/controllers/subsystems/media_tracks.dm index bb9e3d8637..53805bcbec 100644 --- a/code/controllers/subsystems/media_tracks.dm +++ b/code/controllers/subsystems/media_tracks.dm @@ -129,7 +129,7 @@ SUBSYSTEM_DEF(media_tracks) if(isnull(genre)) // Cancel rather than empty string return - var/secret = alert(C, "Optional: Mark track as secret?", "Track Secret", "Yes", "Cancel", "No") + var/secret = tgui_alert(C, "Optional: Mark track as secret?", "Track Secret", list("Yes", "Cancel", "No")) if(secret == "Cancel") return else if(secret == "Yes") @@ -137,7 +137,7 @@ SUBSYSTEM_DEF(media_tracks) else secret = FALSE - var/lobby = alert(C, "Optional: Mark track as lobby music?", "Track Lobby", "Yes", "Cancel", "No") + var/lobby = tgui_alert(C, "Optional: Mark track as lobby music?", "Track Lobby", list("Yes", "Cancel", "No")) if(lobby == "Cancel") return else if(secret == "Yes") diff --git a/code/controllers/subsystems/supply.dm b/code/controllers/subsystems/supply.dm index f47131a05a..04908f3f31 100644 --- a/code/controllers/subsystems/supply.dm +++ b/code/controllers/subsystems/supply.dm @@ -309,8 +309,8 @@ SUBSYSTEM_DEF(supply) // Will delete the specified order from the user-side list /datum/controller/subsystem/supply/proc/delete_order(var/datum/supply_order/O, var/mob/user) // Making sure they know what they're doing - if(alert(user, "Are you sure you want to delete this record? If it has been approved, cargo points will NOT be refunded!", "Delete Record","No","Yes") == "Yes") - if(alert(user, "Are you really sure? There is no way to recover the order once deleted.", "Delete Record", "No","Yes") == "Yes") + if(tgui_alert(user, "Are you sure you want to delete this record? If it has been approved, cargo points will NOT be refunded!", "Delete Record",list("No","Yes")) == "Yes") + if(tgui_alert(user, "Are you really sure? There is no way to recover the order once deleted.", "Delete Record", list("No","Yes")) == "Yes") log_admin("[key_name(user)] has deleted supply order \ref[O] [O] from the user-side order history.") order_history -= O return @@ -353,8 +353,8 @@ SUBSYSTEM_DEF(supply) // Will delete the specified export receipt from the user-side list /datum/controller/subsystem/supply/proc/delete_export(var/datum/exported_crate/E, var/mob/user) // Making sure they know what they're doing - if(alert(user, "Are you sure you want to delete this record?", "Delete Record","No","Yes") == "Yes") - if(alert(user, "Are you really sure? There is no way to recover the receipt once deleted.", "Delete Record", "No","Yes") == "Yes") + if(tgui_alert(user, "Are you sure you want to delete this record?", "Delete Record",list("No","Yes")) == "Yes") + if(tgui_alert(user, "Are you really sure? There is no way to recover the receipt once deleted.", "Delete Record", list("No","Yes")) == "Yes") log_admin("[key_name(user)] has deleted export receipt \ref[E] [E] from the user-side export history.") exported_crates -= E return diff --git a/code/controllers/subsystems/vote.dm b/code/controllers/subsystems/vote.dm index 210d97a2a2..e4deb85a88 100644 --- a/code/controllers/subsystems/vote.dm +++ b/code/controllers/subsystems/vote.dm @@ -352,7 +352,7 @@ SUBSYSTEM_DEF(vote) if("cancel") if(usr.client.holder) - if("Yes" == alert(usr, "You are about to cancel this vote. Are you sure?", "Cancel Vote", "No", "Yes")) + if("Yes" == tgui_alert(usr, "You are about to cancel this vote. Are you sure?", list("Cancel Vote", "No", "Yes"))) reset() if("toggle_restart") if(usr.client.holder) diff --git a/code/datums/datumvars.dm b/code/datums/datumvars.dm index da98fd4cef..ec17f07b9b 100644 --- a/code/datums/datumvars.dm +++ b/code/datums/datumvars.dm @@ -42,7 +42,7 @@ var/client/C = value["value"] if (!C) return - var/prompt = alert(usr, "Do you want to grant [C] access to view this VV window? (they will not be able to edit or change anysrc nor open nested vv windows unless they themselves are an admin)", "Confirm", "Yes", "No") + var/prompt = tgui_alert(usr, "Do you want to grant [C] access to view this VV window? (they will not be able to edit or change anysrc nor open nested vv windows unless they themselves are an admin)", "Confirm", list("Yes", "No")) if (prompt != "Yes" || !usr.client) return message_admins("[key_name_admin(usr)] Showed [key_name_admin(C)] a VV window") diff --git a/code/datums/ghost_query.dm b/code/datums/ghost_query.dm index f3a84d533d..454b009271 100644 --- a/code/datums/ghost_query.dm +++ b/code/datums/ghost_query.dm @@ -46,14 +46,14 @@ window_flash(C) if(query_sound) SEND_SOUND(C, sound(query_sound)) - var/response = alert(C, question, "[role_name] request", "Yes", "No", "Never for this round") + var/response = tgui_alert(C, question, "[role_name] request", list("Yes", "No", "Never for this round")) if(response == "Yes") - response = alert(C, "Are you sure you want to play as a [role_name]?", "[role_name] request", "Yes", "No") // Protection from a misclick. + response = tgui_alert(C, "Are you sure you want to play as a [role_name]?", "[role_name] request", list("Yes", "No")) // Protection from a misclick. if(!C || !src) return if(response == "Yes") if(finished || (cutoff_number && candidates.len >= cutoff_number) ) - to_chat(C, "Unfortunately, you were not fast enough, and there are no more available roles. Sorry.") + to_chat(C, "Unfortunately, you were not fast enough, and there are no more available roles. Sorry.") return candidates.Add(C.mob) if(cutoff_number && candidates.len >= cutoff_number) diff --git a/code/datums/locations/locations.dm b/code/datums/locations/locations.dm index 688217fea0..575f123f1b 100644 --- a/code/datums/locations/locations.dm +++ b/code/datums/locations/locations.dm @@ -30,8 +30,7 @@ var/global/datum/locations/milky_way/all_locations = new() /proc/choose_location_datum(client/user) var/datum/locations/choice = all_locations while(length(choice.contents) > 0) //For some reason it wouldn't let me do contents.len even when I defined it as a list. - var/specific = alert(user, "The location currently selected is [choice.name]. More specific options exist, would you like to pick a more specific location?", - "Choose location", "Yes", "No") + var/specific = tgui_alert(user, "The location currently selected is [choice.name]. More specific options exist, would you like to pick a more specific location?", "Choose location", list("Yes", "No")) if(specific == "Yes" && length(choice.contents) > 0) choice = input(user, "Please choose a location.", "Locations") as null|anything in choice.contents else diff --git a/code/datums/managed_browsers/feedback_form.dm b/code/datums/managed_browsers/feedback_form.dm index 00755c7624..6004fff5b2 100644 --- a/code/datums/managed_browsers/feedback_form.dm +++ b/code/datums/managed_browsers/feedback_form.dm @@ -129,7 +129,7 @@ GENERAL_PROTECT_DATUM(/datum/managed_browser/feedback_form) to_chat(my_client, span("warning", "It appears you didn't write anything, or it was invalid.")) return - if(alert(my_client, "Are you sure you want to submit your feedback?", "Confirm Submission", "No", "Yes") == "Yes") + if(tgui_alert(my_client, "Are you sure you want to submit your feedback?", "Confirm Submission", list("No", "Yes")) == "Yes") var/author_text = my_client.ckey if(can_be_private() && feedback_hide_author) author_text = md5(my_client.ckey + SSsqlite.get_feedback_pepper()) diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 9ecada8a9e..e135944170 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -122,7 +122,7 @@ /datum/mind/proc/edit_memory() if(!ticker || !ticker.mode) - alert(usr, "Not before round-start!", "Alert") + tgui_alert_async(usr, "Not before round-start!", "Alert") return var/out = "[name][(current&&(current.real_name!=name))?" (as [current.real_name])":""]
" diff --git a/code/defines/obj.dm b/code/defines/obj.dm index 8103e91a14..8272b7d39b 100644 --- a/code/defines/obj.dm +++ b/code/defines/obj.dm @@ -8,7 +8,7 @@ return attack_hand(user) /obj/structure/signpost/attack_hand(mob/user as mob) - if(alert(user, "Travel back to ss13?","Return?","Yes","No") == "Yes") + if(tgui_alert(user, "Travel back to ss13?","Return?",list("Yes","No")) == "Yes") if(user.z != src.z) return user.forceMove(pick(latejoin)) diff --git a/code/game/antagonist/antagonist_factions.dm b/code/game/antagonist/antagonist_factions.dm index 18bfddcdfd..6e18b57a3b 100644 --- a/code/game/antagonist/antagonist_factions.dm +++ b/code/game/antagonist/antagonist_factions.dm @@ -34,7 +34,7 @@ message_admins("[src]([src.ckey]) attempted to convert [player.current].") player.rev_cooldown = world.time+100 - var/choice = alert(player.current, "Asked by [src]: Do you want to join the [faction.faction_descriptor]?", "Join the [faction.faction_descriptor]?", "No!","Yes!") + var/choice = tgui_alert(player.current, "Asked by [src]: Do you want to join the [faction.faction_descriptor]?", "Join the [faction.faction_descriptor]?", list("No!","Yes!")) if(choice == "Yes!" && faction.add_antagonist_mind(player, 0, faction.faction_role_text, faction.faction_welcome)) to_chat(src, "\The [player.current] joins the [faction.faction_descriptor]!") return diff --git a/code/game/antagonist/station/highlander.dm b/code/game/antagonist/station/highlander.dm index c1c7592d7b..9b54383278 100644 --- a/code/game/antagonist/station/highlander.dm +++ b/code/game/antagonist/station/highlander.dm @@ -56,7 +56,7 @@ var/datum/antagonist/highlander/highlanders /proc/only_one() if(!ticker) - alert(usr,"The game hasn't started yet!") + tgui_alert_async(usr,"The game hasn't started yet!") return for(var/mob/living/carbon/human/H in player_list) diff --git a/code/game/gamemodes/changeling/powers/fake_death.dm b/code/game/gamemodes/changeling/powers/fake_death.dm index de50443a8d..daa0b9e246 100644 --- a/code/game/gamemodes/changeling/powers/fake_death.dm +++ b/code/game/gamemodes/changeling/powers/fake_death.dm @@ -22,7 +22,7 @@ to_chat(src, "We have no genomes, not even our own, and cannot regenerate.") return 0 - if(!C.stat && alert(src, "Are we sure we wish to regenerate? We will appear to be dead while doing so.","Revival","Yes","No") == "No") + if(!C.stat && tgui_alert(src, "Are we sure we wish to regenerate? We will appear to be dead while doing so.","Revival",list("Yes","No")) == "No") return to_chat(C, "We will attempt to regenerate our form.") diff --git a/code/game/gamemodes/cult/ritual.dm b/code/game/gamemodes/cult/ritual.dm index 2b388e683e..e3aac4fb4e 100644 --- a/code/game/gamemodes/cult/ritual.dm +++ b/code/game/gamemodes/cult/ritual.dm @@ -330,10 +330,10 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa"," return if (C>=26 + runedec + cult.current_antagonists.len) //including the useless rune at the secret room, shouldn't count against the limit of 25 runes - Urist - alert(user, "The cloth of reality can't take that much of a strain. Remove some runes first!") + tgui_alert_async(user, "The cloth of reality can't take that much of a strain. Remove some runes first!") return else - switch(alert(user, "You open the tome", "Tome", "Read it","Scribe a rune","Cancel")) + switch(tgui_alert(user, "You open the tome", "Tome", list("Read it","Scribe a rune","Cancel"))) if("Cancel") return if("Read it") diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm index 7526cecad5..05507ec6a4 100644 --- a/code/game/gamemodes/cult/runes.dm +++ b/code/game/gamemodes/cult/runes.dm @@ -172,7 +172,7 @@ var/list/sacrificed = list() to_chat(target, "And you were able to force it out of your mind. You now know the truth, there's something horrible out there, stop it and its minions at all costs.") else spawn() - var/choice = alert(target,"Do you want to join the cult?","Submit to Nar'Sie","Resist","Submit") + var/choice = tgui_alert(target,"Do you want to join the cult?","Submit to Nar'Sie",list("Resist","Submit")) waiting_for_input[target] = 0 if(choice == "Submit") //choosing 'Resist' does nothing of course. cult.add_antagonist(target.mind) diff --git a/code/game/gamemodes/malfunction/newmalf_ability_trees/HARDWARE.dm b/code/game/gamemodes/malfunction/newmalf_ability_trees/HARDWARE.dm index 0390fb55f7..df2d223c6e 100644 --- a/code/game/gamemodes/malfunction/newmalf_ability_trees/HARDWARE.dm +++ b/code/game/gamemodes/malfunction/newmalf_ability_trees/HARDWARE.dm @@ -23,7 +23,7 @@ user.bombing_core = 0 return - var/choice = alert(user, "Really destroy core?", "Core self-destruct", "YES", "NO") + var/choice = tgui_alert(user, "Really destroy core?", "Core self-destruct", list("YES", "NO")) if(choice != "YES") return @@ -82,7 +82,7 @@ user.bombing_station = 0 return - var/choice = alert(user, "Really destroy station?", "Station self-destruct", "YES", "NO") + var/choice = tgui_alert(user, "Really destroy station?", "Station self-destruct", list("YES", "NO")) if(choice != "YES") return if(!ability_prechecks(user, 0, 0)) diff --git a/code/game/gamemodes/malfunction/newmalf_ability_trees/HELPERS.dm b/code/game/gamemodes/malfunction/newmalf_ability_trees/HELPERS.dm index ec32f445d7..d149450025 100644 --- a/code/game/gamemodes/malfunction/newmalf_ability_trees/HELPERS.dm +++ b/code/game/gamemodes/malfunction/newmalf_ability_trees/HELPERS.dm @@ -47,7 +47,7 @@ error("Hardware without description: [C]") return - var/confirmation = alert(user, "[note] - Is this what you want?", "Hardware selection", "Yes", "No") + var/confirmation = tgui_alert(user, "[note] - Is this what you want?", "Hardware selection", list("Yes", "No")) if(confirmation != "Yes") to_chat(user, "Selection cancelled. Use command again to select") return diff --git a/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_interdiction.dm b/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_interdiction.dm index aeb2439eeb..24a36f93c7 100644 --- a/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_interdiction.dm +++ b/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_interdiction.dm @@ -47,7 +47,7 @@ if(!ability_prechecks(user, price)) return - if (alert(user, "Really recall the shuttle?", "Recall Shuttle: ", "Yes", "No") != "Yes") + if (tgui_alert(user, "Really recall the shuttle?", "Recall Shuttle: ", list(list("Yes", "No"))) != "Yes") return if(!ability_pay(user, price)) @@ -102,7 +102,7 @@ break if(target) - if(alert(user, "Really try to unlock cyborg [target.name]?", "Unlock Cyborg", "Yes", "No") != "Yes") + if(tgui_alert(user, "Really try to unlock cyborg [target.name]?", "Unlock Cyborg", list("Yes", "No")) != "Yes") return if(!ability_pay(user, price)) return @@ -153,7 +153,7 @@ return if(target) - if(alert(user, "Really try to hack cyborg [target.name]?", "Hack Cyborg", "Yes", "No") != "Yes") + if(tgui_alert(user, "Really try to hack cyborg [target.name]?", "Hack Cyborg", list("Yes", "No")) != "Yes") return if(!ability_pay(user, price)) return @@ -213,7 +213,7 @@ return if(target) - if(alert(user, "Really try to hack AI [target.name]?", "Hack AI", "Yes", "No") != "Yes") + if(tgui_alert(user, "Really try to hack AI [target.name]?", "Hack AI", list("Yes", "No")) != "Yes") return if(!ability_pay(user, price)) return @@ -248,7 +248,7 @@ to_chat(target, "SYSTEM LOG: User: Admin - Connection Lost. Changes Reverted.") return to_chat(user, "Hack succeeded. The AI is now under your exclusive control.") - to_chat(target, "SYSTEM LOG: System re¡3RT5§^#COMU@(#$)TED)@$") + to_chat(target, "SYSTEM LOG: System re�3RT5�^#COMU@(#$)TED)@$") for(var/i = 0, i < 5, i++) var/temptxt = pick("1101000100101001010001001001",\ "0101000100100100000100010010",\ diff --git a/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_networking.dm b/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_networking.dm index 03f7474380..049eb87325 100644 --- a/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_networking.dm +++ b/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_networking.dm @@ -140,7 +140,7 @@ set desc = "500 CPU - Begins hacking station's primary firewall, quickly overtaking remaining APC systems. When completed grants access to station's self-destruct mechanism. Network administrators will probably notice this." var/price = 500 var/mob/living/silicon/ai/user = usr - if (alert(user, "Begin system override? This cannot be stopped once started. The network administrators will probably notice this.", "System Override:", "Yes", "No") != "Yes") + if (tgui_alert(user, "Begin system override? This cannot be stopped once started. The network administrators will probably notice this.", "System Override:", list("Yes", "No")) != "Yes") return if (!ability_prechecks(user, price) || !ability_pay(user, price) || user.system_override) if(user.system_override) diff --git a/code/game/gamemodes/nuclear/pinpointer.dm b/code/game/gamemodes/nuclear/pinpointer.dm index 80e9053e42..e6a5806e17 100644 --- a/code/game/gamemodes/nuclear/pinpointer.dm +++ b/code/game/gamemodes/nuclear/pinpointer.dm @@ -120,7 +120,7 @@ target=null location = null - switch(alert(usr, "Please select the mode you want to put the pinpointer in.", "Pinpointer Mode Select", "Location", "Disk Recovery", "Other Signature")) + switch(tgui_alert(usr, "Please select the mode you want to put the pinpointer in.", "Pinpointer Mode Select", list("Location", "Disk Recovery", "Other Signature"))) if("Location") mode = 1 @@ -145,7 +145,7 @@ if("Other Signature") mode = 2 - switch(alert(usr, "Search for item signature or DNA fragment?" , "Signature Mode Select" , "" , "Item" , "DNA")) + switch(tgui_alert(usr, "Search for item signature or DNA fragment?", "Signature Mode Select", list("Item", "DNA"))) if("Item") var/datum/objective/steal/itemlist diff --git a/code/game/gamemodes/sandbox/h_sandbox.dm b/code/game/gamemodes/sandbox/h_sandbox.dm index cde2f9a2a2..49d5901527 100644 --- a/code/game/gamemodes/sandbox/h_sandbox.dm +++ b/code/game/gamemodes/sandbox/h_sandbox.dm @@ -101,7 +101,7 @@ mob hsb.req_access = list() var/accesses = get_all_accesses() for(var/A in accesses) - if(alert(usr, "Will this airlock require [get_access_desc(A)] access?", "Sandbox:", "Yes", "No") == "Yes") + if(tgui_alert(usr, "Will this airlock require [get_access_desc(A)] access?", "Sandbox:", list("Yes", "No")) == "Yes") LAZYADD(hsb.req_access, A) hsb.loc = usr.loc diff --git a/code/game/gamemodes/technomancer/spells/control.dm b/code/game/gamemodes/technomancer/spells/control.dm index 0e0cf5eb20..3ca26b3b04 100644 --- a/code/game/gamemodes/technomancer/spells/control.dm +++ b/code/game/gamemodes/technomancer/spells/control.dm @@ -88,8 +88,7 @@ /obj/item/weapon/spell/control/on_use_cast(mob/living/user) if(controlled_mobs.len != 0) - var/choice = alert(user,"Would you like to release control of the entities you are controlling? They won't be friendly \ - to you anymore if you do this, so be careful.","Release Control?","No","Yes") + var/choice = tgui_alert(user,"Would you like to release control of the entities you are controlling? They won't be friendly to you anymore if you do this, so be careful.","Release Control?",list("No","Yes")) if(choice == "Yes") for(var/mob/living/L in controlled_mobs) deselect(L) diff --git a/code/game/gamemodes/technomancer/spells/illusion.dm b/code/game/gamemodes/technomancer/spells/illusion.dm index 5d626f7c47..dcadf53ffb 100644 --- a/code/game/gamemodes/technomancer/spells/illusion.dm +++ b/code/game/gamemodes/technomancer/spells/illusion.dm @@ -44,7 +44,7 @@ /obj/item/weapon/spell/illusion/on_use_cast(mob/user) if(illusion) - var/choice = alert(user, "Would you like to have \the [illusion] speak, or do an emote?", "Illusion", "Speak","Emote","Cancel") + var/choice = tgui_alert(user, "Would you like to have \the [illusion] speak, or do an emote?", "Illusion", list("Speak","Emote","Cancel")) switch(choice) if("Cancel") return diff --git a/code/game/machinery/bioprinter.dm b/code/game/machinery/bioprinter.dm index 43cd3e0e2d..285268b75e 100644 --- a/code/game/machinery/bioprinter.dm +++ b/code/game/machinery/bioprinter.dm @@ -132,7 +132,7 @@ return if(container) - var/response = alert(user, "What do you want to do?", "Bioprinter Menu", "Print Limbs", "Cancel") + var/response = tgui_alert(user, "What do you want to do?", list("Bioprinter Menu", "Print Limbs", "Cancel")) if(response == "Print Limbs") printing_menu(user) else diff --git a/code/game/machinery/camera/camera_assembly.dm b/code/game/machinery/camera/camera_assembly.dm index 9f73b10e61..7793a0ebbe 100644 --- a/code/game/machinery/camera/camera_assembly.dm +++ b/code/game/machinery/camera/camera_assembly.dm @@ -110,7 +110,7 @@ if(direct != "LEAVE IT") C.dir = text2dir(direct) if(i != 0) - var/confirm = alert(user, "Is this what you want? Chances Remaining: [i]", "Confirmation", "Yes", "No") + var/confirm = tgui_alert(user, "Is this what you want? Chances Remaining: [i]", "Confirmation", list("Yes", "No")) if(confirm == "Yes") break return diff --git a/code/game/machinery/computer/ai_core.dm b/code/game/machinery/computer/ai_core.dm index 397366c6c2..72fa3cb656 100644 --- a/code/game/machinery/computer/ai_core.dm +++ b/code/game/machinery/computer/ai_core.dm @@ -168,7 +168,7 @@ playsound(src, P.usesound, 50, 1) to_chat(user, "You connect the monitor.") if(!brain) - var/open_for_latejoin = alert(user, "Would you like this core to be open for latejoining AIs?", "Latejoin", "Yes", "Yes", "No") == "Yes" + var/open_for_latejoin = tgui_alert(user, "Would you like this core to be open for latejoining AIs?", "Latejoin", list("Yes", "No")) == "Yes" var/obj/structure/AIcore/deactivated/D = new(loc) if(open_for_latejoin) empty_playable_ai_cores += D diff --git a/code/game/machinery/computer/guestpass.dm b/code/game/machinery/computer/guestpass.dm index 12789b4ecb..260633fd71 100644 --- a/code/game/machinery/computer/guestpass.dm +++ b/code/game/machinery/computer/guestpass.dm @@ -45,7 +45,7 @@ to_chat(user, "This guest pass is already deactivated!") return - var/confirm = alert(usr, "Do you really want to deactivate this guest pass? (you can't reactivate it)", "Confirm Deactivation", "Yes", "No") + var/confirm = tgui_alert(usr, "Do you really want to deactivate this guest pass? (you can't reactivate it)", "Confirm Deactivation", list("Yes", "No")) if(confirm == "Yes") //rip guest pass \The [user] deactivates \the [src].") diff --git a/code/game/machinery/computer/id_restorer_vr.dm b/code/game/machinery/computer/id_restorer_vr.dm index af7f9304f9..c9bbf49a27 100644 --- a/code/game/machinery/computer/id_restorer_vr.dm +++ b/code/game/machinery/computer/id_restorer_vr.dm @@ -37,7 +37,7 @@ to_chat(user, "No ID is inserted.") return - var/choice = alert(user,"What do you want to do?","[src]","Restore ID access","Eject ID","Cancel") + var/choice = tgui_alert(user,"What do you want to do?","[src]",list("Restore ID access","Eject ID","Cancel")) if(user.incapacitated() || (get_dist(src, user) > 1)) return switch(choice) diff --git a/code/game/machinery/computer/shuttle.dm b/code/game/machinery/computer/shuttle.dm index d3de10cba1..d4e5867549 100644 --- a/code/game/machinery/computer/shuttle.dm +++ b/code/game/machinery/computer/shuttle.dm @@ -28,7 +28,7 @@ to_chat(user, "The access level of [W:registered_name]\'s card is not high enough. ") return 0 - var/choice = alert(user, text("Would you like to (un)authorize a shortened launch time? [] authorization\s are still needed. Use abort to cancel all authorizations.", src.auth_need - src.authorized.len), "Shuttle Launch", "Authorize", "Repeal", "Abort") + var/choice = tgui_alert(user, text("Would you like to (un)authorize a shortened launch time? [] authorization\s are still needed. Use abort to cancel all authorizations.", src.auth_need - src.authorized.len), "Shuttle Launch", list("Authorize", "Repeal", "Abort")) if(emergency_shuttle.location() && user.get_active_hand() != W) return 0 switch(choice) @@ -58,7 +58,7 @@ src.authorized = list( ) else if (istype(W, /obj/item/weapon/card/emag) && !emagged) - var/choice = alert(user, "Would you like to launch the shuttle?","Shuttle control", "Launch", "Cancel") + var/choice = tgui_alert(user, "Would you like to launch the shuttle?", "Shuttle control", list("Launch", "Cancel")) if(!emagged && !emergency_shuttle.location() && user.get_active_hand() == W) switch(choice) diff --git a/code/game/machinery/computer/supply.dm b/code/game/machinery/computer/supply.dm index df2aebaef0..e805e151bd 100644 --- a/code/game/machinery/computer/supply.dm +++ b/code/game/machinery/computer/supply.dm @@ -394,7 +394,7 @@ if(!(authorization & SUP_ACCEPT_ORDERS)) return FALSE var/list/L = E.contents[params["index"]] - var/field = alert(usr, "Select which field to edit", , "Name", "Quantity", "Value") + var/field = tgui_alert(usr, "Select which field to edit", "Field Choice", list("Name", "Quantity", "Value")) var/new_val = sanitize(input(usr, field, "Enter the new value for this field:", L[lowertext(field)]) as null|text) if(!new_val) diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index b0f77a97a9..51d97df592 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -664,7 +664,7 @@ var/willing = null //We don't want to allow people to be forced into despawning. if(M.client) - if(alert(M,"Would you like to enter long-term storage?","Cryopod","Yes","No") == "Yes") + if(tgui_alert(M,"Would you like to enter long-term storage?","Cryopod",list("Yes","No")) == "Yes") if(!M) return willing = 1 else diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm index e9585aa812..d7617f5309 100644 --- a/code/game/machinery/doors/firedoor.dm +++ b/code/game/machinery/doors/firedoor.dm @@ -152,8 +152,8 @@ if(A.firedoors_closed) alarmed = 1 - var/answer = alert(user, "Would you like to [density ? "open" : "close"] this [src.name]?[ alarmed && density ? "\nNote that by doing so, you acknowledge any damages from opening this\n[src.name] as being your own fault, and you will be held accountable under the law." : ""]",\ - "\The [src]", "Yes, [density ? "open" : "close"]", "No") + var/answer = tgui_alert(user, "Would you like to [density ? "open" : "close"] this [src.name]?[ alarmed && density ? "\nNote that by doing so, you acknowledge any damages from opening this\n[src.name] as being your own fault, and you will be held accountable under the law." : ""]",\ + "\The [src]", list("Yes, [density ? "open" : "close"]", "No")) if(answer == "No") return if(user.incapacitated() || (get_dist(src, user) > 1 && !issilicon(user))) diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm index 390009f25b..f3f18a7309 100644 --- a/code/game/machinery/hologram.dm +++ b/code/game/machinery/hologram.dm @@ -54,7 +54,7 @@ var/const/HOLOPAD_MODE = RANGE_BASED /obj/machinery/hologram/holopad/attack_hand(var/mob/living/carbon/human/user) //Carn: Hologram requests. if(!istype(user)) return - if(alert(user,"Would you like to request an AI's presence?","Request AI","Yes","No") == "Yes") + if(tgui_alert(user,"Would you like to request an AI's presence?","Request AI",list("Yes","No")) == "Yes") if(last_request + 200 < world.time) //don't spam the AI with requests you jerk! last_request = world.time to_chat(user, "You request an AI's presence.") diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm index f652f04539..d4fb9415a1 100644 --- a/code/game/machinery/newscaster.dm +++ b/code/game/machinery/newscaster.dm @@ -413,7 +413,7 @@ GLOBAL_LIST_BOILERPLATE(allCasters, /obj/machinery/newscaster) set_temp("Error: Could not submit feed channel to network: A feed channel already exists under your name.", "danger", FALSE) return TRUE - var/choice = alert(usr, "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") news_network.CreateFeedChannel(channel_name, our_user, c_locked) set_temp("Feed channel [channel_name] created successfully.", "success", FALSE) @@ -490,11 +490,11 @@ GLOBAL_LIST_BOILERPLATE(allCasters, /obj/machinery/newscaster) set_temp("Error: Could not submit wanted issue to network: Author unverified.", "danger", FALSE) return TRUE - var/choice = alert(usr, "Please confirm Wanted Issue change.", "Network Security Handler", "Confirm", "Cancel") + var/choice = tgui_alert(usr, "Please confirm Wanted Issue change.", "Network Security Handler", list("Confirm", "Cancel")) if(choice == "Confirm") if(news_network.wanted_issue) if(news_network.wanted_issue.is_admin_message) - alert(usr, "The wanted issue has been distributed by a [using_map.company_name] higherup. You cannot edit it.", "Ok") + tgui_alert_async(usr, "The wanted issue has been distributed by a [using_map.company_name] higherup. You cannot edit it.") return news_network.wanted_issue.author = channel_name news_network.wanted_issue.body = msg @@ -519,9 +519,9 @@ GLOBAL_LIST_BOILERPLATE(allCasters, /obj/machinery/newscaster) if(!securityCaster) return FALSE if(news_network.wanted_issue.is_admin_message) - alert(usr, "The wanted issue has been distributed by a [using_map.company_name] higherup. You cannot take it down.","Ok") + tgui_alert_async(usr, "The wanted issue has been distributed by a [using_map.company_name] higherup. You cannot take it down.") return - var/choice = alert(usr, "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") news_network.wanted_issue = null for(var/obj/machinery/newscaster/NEWSCASTER in allCasters) @@ -534,7 +534,7 @@ GLOBAL_LIST_BOILERPLATE(allCasters, /obj/machinery/newscaster) return FALSE var/datum/feed_channel/FC = locate(params["ref"]) if(FC.is_admin_channel) - alert(usr, "This channel was created by a [using_map.company_name] Officer. You cannot censor it.","Ok") + tgui_alert_async(usr, "This channel was created by a [using_map.company_name] Officer. You cannot censor it.") return if(FC.author != "\[REDACTED\]") FC.backup_author = FC.author @@ -549,7 +549,7 @@ GLOBAL_LIST_BOILERPLATE(allCasters, /obj/machinery/newscaster) return FALSE var/datum/feed_message/MSG = locate(params["ref"]) if(MSG.is_admin_message) - alert(usr, "This message was created by a [using_map.company_name] Officer. You cannot censor its author.","Ok") + tgui_alert_async(usr, "This message was created by a [using_map.company_name] Officer. You cannot censor its author.") return if(MSG.author != "\[REDACTED\]") MSG.backup_author = MSG.author @@ -564,7 +564,7 @@ GLOBAL_LIST_BOILERPLATE(allCasters, /obj/machinery/newscaster) return FALSE var/datum/feed_message/MSG = locate(params["ref"]) if(MSG.is_admin_message) - alert(usr, "This channel was created by a [using_map.company_name] Officer. You cannot censor it.","Ok") + tgui_alert_async(usr, "This channel was created by a [using_map.company_name] Officer. You cannot censor it.") return if(MSG.body != "\[REDACTED\]") MSG.backup_body = MSG.body @@ -586,7 +586,7 @@ GLOBAL_LIST_BOILERPLATE(allCasters, /obj/machinery/newscaster) return FALSE var/datum/feed_channel/FC = locate(params["ref"]) if(FC.is_admin_channel) - alert(usr, "This channel was created by a [using_map.company_name] Officer. You cannot place a D-Notice upon it.","Ok") + tgui_alert_async(usr, "This channel was created by a [using_map.company_name] Officer. You cannot place a D-Notice upon it.") return FC.censored = !FC.censored FC.update() diff --git a/code/game/machinery/pipe/pipelayer.dm b/code/game/machinery/pipe/pipelayer.dm index e671f2bb52..897b981eea 100644 --- a/code/game/machinery/pipe/pipelayer.dm +++ b/code/game/machinery/pipe/pipelayer.dm @@ -59,7 +59,7 @@ if(metal < 1) to_chat(user, "\The [src] is empty.") return - var/answer = alert(user, "Do you want to eject all the metal in \the [src]?", , "Yes","No") + var/answer = tgui_alert(user, "Do you want to eject all the metal in \the [src]?", "Eject?", list("Yes","No")) if(answer == "Yes") var/amount_ejected = eject_metal() user.visible_message("[user] removes [amount_ejected] sheet\s of [DEFAULT_WALL_MATERIAL] from the \the [src].", diff --git a/code/game/machinery/transportpod.dm b/code/game/machinery/transportpod.dm index 4a43cb1890..145950291c 100644 --- a/code/game/machinery/transportpod.dm +++ b/code/game/machinery/transportpod.dm @@ -62,7 +62,7 @@ O.forceMove(src) occupant = O update_icon() - if(alert(O, "Are you sure you're ready to launch?", , "Yes", "No") == "Yes") + if(tgui_alert(O, "Are you sure you're ready to launch?", "Transport Pod", list("Yes", "No")) == "Yes") in_transit = 1 playsound(src, HYPERSPACE_WARMUP) else diff --git a/code/game/machinery/virtual_reality/ar_console.dm b/code/game/machinery/virtual_reality/ar_console.dm index f4c6049487..5067c47600 100644 --- a/code/game/machinery/virtual_reality/ar_console.dm +++ b/code/game/machinery/virtual_reality/ar_console.dm @@ -57,7 +57,7 @@ if(!occupant) return - if(!forced && avatar && avatar.stat != DEAD && alert(avatar, "Someone wants to remove you from virtual reality. Do you want to leave?", "Leave VR?", "Yes", "No") == "No") + if(!forced && avatar && avatar.stat != DEAD && tgui_alert(avatar, "Someone wants to remove you from virtual reality. Do you want to leave?", "Leave VR?", list("Yes", "No")) == "No") return avatar.exit_vr() @@ -89,7 +89,7 @@ if(avatar && !occupant.stat) to_chat(occupant,"\The [src] begins to [pick("whir","hum","pulse")] as a screen appears in front of you.") - if(alert(occupant, "This pod is already linked. Are you certain you wish to engage?", "Commmit?", "Yes", "No") == "No") + if(tgui_alert(occupant, "This pod is already linked. Are you certain you wish to engage?", "Commmit?", list("Yes", "No")) == "No") visible_message("\The [src] pulses!") to_chat(occupant,"Your mind blurs as information bombards you.") diff --git a/code/game/machinery/virtual_reality/vr_console.dm b/code/game/machinery/virtual_reality/vr_console.dm index 42179442f0..8833942232 100644 --- a/code/game/machinery/virtual_reality/vr_console.dm +++ b/code/game/machinery/virtual_reality/vr_console.dm @@ -182,7 +182,7 @@ if(!occupant) return - if(!forced && avatar && alert(avatar, "Someone wants to remove you from virtual reality. Do you want to leave?", "Leave VR?", "Yes", "No") == "No") + if(!forced && avatar && tgui_alert(avatar, "Someone wants to remove you from virtual reality. Do you want to leave?", "Leave VR?", list("Yes", "No")) == "No") return avatar.exit_vr() @@ -218,7 +218,7 @@ avatar = occupant.vr_link // If they've already enterred VR, and are reconnecting, prompt if they want a new body - if(avatar && alert(occupant, "You already have a [avatar.stat == DEAD ? "" : "deceased "]Virtual Reality avatar. Would you like to use it?", "New avatar", "Yes", "No") == "No") + if(avatar && tgui_alert(occupant, "You already have a [avatar.stat == DEAD ? "" : "deceased "]Virtual Reality avatar. Would you like to use it?", "New avatar", list("Yes", "No")) == "No") // Delink the mob occupant.vr_link = null avatar = null diff --git a/code/game/magic/archived_book.dm b/code/game/magic/archived_book.dm index 6940768da4..6f456dc9d6 100644 --- a/code/game/magic/archived_book.dm +++ b/code/game/magic/archived_book.dm @@ -48,7 +48,8 @@ var/global/datum/book_manager/book_mgr = new() var/DBConnection/dbcon = new() dbcon.Connect("dbi:mysql:[sqldb]:[sqladdress]:[sqlport]","[sqllogin]","[sqlpass]") if(!dbcon.IsConnected()) - alert(usr, "Connection to Archive has been severed. Aborting.") + tgui_alert_async(usr, "Connection to Archive has been severed. Aborting.") + return else var/DBQuery/query = dbcon.NewQuery("DELETE FROM library WHERE id=[isbn]") if(!query.Execute()) diff --git a/code/game/mecha/combat/phazon.dm b/code/game/mecha/combat/phazon.dm index 50f4e8727f..8ec100ad1e 100644 --- a/code/game/mecha/combat/phazon.dm +++ b/code/game/mecha/combat/phazon.dm @@ -143,7 +143,7 @@ ..() /obj/mecha/combat/phazon/janus/query_damtype() - var/new_damtype = alert(src.occupant,"Gauntlet Phase Emitter Mode","Damage Type","Force","Energy","Stun") + var/new_damtype = tgui_alert(src.occupant,"Gauntlet Phase Emitter Mode","Damage Type",list("Force","Energy","Stun")) switch(new_damtype) if("Force") damtype = "brute" diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index cacaf0d75a..a9bd41347e 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -2546,7 +2546,7 @@ if(newname) name = newname else - alert(occupant, "nope.avi") + tgui_alert_async(occupant, "nope.avi") return if (href_list["toggle_id_upload"]) if(usr != src.occupant) return diff --git a/code/game/mecha/mecha_actions.dm b/code/game/mecha/mecha_actions.dm index 1e1c790704..33d7d711e8 100644 --- a/code/game/mecha/mecha_actions.dm +++ b/code/game/mecha/mecha_actions.dm @@ -399,7 +399,7 @@ /obj/mecha/proc/query_damtype() if(usr!=src.occupant) return - var/new_damtype = alert(src.occupant,"Melee Damage Type","Damage Type","Brute","Fire","Toxic") + var/new_damtype = tgui_alert(src.occupant,"Melee Damage Type","Damage Type",list("Brute","Fire","Toxic")) switch(new_damtype) if("Brute") damtype = "brute" diff --git a/code/game/objects/effects/decals/contraband.dm b/code/game/objects/effects/decals/contraband.dm index 8370872263..57aaad3780 100644 --- a/code/game/objects/effects/decals/contraband.dm +++ b/code/game/objects/effects/decals/contraband.dm @@ -195,7 +195,7 @@ if(ruined) return - if(alert(usr, "Do I want to rip the poster from the wall?","You think...","Yes","No") == "Yes") + if(tgui_alert(usr, "Do I want to rip the poster from the wall?","You think...",list("Yes","No")) == "Yes") if(ruined || !user.Adjacent(src)) return diff --git a/code/game/objects/effects/decals/posters/posters.dm b/code/game/objects/effects/decals/posters/posters.dm index b323ef8946..d5232edbda 100644 --- a/code/game/objects/effects/decals/posters/posters.dm +++ b/code/game/objects/effects/decals/posters/posters.dm @@ -178,7 +178,7 @@ if(ruined) return - if(alert(usr, "Do I want to rip the poster from the wall?","You think...","Yes","No") == "Yes") + if(tgui_alert(usr, "Do I want to rip the poster from the wall?","You think...",list("Yes","No")) == "Yes") if(ruined || !user.Adjacent(src)) return diff --git a/code/game/objects/items/bodybag.dm b/code/game/objects/items/bodybag.dm index f066b6047c..f0d7fd8eb1 100644 --- a/code/game/objects/items/bodybag.dm +++ b/code/game/objects/items/bodybag.dm @@ -148,8 +148,7 @@ /obj/structure/closet/body_bag/cryobag/attack_hand(mob/living/user) if(used) - var/confirm = alert(user, "Are you sure you want to open \the [src]? \ - \The [src] will expire upon opening it.", "Confirm Opening", "No", "Yes") + var/confirm = tgui_alert(user, "Are you sure you want to open \the [src]? \The [src] will expire upon opening it.", "Confirm Opening", list("No", "Yes")) if(confirm == "Yes") ..() // Will call `toggle()` and open the bag. else diff --git a/code/game/objects/items/devices/body_snatcher_vr.dm b/code/game/objects/items/devices/body_snatcher_vr.dm index e2287d5fce..8696c6166b 100644 --- a/code/game/objects/items/devices/body_snatcher_vr.dm +++ b/code/game/objects/items/devices/body_snatcher_vr.dm @@ -29,7 +29,7 @@ to_chat(usr,"A warning pops up on the device, informing you that [M] is dead, and, as such, the mind transfer can not be done.") return - var/choice = alert(usr,"This will swap your mind with the target's mind. This will result in them controlling your body, and you controlling their body. Continue?","Confirmation","Continue","Cancel") + var/choice = tgui_alert(usr,"This will swap your mind with the target's mind. This will result in them controlling your body, and you controlling their body. Continue?","Confirmation",list("Continue","Cancel")) if(choice == "Continue" && usr.get_active_hand() == src && usr.Adjacent(M)) usr.visible_message("[usr] pushes the device up their forehead and [M]'s head, the device beginning to let out a series of light beeps!","You begin swap minds with [M]!") diff --git a/code/game/objects/items/devices/communicator/phone.dm b/code/game/objects/items/devices/communicator/phone.dm index 16543ee2c0..a7af8703f8 100644 --- a/code/game/objects/items/devices/communicator/phone.dm +++ b/code/game/objects/items/devices/communicator/phone.dm @@ -286,8 +286,7 @@ if (usr != src) return //something is terribly wrong - var/confirm = alert(src, "Would you like to talk as [src.client.prefs.real_name], over a communicator? \ - This will reset your respawn timer, if someone answers.", "Join as Voice?", "Yes","No") + var/confirm = tgui_alert(src, "Would you like to talk as [src.client.prefs.real_name], over a communicator? This will reset your respawn timer, if someone answers.", "Join as Voice?", list("Yes","No")) if(confirm == "No") return diff --git a/code/game/objects/items/devices/denecrotizer_vr.dm b/code/game/objects/items/devices/denecrotizer_vr.dm index 35df978bd8..4c59cd7208 100644 --- a/code/game/objects/items/devices/denecrotizer_vr.dm +++ b/code/game/objects/items/devices/denecrotizer_vr.dm @@ -21,7 +21,7 @@ if(!ghostjoin) return ..() - var/reply = alert(usr, "Would you like to become [src]? It is bound to [revivedby].","Bind To","Yes","No") + var/reply = tgui_alert(usr, "Would you like to become [src]? It is bound to [revivedby].","Bind To",list("Yes","No")) if(reply == "No") return diff --git a/code/game/objects/items/devices/holowarrant.dm b/code/game/objects/items/devices/holowarrant.dm index 854282f55a..c5d1a2bdb9 100644 --- a/code/game/objects/items/devices/holowarrant.dm +++ b/code/game/objects/items/devices/holowarrant.dm @@ -40,7 +40,7 @@ if(active) var/obj/item/weapon/card/id/I = W.GetIdCard() if(access_hos in I.access) // VOREStation edit - var/choice = alert(user, "Would you like to authorize this warrant?","Warrant authorization","Yes","No") + var/choice = tgui_alert(user, "Would you like to authorize this warrant?","Warrant authorization",list("Yes","No")) if(choice == "Yes") active.fields["auth"] = "[I.registered_name] - [I.assignment ? I.assignment : "(Unknown)"]" user.visible_message("You swipe \the [I] through the [src].", \ diff --git a/code/game/objects/items/devices/multitool.dm b/code/game/objects/items/devices/multitool.dm index 5bfbc66464..d2df29a804 100644 --- a/code/game/objects/items/devices/multitool.dm +++ b/code/game/objects/items/devices/multitool.dm @@ -32,7 +32,7 @@ tool_qualities = list(TOOL_MULTITOOL) /obj/item/device/multitool/attack_self(mob/living/user) - var/choice = alert(usr, "What do you want to do with \the [src]?","Multitool Menu", "Switch Mode", "Clear Buffers", "Cancel") + var/choice = tgui_alert(usr, "What do you want to do with \the [src]?","Multitool Menu", "Switch Mode", list("Clear Buffers", "Cancel")) switch(choice) if("Cancel") to_chat(user,"You lower \the [src].") diff --git a/code/game/objects/items/devices/scanners_vr.dm b/code/game/objects/items/devices/scanners_vr.dm index b5adabdb6e..81cbfb3da9 100644 --- a/code/game/objects/items/devices/scanners_vr.dm +++ b/code/game/objects/items/devices/scanners_vr.dm @@ -75,7 +75,7 @@ var/global/mob/living/carbon/human/dummy/mannequin/sleevemate_mob to_chat(user,"No stored mind in \the [src].") return - var/choice = alert(user,"What would you like to do?","Stored: [stored_mind.name]","Delete","Backup","Cancel") + var/choice = tgui_alert(user,"What would you like to do?","Stored: [stored_mind.name]",list("Delete","Backup","Cancel")) if(!stored_mind || user.get_active_hand() != src) return switch(choice) @@ -223,7 +223,7 @@ var/global/mob/living/carbon/human/dummy/mannequin/sleevemate_mob to_chat(usr,"There is already someone's mind stored inside") return - var/choice = alert(usr,"This will remove the target's mind from their body (and from the game as long as they're in the sleevemate). You can put them into a (mindless) body, a NIF, or back them up for normal resleeving, but you should probably have a plan in advance so you don't leave them unable to interact for too long. Continue?","Confirmation","Continue","Cancel") + var/choice = tgui_alert(usr,"This will remove the target's mind from their body (and from the game as long as they're in the sleevemate). You can put them into a (mindless) body, a NIF, or back them up for normal resleeving, but you should probably have a plan in advance so you don't leave them unable to interact for too long. Continue?","Confirmation",list("Continue","Cancel")) if(choice == "Continue" && usr.get_active_hand() == src && usr.Adjacent(target)) usr.visible_message("[usr] begins downloading [target]'s mind!","You begin downloading [target]'s mind!") diff --git a/code/game/objects/items/devices/translocator_vr.dm b/code/game/objects/items/devices/translocator_vr.dm index df7f4a872f..ae4e5d29e4 100644 --- a/code/game/objects/items/devices/translocator_vr.dm +++ b/code/game/objects/items/devices/translocator_vr.dm @@ -120,10 +120,11 @@ if(!(user.ckey in warned_users)) warned_users |= user.ckey - alert(user,"This device can be easily used to break ERP preferences due to the nature of teleporting \ - and tele-vore. Make sure you carefully examine someone's OOC prefs before teleporting them if you are \ - going to use this device for ERP purposes. This device records all warnings given and teleport events for \ - admin review in case of pref-breaking, so just don't do it.","OOC WARNING") + tgui_alert_async(user,{" +This device can be easily used to break ERP preferences due to the nature of teleporting and tele-vore. +Make sure you carefully examine someone's OOC prefs before teleporting them if you are going to use this device for ERP purposes. +This device records all warnings given and teleport events for admin review in case of pref-breaking, so just don't do it. +"},"OOC Warning") var/choice = show_radial_menu(user, radial_menu_anchor, radial_images, custom_check = CALLBACK(src, .proc/check_menu, user), require_near = TRUE, tooltips = TRUE) if(!choice) @@ -162,20 +163,20 @@ rebuild_radial_images() /* Ye olde text-based way - var/choice = alert(user,"What do you want to do?","[src]","Create Beacon","Cancel","Target Beacon") + var/choice = tgui_alert(user,"What do you want to do?","[src]",list("Create Beacon","Cancel","Target Beacon")) switch(choice) if("Create Beacon") if(beacons_left <= 0) - alert(usr, "The translocator can't support any more beacons!","Error") + tgui_alert_async(usr, "The translocator can't support any more beacons!","Error") return var/new_name = html_encode(input(user,"New beacon's name (2-20 char):","[src]") as text|null) if(length(new_name) > 20 || length(new_name) < 2) - alert(usr, "Entered name length invalid (must be longer than 2, no more than than 20).","Error") + tgui_alert_async(usr, "Entered name length invalid (must be longer than 2, no more than than 20).","Error") return if(new_name in beacons) - alert(usr, "No duplicate names, please. '[new_name]' exists already.","Error") + tgui_alert_async(usr, "No duplicate names, please. '[new_name]' exists already.","Error") return var/obj/item/device/perfect_tele_beacon/nb = new(get_turf(src)) @@ -421,14 +422,14 @@ /obj/item/device/perfect_tele_beacon/attack_hand(mob/user) if((user.ckey != creator) && !(user.ckey in warned_users)) warned_users |= user.ckey - var/choice = alert(user,"This device is a translocator beacon. Having it on your person may mean that anyone \ - who teleports to this beacon gets teleported into your selected vore-belly. If you are prey-only \ - or don't wish to potentially have a random person teleported into you, it's suggested that you \ - not carry this around.","OOC WARNING","Take It","Leave It") + var/choice = tgui_alert(user, {" +This device is a translocator beacon. Having it on your person may mean that anyone +who teleports to this beacon gets teleported into your selected vore-belly. If you are prey-only +or don't wish to potentially have a random person teleported into you, it's suggested that you +not carry this around."}, "OOC Warning", list("Take It","Leave It")) if(choice == "Leave It") return - - ..() + ..() /obj/item/device/perfect_tele_beacon/stationary name = "stationary translocator beacon" @@ -443,7 +444,7 @@ GLOBAL_LIST_BOILERPLATE(premade_tele_beacons, /obj/item/device/perfect_tele_beac if(!isliving(user)) return var/mob/living/L = user - var/confirm = alert(user, "You COULD eat the beacon...", "Eat beacon?", "Eat it!", "No, thanks.") + var/confirm = tgui_alert(user, "You COULD eat the beacon...", "Eat beacon?", list("Eat it!", "No, thanks.")) if(confirm == "Eat it!") var/obj/belly/bellychoice = input("Which belly?","Select A Belly") as null|anything in L.vore_organs if(bellychoice) diff --git a/code/game/objects/items/toys/toys.dm b/code/game/objects/items/toys/toys.dm index d105f47174..0b283d0a7a 100644 --- a/code/game/objects/items/toys/toys.dm +++ b/code/game/objects/items/toys/toys.dm @@ -320,7 +320,7 @@ to_chat(user, "You can't do that right now!") return - if(alert(usr, "Are you sure you want to recolor your blade?", "Confirm Recolor", "Yes", "No") == "Yes") + if(tgui_alert(usr, "Are you sure you want to recolor your blade?", "Confirm Recolor", list("Yes", "No")) == "Yes") var/energy_color_input = input(usr,"","Choose Energy Color",lcolor) as color|null if(energy_color_input) lcolor = sanitize_hexcolor(energy_color_input) diff --git a/code/game/objects/items/weapons/circuitboards/computer/supply.dm b/code/game/objects/items/weapons/circuitboards/computer/supply.dm index 78f4bbce1c..49fdd14ee7 100644 --- a/code/game/objects/items/weapons/circuitboards/computer/supply.dm +++ b/code/game/objects/items/weapons/circuitboards/computer/supply.dm @@ -32,7 +32,7 @@ opposite_catastasis = "BROAD" catastasis = "STANDARD" - switch( alert(usr, "Current receiver spectrum is set to: [catastasis]","Multitool-Circuitboard interface","Switch to [opposite_catastasis]","Cancel") ) + switch( tgui_alert(usr, "Current receiver spectrum is set to: [catastasis]","Multitool-Circuitboard interface",list("Switch to [opposite_catastasis]","Cancel")) ) if("Switch to STANDARD","Switch to BROAD") src.contraband_enabled = !src.contraband_enabled diff --git a/code/game/objects/items/weapons/id cards/syndicate_ids.dm b/code/game/objects/items/weapons/id cards/syndicate_ids.dm index 532b174871..0c36756bcc 100644 --- a/code/game/objects/items/weapons/id cards/syndicate_ids.dm +++ b/code/game/objects/items/weapons/id cards/syndicate_ids.dm @@ -38,7 +38,7 @@ if(!registered_user && register_user(user)) to_chat(user, "The microscanner marks you as its owner, preventing others from accessing its internals.") if(registered_user == user) - switch(alert(usr, "Would you like edit the ID, or show it?","Show or Edit?", "Edit","Show")) + switch(tgui_alert(usr, "Would you like edit the ID, or show it?","Show or Edit?", list("Edit","Show"))) if("Edit") agentcard_module.tgui_interact(user) if("Show") diff --git a/code/game/objects/items/weapons/implants/implant.dm b/code/game/objects/items/weapons/implants/implant.dm index 64666c44a4..e1d2cfd398 100644 --- a/code/game/objects/items/weapons/implants/implant.dm +++ b/code/game/objects/items/weapons/implants/implant.dm @@ -287,7 +287,7 @@ Implant Specifics:
"} t.hotspot_expose(3500,125) /obj/item/weapon/implant/explosive/post_implant(mob/source as mob) - elevel = alert(usr, "What sort of explosion would you prefer?", "Implant Intent", "Localized Limb", "Destroy Body", "Full Explosion") + elevel = tgui_alert(usr, "What sort of explosion would you prefer?", "Implant Intent", list("Localized Limb", "Destroy Body", "Full Explosion")) phrase = input("Choose activation phrase:") as text var/list/replacechars = list("'" = "","\"" = "",">" = "","<" = "","(" = "",")" = "") phrase = replace_characters(phrase, replacechars) diff --git a/code/game/objects/items/weapons/melee/energy.dm b/code/game/objects/items/weapons/melee/energy.dm index 77b5b6d732..f6c9774e2e 100644 --- a/code/game/objects/items/weapons/melee/energy.dm +++ b/code/game/objects/items/weapons/melee/energy.dm @@ -191,7 +191,7 @@ to_chat(user, "You can't do that right now!") return - if(alert(usr, "Are you sure you want to recolor your blade?", "Confirm Recolor", "Yes", "No") == "Yes") + if(tgui_alert(usr, "Are you sure you want to recolor your blade?", "Confirm Recolor", list("Yes", "No")) == "Yes") var/energy_color_input = input(usr,"","Choose Energy Color",lcolor) as color|null if(energy_color_input) lcolor = sanitize_hexcolor(energy_color_input) diff --git a/code/game/objects/items/weapons/shields.dm b/code/game/objects/items/weapons/shields.dm index 2d5ad36ef7..f2fb2d6d23 100644 --- a/code/game/objects/items/weapons/shields.dm +++ b/code/game/objects/items/weapons/shields.dm @@ -208,7 +208,7 @@ if(user.incapacitated() || !istype(user)) to_chat(user, "You can't do that right now!") return - if(alert(usr, "Are you sure you want to recolor your shield?", "Confirm Recolor", "Yes", "No") == "Yes") + if(tgui_alert(usr, "Are you sure you want to recolor your shield?", "Confirm Recolor", list("Yes", "No")) == "Yes") var/energy_color_input = input(usr,"","Choose Energy Color",lcolor) as color|null if(energy_color_input) lcolor = sanitize_hexcolor(energy_color_input) diff --git a/code/game/objects/items/weapons/syndie.dm b/code/game/objects/items/weapons/syndie.dm index b97f5303df..98c246a03a 100644 --- a/code/game/objects/items/weapons/syndie.dm +++ b/code/game/objects/items/weapons/syndie.dm @@ -89,7 +89,7 @@ user.visible_message("Without even breaking stride, \the [user] flips open \the [src] in one smooth movement.") else if(lit && detonator_mode) - switch(alert(user, "What would you like to do?", "Lighter", "Press the button.", "Close the lighter.")) + switch(tgui_alert(user, "What would you like to do?", "Lighter", list("Press the button.", "Close the lighter."))) if("Press the button.") to_chat(user, "You press the button.") icon_state = "[base_state]click" diff --git a/code/game/objects/structures/ghost_pods/event_vr.dm b/code/game/objects/structures/ghost_pods/event_vr.dm index 7a04e0ea2c..b1473fd1c1 100644 --- a/code/game/objects/structures/ghost_pods/event_vr.dm +++ b/code/game/objects/structures/ghost_pods/event_vr.dm @@ -56,7 +56,7 @@ break if(choice) - finalized = alert(M, "Are you sure you want to play as [choice]?","Confirmation","No","Yes") + finalized = tgui_alert(M, "Are you sure you want to play as [choice]?","Confirmation",list("No","Yes")) if(randomize) choice = pick(possible_mobs) diff --git a/code/game/objects/structures/ghost_pods/ghost_pods.dm b/code/game/objects/structures/ghost_pods/ghost_pods.dm index 7649c8573f..12256e5ab3 100644 --- a/code/game/objects/structures/ghost_pods/ghost_pods.dm +++ b/code/game/objects/structures/ghost_pods/ghost_pods.dm @@ -50,7 +50,7 @@ /obj/structure/ghost_pod/manual/attack_hand(var/mob/living/user) if(!used) if(confirm_before_open) - if(alert(user, "Are you sure you want to touch \the [src]?", "Confirm", "No", "Yes") == "No") + if(tgui_alert(user, "Are you sure you want to touch \the [src]?", "Confirm", list("No", "Yes")) == "No") return trigger() // VOREStation Addition Start diff --git a/code/game/objects/structures/ghost_pods/silicon_vr.dm b/code/game/objects/structures/ghost_pods/silicon_vr.dm index 865d678294..823208487f 100644 --- a/code/game/objects/structures/ghost_pods/silicon_vr.dm +++ b/code/game/objects/structures/ghost_pods/silicon_vr.dm @@ -2,7 +2,7 @@ remains_active = TRUE /obj/structure/ghost_pod/manual/lost_drone/dogborg/create_occupant(var/mob/M) - var/response = alert(M, "What type of lost drone are you? Do note, that dogborgs may have experienced different type of corruption ((High potential for having vore-related laws))", "Drone Type", "Regular", "Dogborg") + var/response = tgui_alert(M, "What type of lost drone are you? Do note, that dogborgs may have experienced different type of corruption ((High potential for having vore-related laws))", "Drone Type", list("Regular", "Dogborg")) if(!(response == "Dogborg")) // No response somehow or Regular return ..() else diff --git a/code/game/objects/structures/trash_pile_vr.dm b/code/game/objects/structures/trash_pile_vr.dm index 1d7438b4b6..281ddf1cd6 100644 --- a/code/game/objects/structures/trash_pile_vr.dm +++ b/code/game/objects/structures/trash_pile_vr.dm @@ -69,13 +69,13 @@ var/mob/living/L = user //They're in it, and want to get out. if(L.loc == src) - var/choice = alert(usr, "Do you want to exit \the [src]?","Un-Hide?","Exit","Stay") + var/choice = tgui_alert(usr, "Do you want to exit \the [src]?","Un-Hide?",list("Exit","Stay")) if(choice == "Exit") if(L == hider) hider = null L.forceMove(get_turf(src)) else if(!hider) - var/choice = alert(usr, "Do you want to hide in \the [src]?","Un-Hide?","Hide","Stay") + var/choice = tgui_alert(usr, "Do you want to hide in \the [src]?","Un-Hide?",list("Hide","Stay")) if(choice == "Hide" && !hider) //Check again because PROMPT L.forceMove(src) hider = L diff --git a/code/game/response_team.dm b/code/game/response_team.dm index 70a0d945ee..2606ae0b75 100644 --- a/code/game/response_team.dm +++ b/code/game/response_team.dm @@ -24,12 +24,12 @@ var/silent_ert = 0 if(send_emergency_team) to_chat(usr, "[using_map.boss_name] has already dispatched an emergency response team!") return - if(alert(usr, "Do you want to dispatch an Emergency Response Team?","ERT","Yes","No") != "Yes") + if(tgui_alert(usr, "Do you want to dispatch an Emergency Response Team?","ERT",list("Yes","No")) != "Yes") return - if(alert(usr, "Do you want this Response Team to be announced?","ERT","Yes","No") != "Yes") + if(tgui_alert(usr, "Do you want this Response Team to be announced?","ERT",list("Yes","No")) != "Yes") silent_ert = 1 if(get_security_level() != "red") // Allow admins to reconsider if the alert level isn't Red - switch(alert(usr, "The station is not in red alert. Do you still want to dispatch a response team?","ERT","Yes","No")) + switch(tgui_alert(usr, "The station is not in red alert. Do you still want to dispatch a response team?","ERT",list("Yes","No"))) if("No") return if(send_emergency_team) diff --git a/code/game/trader_visit.dm b/code/game/trader_visit.dm index 77bb192e65..996f2febff 100644 --- a/code/game/trader_visit.dm +++ b/code/game/trader_visit.dm @@ -20,10 +20,10 @@ var/can_call_traders = 1 if(send_beruang) to_chat(usr, "The Beruang has already been sent this round!") return - if(alert(usr, "Do you want to dispatch the Beruang trade ship?","Trade Ship","Yes","No") != "Yes") + if(tgui_alert(usr, "Do you want to dispatch the Beruang trade ship?","Trade Ship",list("Yes","No")) != "Yes") return if(get_security_level() == "red") // Allow admins to reconsider if the alert level is Red - switch(alert(usr, "The station is in red alert. Do you still want to send traders?","Trade Ship","Yes","No")) + switch(tgui_alert(usr, "The station is in red alert. Do you still want to send traders?","Trade Ship",list("Yes","No"))) if("No") return if(send_beruang) diff --git a/code/modules/admin/DB ban/functions.dm b/code/modules/admin/DB ban/functions.dm index 31f2cd0578..c143171766 100644 --- a/code/modules/admin/DB ban/functions.dm +++ b/code/modules/admin/DB ban/functions.dm @@ -51,7 +51,7 @@ validckey = 1 if(!validckey) if(!banned_mob || (banned_mob && !IsGuestKey(banned_mob.key))) //VOREStation Edit Start. - var/confirm = alert(usr, "This ckey hasn't been seen, are you sure?", "Confirm Badmin" , "Yes", "No") + var/confirm = tgui_alert(usr, "This ckey hasn't been seen, are you sure?", "Confirm Badmin", list("Yes", "No")) if(confirm == "No") return //VOREStation Edit End @@ -202,7 +202,7 @@ message_admins("[key_name_admin(usr)] has edited a ban for [pckey]'s duration from [duration] to [value]",1) update_query.Execute() if("unban") - if(alert(usr, "Unban [pckey]?", "Unban?", "Yes", "No") == "Yes") + if(tgui_alert(usr, "Unban [pckey]?", "Unban?", list("Yes", "No")) == "Yes") DB_ban_unban_by_id(banid) return to_chat(usr, "Cancelled") diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index ca8c20fad7..495dd343fb 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -665,7 +665,7 @@ var/global/floorIsLava = 0 set desc="Restarts the world" if (!usr.client.holder) return - var/confirm = alert(usr, "Restart the game world?", "Restart", "Yes", "Cancel") + var/confirm = alert(usr, "Restart the game world?", "Restart", "Yes", "Cancel") // Not tgui_alert for safety if(confirm == "Cancel") return if(confirm == "Yes") @@ -1049,7 +1049,7 @@ var/datum/announcement/minor/admin_min_announcer = new set desc="Reboots the server post haste" set name="Immediate Reboot" if(!usr.client.holder) return - if( alert(usr, "Reboot server?","Reboot!","Yes","No") == "No") + if(alert(usr, "Reboot server?","Reboot!","Yes","No") == "No") // Not tgui_alert for safety return to_world("Rebooting world! Initiated by [usr.client.holder.fakekey ? "Admin" : usr.key]!") log_admin("[key_name(usr)] initiated an immediate reboot.") @@ -1071,9 +1071,9 @@ var/datum/announcement/minor/admin_min_announcer = new message_admins("[key_name_admin(usr)] has unprisoned [key_name_admin(M)]", 1) log_admin("[key_name(usr)] has unprisoned [key_name(M)]") else - alert(usr, "Admin jumping disabled") + tgui_alert_async(usr, "Admin jumping disabled") else - alert(usr, "[M.name] is not prisoned.") + tgui_alert_async(usr, "[M.name] is not prisoned.") feedback_add_details("admin_verb","UP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! ////////////////////////////////////////////////////////////////////////////////////////////////ADMIN HELPER PROCS @@ -1226,7 +1226,7 @@ var/datum/announcement/minor/admin_min_announcer = new set name = "Show Game Mode" if(!ticker || !ticker.mode) - alert(usr, "Not before roundstart!", "Alert") + tgui_alert_async(usr, "Not before roundstart!", "Alert") return var/out = "Current mode: [ticker.mode.name] ([ticker.mode.config_tag])
" @@ -1438,7 +1438,7 @@ var/datum/announcement/minor/admin_min_announcer = new if (tomob.ckey) 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 1 if (!frommob || !tomob) //make sure the mobs don't go away while we waited for a response @@ -1512,7 +1512,7 @@ var/datum/announcement/minor/admin_min_announcer = new msg = "has paralyzed [key_name(H)]." log_and_message_admins(msg) else - if(alert(src, "[key_name(H)] is paralyzed, would you like to unparalyze them?","Paralyze Mob","Yes","No") == "Yes") + if(tgui_alert(src, "[key_name(H)] is paralyzed, would you like to unparalyze them?","Paralyze Mob",list("Yes","No")) == "Yes") H.SetParalysis(0) msg = "has unparalyzed [key_name(H)]." log_and_message_admins(msg) @@ -1586,7 +1586,7 @@ var/datum/announcement/minor/admin_min_announcer = new var/shouldStamp = 1 if(!P.sender) // admin initiated - switch(alert(usr, "Would you like the fax stamped?","Stamped?", "Yes", "No")) + switch(tgui_alert(usr, "Would you like the fax stamped?","Stamped?", list("Yes", "No"))) if("No") shouldStamp = 0 diff --git a/code/modules/admin/admin_secrets.dm b/code/modules/admin/admin_secrets.dm index 30d5e7f992..89f032071c 100644 --- a/code/modules/admin/admin_secrets.dm +++ b/code/modules/admin/admin_secrets.dm @@ -59,7 +59,7 @@ var/datum/admin_secrets/admin_secrets = new() /datum/admin_secret_item/proc/can_execute(var/mob/user) if(can_view(user)) - if(!warn_before_use || alert(usr, "Execute the command '[name]'?", name, "No","Yes") == "Yes") + if(!warn_before_use || tgui_alert(usr, "Execute the command '[name]'?", name, list("No","Yes")) == "Yes") return 1 return 0 diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 7ff7156a4c..83facc08ac 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -141,7 +141,7 @@ set category = "Fun" set name = "OOC Text Color" if(!holder) return - var/response = alert(src, "Please choose a distinct color that is easy to read and doesn't mix with all the other chat and radio frequency colors.", "Change own OOC color", "Pick new color", "Reset to default", "Cancel") + var/response = tgui_alert(src, "Please choose a distinct color that is easy to read and doesn't mix with all the other chat and radio frequency colors.", "Change own OOC color", list("Pick new color", "Reset to default", "Cancel")) if(response == "Pick new color") prefs.ooccolor = input(src, "Please select your OOC colour.", "OOC colour") as color else if(response == "Reset to default") @@ -374,7 +374,7 @@ set category = "Admin" if(holder) - if(alert(usr, "Confirm self-deadmin for the round? You can't re-admin yourself without someone promoting you.","Deadmin","Yes","No") == "Yes") + if(tgui_alert(usr, "Confirm self-deadmin for the round? You can't re-admin yourself without someone promoting you.","Deadmin",list("Yes","No")) == "Yes") log_admin("[src] deadmined themself.") message_admins("[src] deadmined themself.", 1) deadmin() @@ -432,7 +432,7 @@ if(!check_rights(R_ADMIN|R_EVENT)) return var sec_level = input(usr, "It's currently code [get_security_level()].", "Select Security Level") as null|anything in (list("green","yellow","violet","orange","blue","red","delta")-get_security_level()) - if(alert(usr, "Switch from code [get_security_level()] to code [sec_level]?","Change security level?","Yes","No") == "Yes") + if(tgui_alert(usr, "Switch from code [get_security_level()] to code [sec_level]?","Change security level?",list("Yes","No")) == "Yes") set_security_level(sec_level) log_admin("[key_name(usr)] changed the security level to code [sec_level].") @@ -504,7 +504,7 @@ set desc = "Tells mob to man up and deal with it." set popup_menu = FALSE //VOREStation Edit - Declutter. - if(alert(usr, "Are you sure you want to tell them to man up?","Confirmation","Deal with it","No")=="No") return + if(tgui_alert(usr, "Are you sure you want to tell them to man up?","Confirmation",list("Deal with it","No"))=="No") return to_chat(T, "Man up and deal with it.") to_chat(T, "Move along.") @@ -517,7 +517,7 @@ set name = "Man Up Global" set desc = "Tells everyone to man up and deal with it." - if(alert(usr, "Are you sure you want to tell the whole server up?","Confirmation","Deal with it","No")=="No") return + if(tgui_alert(usr, "Are you sure you want to tell the whole server up?","Confirmation",list("Deal with it","No"))=="No") return for (var/mob/T as mob in mob_list) to_chat(T, "
Man up.
Deal with it.

Move along.

") diff --git a/code/modules/admin/callproc/callproc.dm b/code/modules/admin/callproc/callproc.dm index be3ab25652..6e4a2c277d 100644 --- a/code/modules/admin/callproc/callproc.dm +++ b/code/modules/admin/callproc/callproc.dm @@ -10,7 +10,7 @@ var/targetselected = 0 var/returnval = null - switch(alert(usr, "Proc owned by something?","Call Proc","Yes","No")) + switch(tgui_alert(usr, "Proc owned by something?","Call Proc",list("Yes","No"))) if("Yes") targetselected = 1 var/list/value = vv_get_value(default_class = VV_ATOM_REFERENCE, classes = list(VV_ATOM_REFERENCE, VV_DATUM_REFERENCE, VV_MOB_REFERENCE, VV_CLIENT)) diff --git a/code/modules/admin/map_capture.dm b/code/modules/admin/map_capture.dm index 7fa8b3154f..981a7434d2 100644 --- a/code/modules/admin/map_capture.dm +++ b/code/modules/admin/map_capture.dm @@ -26,7 +26,7 @@ turfstocapture.Add(T) else if(!hasasked) - var/answer = alert(usr, "Capture includes non existant turf, Continue capture?","Continue capture?", "No", "Yes") + var/answer = tgui_alert(usr, "Capture includes non existant turf, Continue capture?","Continue capture?", list("No", "Yes")) hasasked = 1 if(answer == "No") return diff --git a/code/modules/admin/player_notes.dm b/code/modules/admin/player_notes.dm index a029f116d6..a6b3d8c6ed 100644 --- a/code/modules/admin/player_notes.dm +++ b/code/modules/admin/player_notes.dm @@ -56,7 +56,7 @@ notesfile << note else notesfile.cd = "/" - if(alert(usr,"Are you sure you want to remove all their notes?","Confirmation","No","Yes - Remove all notes") == "Yes - Remove all notes") + if(tgui_alert(usr,"Are you sure you want to remove all their notes?","Confirmation",list("No","Yes - Remove all notes")) == "Yes - Remove all notes") notesfile.dir.Remove(ckey) return diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm index a5d5b8bf67..cf50b20ee0 100644 --- a/code/modules/admin/player_panel.dm +++ b/code/modules/admin/player_panel.dm @@ -411,4 +411,4 @@ dat += "" usr << browse(dat, "window=roundstatus;size=400x500") else - alert(usr, "The game hasn't started yet!") + tgui_alert_async(usr, "The game hasn't started yet!") diff --git a/code/modules/admin/secrets/admin_secrets/jump_shuttle.dm b/code/modules/admin/secrets/admin_secrets/jump_shuttle.dm index 3767d21a8b..e7255459bd 100644 --- a/code/modules/admin/secrets/admin_secrets/jump_shuttle.dm +++ b/code/modules/admin/secrets/admin_secrets/jump_shuttle.dm @@ -20,7 +20,7 @@ var/destination_area = input(user, "Which area is the shuttle at now? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world if (!destination_area) return - var/long_jump = alert(user, "Is there a transition area for this jump?","", "Yes", "No") + var/long_jump = tgui_alert(user, "Is there a transition area for this jump?","Transition?", list("Yes","No")) if (long_jump == "Yes") var/transition_area = input(user, "Which area is the transition area? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world if (!transition_area) return diff --git a/code/modules/admin/secrets/admin_secrets/launch_shuttle.dm b/code/modules/admin/secrets/admin_secrets/launch_shuttle.dm index 2f253a1a80..fd47ffa81d 100644 --- a/code/modules/admin/secrets/admin_secrets/launch_shuttle.dm +++ b/code/modules/admin/secrets/admin_secrets/launch_shuttle.dm @@ -23,4 +23,4 @@ S.launch(user) log_and_message_admins("launched the [shuttle_tag] shuttle", user) else - alert(user, "The [shuttle_tag] shuttle cannot be launched at this time. It's probably busy.") + tgui_alert_async(user, "The [shuttle_tag] shuttle cannot be launched at this time. It's probably busy.") diff --git a/code/modules/admin/secrets/admin_secrets/launch_shuttle_forced.dm b/code/modules/admin/secrets/admin_secrets/launch_shuttle_forced.dm index 592a8da57c..b32bf4fc58 100644 --- a/code/modules/admin/secrets/admin_secrets/launch_shuttle_forced.dm +++ b/code/modules/admin/secrets/admin_secrets/launch_shuttle_forced.dm @@ -23,4 +23,4 @@ S.force_launch(user) log_and_message_admins("forced the [shuttle_tag] shuttle", user) else - alert(user, "The [shuttle_tag] shuttle launch cannot be forced at this time. It's busy, or hasn't been launched yet.") + tgui_alert_async(user, "The [shuttle_tag] shuttle launch cannot be forced at this time. It's busy, or hasn't been launched yet.") diff --git a/code/modules/admin/secrets/admin_secrets/move_shuttle.dm b/code/modules/admin/secrets/admin_secrets/move_shuttle.dm index a79a2d7143..3375185fad 100644 --- a/code/modules/admin/secrets/admin_secrets/move_shuttle.dm +++ b/code/modules/admin/secrets/admin_secrets/move_shuttle.dm @@ -9,7 +9,7 @@ . = ..() if(!.) return - var/confirm = alert(user, "This command directly moves a shuttle from one area to another. DO NOT USE THIS UNLESS YOU ARE DEBUGGING A SHUTTLE AND YOU KNOW WHAT YOU ARE DOING.", "Are you sure?", "Ok", "Cancel") + var/confirm = tgui_alert(user, "This command directly moves a shuttle from one area to another. DO NOT USE THIS UNLESS YOU ARE DEBUGGING A SHUTTLE AND YOU KNOW WHAT YOU ARE DOING.", "Are you sure?", list("Ok", "Cancel")) if (confirm == "Cancel") return diff --git a/code/modules/admin/secrets/admin_secrets/show_game_mode.dm b/code/modules/admin/secrets/admin_secrets/show_game_mode.dm index 8e29dba896..bde3563960 100644 --- a/code/modules/admin/secrets/admin_secrets/show_game_mode.dm +++ b/code/modules/admin/secrets/admin_secrets/show_game_mode.dm @@ -10,5 +10,5 @@ . = ..() if(!.) return - if (ticker.mode) alert(usr, "The game mode is [ticker.mode.name]") - else alert(usr, "For some reason there's a ticker, but not a game mode") + if (ticker.mode) tgui_alert_async(usr, "The game mode is [ticker.mode.name]") + else tgui_alert_async(usr, "For some reason there's a ticker, but not a game mode") diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 29f2a2ed80..7537a73bec 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -129,7 +129,7 @@ var/datum/admins/D = admin_datums[adm_ckey] if(task == "remove") - if(alert(usr, "Are you sure you want to remove [adm_ckey]?","Message","Yes","Cancel") == "Yes") + if(tgui_alert(usr, "Are you sure you want to remove [adm_ckey]?","Message",list("Yes","Cancel")) == "Yes") if(!D) return admin_datums -= adm_ckey D.disassociate() @@ -201,7 +201,7 @@ if(!check_rights(R_ADMIN|R_EVENT)) return if( ticker.mode.name == "blob" ) - alert(usr, "You can't call the shuttle during blob!") + tgui_alert_async(usr, "You can't call the shuttle during blob!") return switch(href_list["call_shuttle"]) @@ -246,7 +246,7 @@ log_admin("[key_name(usr)] edited the Emergency Shuttle's arrival time to [new_time_left]") message_admins("[key_name_admin(usr)] edited the Emergency Shuttle's arrival time to [new_time_left*10]", 1) else - alert(usr, "The shuttle is neither counting down to launch nor is it in transit. Please try again when it is.") + tgui_alert_async(usr, "The shuttle is neither counting down to launch nor is it in transit. Please try again when it is.") href_list["secretsadmin"] = "check_antagonist" @@ -268,7 +268,7 @@ return var/delmob = 0 - switch(alert(usr, "Delete old mob?","Message","Yes","No","Cancel")) + switch(tgui_alert(usr, "Delete old mob?","Message",list("Yes","No","Cancel"))) if("Cancel") return if("Yes") delmob = 1 @@ -304,11 +304,11 @@ var/banfolder = href_list["unbanf"] Banlist.cd = "/base/[banfolder]" var/key = Banlist["key"] - if(alert(usr, "Are you sure you want to unban [key]?", "Confirmation", "Yes", "No") == "Yes") + if(tgui_alert(usr, "Are you sure you want to unban [key]?", "Confirmation", list("Yes", "No")) == "Yes") if(RemoveBan(banfolder)) unbanpanel() else - alert(usr, "This ban has already been lifted / does not exist.", "Error", "Ok") + tgui_alert_async(usr, "This ban has already been lifted / does not exist.", "Error") unbanpanel() else if(href_list["warn"]) @@ -332,7 +332,7 @@ var/duration - switch(alert(usr, "Temporary Ban?","Temporary Ban","Yes","No")) + switch(tgui_alert(usr, "Temporary Ban?","Temporary Ban",list("Yes","No"))) if("Yes") temp = 1 var/mins = 0 @@ -645,7 +645,7 @@ if(M != usr) //we can jobban ourselves if(M.client && M.client.holder && (M.client.holder.rights & R_BAN)) //they can ban too. So we can't ban them - alert(usr, "You cannot perform this action. You must be of a higher administrative rank!") + tgui_alert_async(usr, "You cannot perform this action. You must be of a higher administrative rank!") return if(!job_master) @@ -723,7 +723,7 @@ //Banning comes first if(notbannedlist.len) //at least 1 unbanned job exists in joblist so we have stuff to ban. - switch(alert(usr, "Temporary Ban?","Temporary Ban","Yes","No", "Cancel")) + switch(tgui_alert(usr, "Temporary Ban?","Temporary Ban", list("Yes","No","Cancel"))) if("Yes") if(!check_rights(R_MOD,0) && !check_rights(R_BAN, 0)) to_chat(usr, " You cannot issue temporary job-bans!") @@ -795,7 +795,7 @@ for(var/job in joblist) var/reason = jobban_isbanned(M, job) if(!reason) continue //skip if it isn't jobbanned anyway - switch(alert(usr, "Job: '[job]' Reason: '[reason]' Un-jobban?","Please Confirm","Yes","No")) + switch(tgui_alert(usr, "Job: '[job]' Reason: '[reason]' Un-jobban?","Please Confirm",list("Yes","No"))) if("Yes") ban_unban_log_save("[key_name(usr)] unjobbanned [key_name(M)] from [job]") log_admin("[key_name(usr)] unbanned [key_name(M)] from [job]") @@ -835,7 +835,7 @@ var/t = href_list["removejobban"] if(t) - if((alert(usr, "Do you want to unjobban [t]?","Unjobban confirmation", "Yes", "No") == "Yes") && t) //No more misclicks! Unless you do it twice. + if((tgui_alert(usr, "Do you want to unjobban [t]?","Unjobban confirmation", list("Yes", "No")) == "Yes") && t) //No more misclicks! Unless you do it twice. log_admin("[key_name(usr)] removed [t]") message_admins("[key_name_admin(usr)] removed [t]", 1) jobban_remove(t) @@ -859,7 +859,7 @@ if(M.client && M.client.holder) return //admins cannot be banned. Even if they could, the ban doesn't affect them anyway - switch(alert(usr, "Temporary Ban?","Temporary Ban","Yes","No", "Cancel")) + switch(tgui_alert(usr, "Temporary Ban?","Temporary Ban",list("Yes","No","Cancel"))) if("Yes") var/mins = input(usr,"How long (in minutes)?","Ban time",1440) as num|null if(!mins) @@ -895,7 +895,7 @@ var/reason = sanitize(input(usr,"Reason?","reason","Griefer") as text|null) if(!reason) return - switch(alert(usr,"IP ban?","IP Ban","Yes","No","Cancel")) + switch(tgui_alert(usr,"IP ban?","IP Ban",list("Yes","No","Cancel"))) if("Cancel") return if("Yes") AddBan(M.ckey, M.computer_id, reason, usr.ckey, 0, 0, M.lastKnownIP) @@ -938,7 +938,7 @@ if(!check_rights(R_ADMIN|R_EVENT)) return if(ticker && ticker.mode) - return alert(usr, "The game has already started.") + return tgui_alert_async(usr, "The game has already started.") var/dat = {"What mode do you wish to play?
"} for(var/mode in config.modes) dat += {"[config.mode_names[mode]]
"} @@ -951,9 +951,9 @@ if(!check_rights(R_ADMIN|R_EVENT)) return if(ticker && ticker.mode) - return alert(usr, "The game has already started.") + return tgui_alert_async(usr, "The game has already started.") if(master_mode != "secret") - return alert(usr, "The game mode has to be secret!") + return tgui_alert_async(usr, "The game mode has to be secret!") var/dat = {"What game mode do you want to force secret to be? Use this if you want to change the game mode, but want the players to believe it's secret. This will only work if the current game mode is secret.
"} for(var/mode in config.modes) dat += {"[config.mode_names[mode]]
"} @@ -965,7 +965,7 @@ if(!check_rights(R_ADMIN|R_SERVER|R_EVENT)) return if (ticker && ticker.mode) - return alert(usr, "The game has already started.") + return tgui_alert_async(usr, "The game has already started.") master_mode = href_list["c_mode2"] log_admin("[key_name(usr)] set the mode as [config.mode_names[master_mode]].") message_admins("[key_name_admin(usr)] set the mode as [config.mode_names[master_mode]].", 1) @@ -978,9 +978,9 @@ if(!check_rights(R_ADMIN|R_SERVER|R_EVENT)) return if(ticker && ticker.mode) - return alert(usr, "The game has already started.") + return tgui_alert_async(usr, "The game has already started.") if(master_mode != "secret") - return alert(usr, "The game mode has to be secret!") + return tgui_alert_async(usr, "The game mode has to be secret!") secret_force_mode = href_list["f_secret2"] log_admin("[key_name(usr)] set the forced secret mode as [secret_force_mode].") message_admins("[key_name_admin(usr)] set the forced secret mode as [secret_force_mode].", 1) @@ -1028,7 +1028,7 @@ else if(href_list["sendtoprison"]) if(!check_rights(R_ADMIN)) return - if(alert(usr, "Send to admin prison for the round?", "Message", "Yes", "No") != "Yes") + if(tgui_alert(usr, "Send to admin prison for the round?", "Message", list("Yes", "No")) != "Yes") return var/mob/M = locate(href_list["sendtoprison"]) @@ -1078,7 +1078,7 @@ to_chat(usr, "[M] doesn't seem to have an active client.") 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.") @@ -1091,7 +1091,7 @@ else if(href_list["tdome1"]) 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"]) @@ -1116,7 +1116,7 @@ else if(href_list["tdome2"]) 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"]) @@ -1141,7 +1141,7 @@ else if(href_list["tdomeadmin"]) 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"]) @@ -1163,7 +1163,7 @@ else if(href_list["tdomeobserve"]) 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"]) @@ -1424,7 +1424,7 @@ to_chat(usr, "This can only be used on instances of type /mob/living") return - if(alert(src.owner, "Are you sure you wish to hit [key_name(M)] with Blue Space Artillery?", "Confirm Firing?" , "Yes" , "No") != "Yes") + if(tgui_alert(src.owner, "Are you sure you wish to hit [key_name(M)] with Blue Space Artillery?", "Confirm Firing?", list("Yes", "No")) != "Yes") return bluespace_artillery(M,src) @@ -1530,7 +1530,7 @@ else if(href_list["getmob"]) if(!check_rights(R_ADMIN|R_EVENT|R_FUN)) return - if(alert(usr, "Confirm?", "Message", "Yes", "No") != "Yes") return + if(tgui_alert(usr, "Confirm?", "Message", list("Yes", "No")) != "Yes") return var/mob/M = locate(href_list["getmob"]) usr.client.Getmob(M) @@ -1556,7 +1556,7 @@ if(!check_rights(R_ADMIN|R_MOD|R_EVENT)) return if(!ticker || !ticker.mode) - alert(usr, "The game hasn't started yet!") + tgui_alert_async(usr, "The game hasn't started yet!") return var/mob/M = locate(href_list["traitor"]) @@ -1622,13 +1622,13 @@ paths += path if(!paths) - alert(usr, "The path list you sent is empty") + tgui_alert(usr, "The path list you sent is empty") return if(length(paths) > 5) - alert(usr, "Select fewer object types, (max 5)") + tgui_alert_async(usr, "Select fewer object types, (max 5)") return else if(length(removed_paths)) - alert(usr, "Removed:\n" + jointext(removed_paths, "\n")) + tgui_alert_async(usr, "Removed:\n" + jointext(removed_paths, "\n")) var/list/offset = splittext(href_list["offset"],",") var/number = dd_range(1, 100, text2num(href_list["object_count"])) @@ -1727,7 +1727,7 @@ if(src.admincaster_feed_channel.channel_name == "" || src.admincaster_feed_channel.channel_name == "\[REDACTED\]" || check ) src.admincaster_screen=7 else - var/choice = alert(usr, "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") news_network.CreateFeedChannel(admincaster_feed_channel.channel_name, admincaster_signature, admincaster_feed_channel.locked, 1) feedback_inc("newscaster_channels",1) //Adding channel to the global network @@ -1801,7 +1801,7 @@ if(src.admincaster_feed_message.author == "" || src.admincaster_feed_message.body == "") src.admincaster_screen = 16 else - var/choice = alert(usr, "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 var/datum/feed_message/WANTED = new /datum/feed_message @@ -1823,7 +1823,7 @@ src.access_news_network() else if(href_list["ac_cancel_wanted"]) - var/choice = alert(usr, "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") news_network.wanted_issue = null for(var/obj/machinery/newscaster/NEWSCASTER in allCasters) diff --git a/code/modules/admin/verbs/adminhelp.dm b/code/modules/admin/verbs/adminhelp.dm index 6211707c38..e03bf8496b 100644 --- a/code/modules/admin/verbs/adminhelp.dm +++ b/code/modules/admin/verbs/adminhelp.dm @@ -544,7 +544,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new) feedback_add_details("admin_verb","Adminhelp") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! if(current_ticket) - if(alert(usr, "You already have a ticket open. Is this for the same issue?","Duplicate?","Yes","No") != "No") + if(tgui_alert(usr, "You already have a ticket open. Is this for the same issue?","Duplicate?",list("Yes","No")) != "No") if(current_ticket) current_ticket.MessageNoRecipient(msg) to_chat(usr, "PM to-Admins: [msg]") diff --git a/code/modules/admin/verbs/adminhelp_vr.dm b/code/modules/admin/verbs/adminhelp_vr.dm index e2d8d71592..9d66223b66 100644 --- a/code/modules/admin/verbs/adminhelp_vr.dm +++ b/code/modules/admin/verbs/adminhelp_vr.dm @@ -25,7 +25,7 @@ to_chat(usr, "Error: You cannot request spice (muted from adminhelps).") return - if(alert(usr, "Are you sure you want to request the admins spice things up for you? You accept the consequences if you do.","Spicy!","Yes","No") != "No") + if(tgui_alert(usr, "Are you sure you want to request the admins spice things up for you? You accept the consequences if you do.","Spicy!",list("Yes","No")) != "No") message_admins("[ADMIN_FULLMONTY(usr)] has requested the round be spiced up a little.") to_chat(usr, "You have requested some more spice in your round.") else diff --git a/code/modules/admin/verbs/adminjump.dm b/code/modules/admin/verbs/adminjump.dm index e79c8139e6..89505776b2 100644 --- a/code/modules/admin/verbs/adminjump.dm +++ b/code/modules/admin/verbs/adminjump.dm @@ -4,14 +4,17 @@ /mob/observer/dead/on_mob_jump() following = null -/client/proc/Jump(var/area/A in return_sorted_areas()) +/client/proc/Jump() set name = "Jump to Area" set desc = "Area to jump to" set category = "Admin" if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT)) return - + if(config.allow_admin_jump) + var/area/A = tgui_input_list(usr, "Pick an area:", "Jump to Area", return_sorted_areas()) + if(!A) + return usr.on_mob_jump() usr.forceMove(pick(get_area_turfs(A))) @@ -19,7 +22,7 @@ message_admins("[key_name_admin(usr)] jumped to [A]", 1) feedback_add_details("admin_verb","JA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! else - alert(usr, "Admin jumping disabled") + tgui_alert_async(usr, "Admin jumping disabled") /client/proc/jumptoturf(var/turf/T in world) set name = "Jump to Turf" @@ -33,10 +36,10 @@ usr.forceMove(T) feedback_add_details("admin_verb","JT") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! else - alert(usr, "Admin jumping disabled") + tgui_alert_async(usr, "Admin jumping disabled") return -/client/proc/jumptomob(var/mob/M in mob_list) +/client/proc/jumptomob() set category = "Admin" set name = "Jump to Mob" set popup_menu = FALSE //VOREStation Edit - Declutter. @@ -45,6 +48,9 @@ return if(config.allow_admin_jump) + var/mob/M = tgui_input_list(usr, "Pick a mob:", "Jump to Mob", mob_list) + if(!M) + return log_admin("[key_name(usr)] jumped to [key_name(M)]") message_admins("[key_name_admin(usr)] jumped to [key_name_admin(M)]", 1) if(src.mob) @@ -57,7 +63,7 @@ else to_chat(A, "This mob is not located in the game world.") else - alert(usr, "Admin jumping disabled") + tgui_alert_async(usr, "Admin jumping disabled") /client/proc/jumptocoord(tx as num, ty as num, tz as num) set category = "Admin" @@ -79,7 +85,7 @@ message_admins("[key_name_admin(usr)] jumped to coordinates [tx], [ty], [tz]") else - alert(usr, "Admin jumping disabled") + tgui_alert_async(usr, "Admin jumping disabled") /client/proc/jumptokey() set category = "Admin" @@ -92,9 +98,8 @@ var/list/keys = list() for(var/mob/M in player_list) keys += M.client - var/selection = input("Please, select a player!", "Admin Jumping", null, null) as null|anything in sortKey(keys) + var/selection = tgui_input_list(usr, "Select a key:", "Jump to Key", sortKey(keys)) if(!selection) - to_chat(src, "No keys found.") return var/mob/M = selection:mob log_admin("[key_name(usr)] jumped to [key_name(M)]") @@ -103,15 +108,18 @@ usr.forceMove(get_turf(M)) feedback_add_details("admin_verb","JK") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! else - alert(usr, "Admin jumping disabled") + tgui_alert_async(usr, "Admin jumping disabled") -/client/proc/Getmob(var/mob/M in mob_list) +/client/proc/Getmob() set category = "Admin" set name = "Get Mob" set desc = "Mob to teleport" if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT)) return if(config.allow_admin_jump) + var/mob/M = tgui_input_list(usr, "Pick a mob:", "Get Mob", mob_list) + if(!M) + return log_admin("[key_name(usr)] jumped to [key_name(M)]") var/msg = "[key_name_admin(usr)] jumped to [key_name_admin(M)]" message_admins(msg) @@ -120,7 +128,7 @@ M.forceMove(get_turf(usr)) feedback_add_details("admin_verb","GM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! else - alert(usr, "Admin jumping disabled") + tgui_alert_async(usr, "Admin jumping disabled") /client/proc/Getkey() set category = "Admin" @@ -134,7 +142,7 @@ var/list/keys = list() for(var/mob/M in player_list) keys += M.client - var/selection = input("Please, select a player!", "Admin Jumping", null, null) as null|anything in sortKey(keys) + var/selection = tgui_input_list(usr, "Pick a key:", "Get Key", sortKey(keys)) if(!selection) return var/mob/M = selection:mob @@ -150,26 +158,31 @@ M.forceMove(get_turf(usr)) feedback_add_details("admin_verb","GK") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! else - alert(usr, "Admin jumping disabled") + tgui_alert_async(usr, "Admin jumping disabled") -/client/proc/sendmob(var/mob/M in sortmobs()) +/client/proc/sendmob() set category = "Admin" set name = "Send Mob" if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT)) return - var/area/A = input(usr, "Pick an area.", "Pick an area") in return_sorted_areas() - if(A) - if(config.allow_admin_jump) - M.on_mob_jump() - M.forceMove(pick(get_area_turfs(A))) - feedback_add_details("admin_verb","SMOB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - log_admin("[key_name(usr)] teleported [key_name(M)]") - var/msg = "[key_name_admin(usr)] teleported [ADMIN_LOOKUPFLW(M)]" - message_admins(msg) - admin_ticket_log(M, msg) - else - alert(usr, "Admin jumping disabled") + if(config.allow_admin_jump) + var/area/A = tgui_input_list(usr, "Pick an area:", "Send Mob", return_sorted_areas()) + if(!A) + return + var/mob/M = tgui_input_list(usr, "Pick a mob:", "Send Mob", mob_list) + if(!M) + return + M.on_mob_jump() + M.forceMove(pick(get_area_turfs(A))) + feedback_add_details("admin_verb","SMOB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + + log_admin("[key_name(usr)] teleported [key_name(M)]") + var/msg = "[key_name_admin(usr)] teleported [ADMIN_LOOKUPFLW(M)]" + message_admins(msg) + admin_ticket_log(M, msg) + else + tgui_alert_async(usr, "Admin jumping disabled") /client/proc/cmd_admin_move_atom(var/atom/movable/AM, tx as num, ty as num, tz as num) set category = "Admin" @@ -199,4 +212,4 @@ feedback_add_details("admin_verb", "MA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! message_admins("[key_name_admin(usr)] jumped [AM] to coordinates [tx], [ty], [tz]") else - alert(usr, "Admin jumping disabled") + tgui_alert_async(usr, "Admin jumping disabled") diff --git a/code/modules/admin/verbs/atmosdebug.dm b/code/modules/admin/verbs/atmosdebug.dm index 93ff591dc4..3927c20899 100644 --- a/code/modules/admin/verbs/atmosdebug.dm +++ b/code/modules/admin/verbs/atmosdebug.dm @@ -7,7 +7,7 @@ feedback_add_details("admin_verb","CP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - if(alert(usr, "WARNING: This command should not be run on a live server. Do you want to continue?", "Check Piping", "No", "Yes") == "No") + if(tgui_alert(usr, "WARNING: This command should not be run on a live server. Do you want to continue?", "Check Piping", list("No", "Yes")) == "No") return to_chat(usr, "Checking for disconnected pipes...") diff --git a/code/modules/admin/verbs/buildmode.dm b/code/modules/admin/verbs/buildmode.dm index 7c63114663..5c40b847c9 100644 --- a/code/modules/admin/verbs/buildmode.dm +++ b/code/modules/admin/verbs/buildmode.dm @@ -275,7 +275,7 @@ master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value") as turf in world if(BUILDMODE_ROOM) - var/choice = alert(usr, "Would you like to change the floor or wall holders?","Room Builder", "Floor", "Wall") + var/choice = tgui_alert(usr, "Would you like to change the floor or wall holders?","Room Builder", list("Floor", "Wall")) switch(choice) if("Floor") floor_holder = get_path_from_partial_text(/turf/simulated/floor/plating) @@ -283,7 +283,7 @@ wall_holder = get_path_from_partial_text(/turf/simulated/wall) if(BUILDMODE_LIGHTS) - var/choice = alert(usr, "Change the new light range, power, or color?", "Light Maker", "Range", "Power", "Color") + var/choice = tgui_alert(usr, "Change the new light range, power, or color?", "Light Maker", list("Range", "Power", "Color")) switch(choice) if("Range") var/input = input("New light range.","Light Maker",3) as null|num @@ -635,7 +635,7 @@ matches += path if(matches.len==0) - alert(usr, "No results found. Sorry.") + tgui_alert_async(usr, "No results found. Sorry.") return var/result = null diff --git a/code/modules/admin/verbs/change_appearance.dm b/code/modules/admin/verbs/change_appearance.dm index 8136d227a0..80f02645a6 100644 --- a/code/modules/admin/verbs/change_appearance.dm +++ b/code/modules/admin/verbs/change_appearance.dm @@ -26,7 +26,7 @@ to_chat(usr, " Only mobs with clients can alter their own appearance.") return var/datum/gender/T = gender_datums[H.get_visible_gender()] - switch(alert(usr, "Do you wish for [H] to be allowed to select non-whitelisted races?","Alter Mob Appearance","Yes","No","Cancel")) + switch(tgui_alert(usr, "Do you wish for [H] to be allowed to select non-whitelisted races?","Alter Mob Appearance","Yes","No","Cancel")) if("Yes") log_and_message_admins("has allowed [H] to change [T.his] appearance, without whitelisting of races.") H.change_appearance(APPEARANCE_ALL, H, check_species_whitelist = 0) @@ -46,7 +46,7 @@ if(!istype(M, /mob/living/carbon/human)) to_chat(usr, "You can only do this to humans!") return - switch(alert(usr, "Are you sure you wish to edit this mob's appearance? Skrell, Unathi, Tajaran can result in unintended consequences.","Danger!","Yes","No")) + switch(tgui_alert(usr, "Are you sure you wish to edit this mob's appearance? Skrell, Unathi, Tajaran can result in unintended consequences.","Danger!",list("Yes","No"))) if("No") return var/new_facial = input("Please select facial hair color.", "Character Generation") as color @@ -90,7 +90,7 @@ if(new_fstyle) M.f_style = new_fstyle - var/new_gender = alert(usr, "Please select gender.", "Character Generation", "Male", "Female", "Neuter") + var/new_gender = tgui_alert(usr, "Please select gender.", "Character Generation", list("Male", "Female", "Neuter")) if (new_gender) M.set_gender(new_gender) diff --git a/code/modules/admin/verbs/cinematic.dm b/code/modules/admin/verbs/cinematic.dm index 323a1d6d6c..3b1d6691cf 100644 --- a/code/modules/admin/verbs/cinematic.dm +++ b/code/modules/admin/verbs/cinematic.dm @@ -6,11 +6,11 @@ if(!check_rights(R_FUN)) return - if(alert(usr, "Are you sure you want to run [cinematic]?","Confirmation","Yes","No")=="No") return + if(tgui_alert(usr, "Are you sure you want to run [cinematic]?","Confirmation",list("Yes","No"))=="No") return if(!ticker) return switch(cinematic) if("explosion") - if(alert(usr, "The game will be over. Are you really sure?", "Confirmation" ,"Continue", "Cancel") == "Cancel") + if(tgui_alert(usr, "The game will be over. Are you really sure?", "Confirmation", list("Continue","Cancel")) == "Cancel") return var/parameter = input(src,"station_missed = ?","Enter Parameter",0) as num var/override diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index b672b84a17..84ee56c7f2 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -98,7 +98,7 @@ set name = "Make Robot" if(!ticker) - alert(usr, "Wait until the game starts") + tgui_alert_async(usr, "Wait until the game starts") return if(istype(M, /mob/living/carbon/human)) log_admin("[key_name(src)] has robotized [M.key].") @@ -106,22 +106,22 @@ M:Robotize() else - alert(usr, "Invalid mob") + tgui_alert_async(usr, "Invalid mob") /client/proc/cmd_admin_animalize(var/mob/M in mob_list) set category = "Fun" set name = "Make Simple Animal" if(!ticker) - alert(usr, "Wait until the game starts") + tgui_alert_async(usr, "Wait until the game starts") return if(!M) - alert(usr, "That mob doesn't seem to exist, close the panel and try again.") + tgui_alert_async(usr, "That mob doesn't seem to exist, close the panel and try again.") return if(istype(M, /mob/new_player)) - alert(usr, "The mob must not be a new_player.") + tgui_alert_async(usr, "The mob must not be a new_player.") return log_admin("[key_name(src)] has animalized [M.key].") @@ -161,7 +161,7 @@ set name = "Make Alien" if(!ticker) - alert(usr, "Wait until the game starts") + tgui_alert_async(usr, "Wait until the game starts") return if(ishuman(M)) log_admin("[key_name(src)] has alienized [M.key].") @@ -171,7 +171,7 @@ log_admin("[key_name(usr)] made [key_name(M)] into an alien.") message_admins("[key_name_admin(usr)] made [key_name(M)] into an alien.", 1) else - alert(usr, "Invalid mob") + tgui_alert_async(usr, "Invalid mob") //TODO: merge the vievars version into this or something maybe mayhaps @@ -272,7 +272,7 @@ set name = "Grant Full Access" if (!ticker) - alert(usr, "Wait until the game starts") + tgui_alert_async(usr, "Wait until the game starts") return if (istype(M, /mob/living/carbon/human)) var/mob/living/carbon/human/H = M @@ -293,7 +293,7 @@ H.equip_to_slot_or_del(id, slot_wear_id) H.update_inv_wear_id() else - alert(usr, "Invalid mob") + tgui_alert_async(usr, "Invalid mob") feedback_add_details("admin_verb","GFA") //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.", 1) @@ -305,7 +305,7 @@ if(!check_rights(R_DEBUG|R_ADMIN|R_EVENT)) return if(M.ckey) - if(alert(usr, "This mob is being controlled by [M.ckey]. Are you sure you wish to assume control of it? [M.ckey] will be made a ghost.","Confirmation","Yes","No") != "Yes") + if(tgui_alert(usr, "This mob is being controlled by [M.ckey]. Are you sure you wish to assume control of it? [M.ckey] will be made a ghost.","Confirmation",list("Yes","No")) != "Yes") return else var/mob/observer/dead/ghost = new/mob/observer/dead(M,1) @@ -453,7 +453,7 @@ set name = "Start Singularity" set desc = "Sets up the singularity and all machines to get power flowing through the station" - if(alert(usr, "Are you sure? This will start up the engine. Should only be used during debug!","Start Singularity","Yes","No") != "Yes") + if(tgui_alert(usr, "Are you sure? This will start up the engine. Should only be used during debug!","Start Singularity",list("Yes","No")) != "Yes") return for(var/obj/machinery/power/emitter/E in machines) @@ -499,7 +499,7 @@ if(!check_rights(R_DEBUG|R_ADMIN)) return - var/response = alert(usr, "Are you sure? This will start up the engine. Should only be used during debug!","Setup Supermatter","Setup Completely","Setup except coolant","No") + var/response = tgui_alert(usr, "Are you sure? This will start up the engine. Should only be used during debug!","Setup Supermatter",list("Setup Completely","Setup except coolant","No")) if(response == "No") return @@ -606,7 +606,7 @@ // DNA2 - Admin Hax /client/proc/cmd_admin_toggle_block(var/mob/M,var/block) if(!ticker) - alert(usr, "Wait until the game starts") + tgui_alert_async(usr, "Wait until the game starts") return if(istype(M, /mob/living/carbon)) M.dna.SetSEState(block,!M.dna.GetSEState(block)) @@ -617,7 +617,7 @@ message_admins("[key_name_admin(src)] has toggled [M.key]'s [blockname] block [state]!") log_admin("[key_name(src)] has toggled [M.key]'s [blockname] block [state]!") else - alert(usr, "Invalid mob") + tgui_alert_async(usr, "Invalid mob") /datum/admins/proc/view_runtimes() set category = "Debug" diff --git a/code/modules/admin/verbs/diagnostics.dm b/code/modules/admin/verbs/diagnostics.dm index 6e034fea7c..ca4261525d 100644 --- a/code/modules/admin/verbs/diagnostics.dm +++ b/code/modules/admin/verbs/diagnostics.dm @@ -3,7 +3,7 @@ set name = "Show Air Report" if(!master_controller || !air_master) - alert(usr,"Master_controller or air_master not found.","Air Report") + tgui_alert_async(usr,"Master_controller or air_master not found.","Air Report") return var/active_groups = air_master.active_zones diff --git a/code/modules/admin/verbs/dice.dm b/code/modules/admin/verbs/dice.dm index b8d2146cf4..6a773388c0 100644 --- a/code/modules/admin/verbs/dice.dm +++ b/code/modules/admin/verbs/dice.dm @@ -13,12 +13,12 @@ var/dice = num2text(sum) + "d" + num2text(side) - if(alert(usr, "Do you want to inform the world about your game?","Show world?","Yes", "No") == "Yes") + if(tgui_alert(usr, "Do you want to inform the world about your game?","Show world?",list("Yes", "No")) == "Yes") to_world("

The dice have been rolled by Gods!

") var/result = roll(dice) - if(alert(usr, "Do you want to inform the world about the result?","Show world?","Yes", "No") == "Yes") + if(tgui_alert(usr, "Do you want to inform the world about the result?","Show world?",list("Yes", "No")) == "Yes") to_world("

Gods rolled [dice], result is [result]

") message_admins("[key_name_admin(src)] rolled dice [dice], result is [result]", 1) \ No newline at end of file diff --git a/code/modules/admin/verbs/fps.dm b/code/modules/admin/verbs/fps.dm index fbafc004db..d577cf9446 100644 --- a/code/modules/admin/verbs/fps.dm +++ b/code/modules/admin/verbs/fps.dm @@ -13,7 +13,7 @@ to_chat(src, "Error: set_server_fps(): Invalid world.fps value. No changes made.") return if(new_fps > config.fps * 1.5) - if(alert(src, "You are setting fps to a high value:\n\t[new_fps] frames-per-second\n\tconfig.fps = [config.fps]", "Warning!", "Confirm", "ABORT-ABORT-ABORT") != "Confirm") + if(tgui_alert(src, "You are setting fps to a high value:\n\t[new_fps] frames-per-second\n\tconfig.fps = [config.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/grief_fixers.dm b/code/modules/admin/verbs/grief_fixers.dm index ba4052586f..0523fbcf1a 100644 --- a/code/modules/admin/verbs/grief_fixers.dm +++ b/code/modules/admin/verbs/grief_fixers.dm @@ -5,7 +5,7 @@ if(!check_rights(R_ADMIN|R_DEBUG|R_EVENT)) return - if(alert(usr, "WARNING: Executing this command will perform a full reset of atmosphere. All pipelines will lose any gas that may be in them, and all zones will be reset to contain air mix as on roundstart. The supermatter engine will also be stopped (to prevent overheat due to removal of coolant). Do not use unless the station is suffering serious atmospheric issues due to grief or bug.", "Full Atmosphere Reboot", "No", "Yes") == "No") + if(tgui_alert(usr, "WARNING: Executing this command will perform a full reset of atmosphere. All pipelines will lose any gas that may be in them, and all zones will be reset to contain air mix as on roundstart. The supermatter engine will also be stopped (to prevent overheat due to removal of coolant). Do not use unless the station is suffering serious atmospheric issues due to grief or bug.", "Full Atmosphere Reboot", list("No", "Yes")) == "No") return feedback_add_details("admin_verb","FA") diff --git a/code/modules/admin/verbs/lightning_strike.dm b/code/modules/admin/verbs/lightning_strike.dm index ab84316054..96f5419f99 100644 --- a/code/modules/admin/verbs/lightning_strike.dm +++ b/code/modules/admin/verbs/lightning_strike.dm @@ -6,7 +6,7 @@ if(!check_rights(R_FUN)) return - var/result = alert(src, "Really strike your tile with lightning?", "Confirm Badmin" , "No", "Yes (Cosmetic)", "Yes (Real)") + var/result = tgui_alert(src, "Really strike your tile with lightning?", "Confirm Badmin" , list("No", "Yes (Cosmetic)", "Yes (Real)")) if(result == "No") return diff --git a/code/modules/admin/verbs/map_template_loadverb.dm b/code/modules/admin/verbs/map_template_loadverb.dm index aa525b8e12..650b0ff970 100644 --- a/code/modules/admin/verbs/map_template_loadverb.dm +++ b/code/modules/admin/verbs/map_template_loadverb.dm @@ -26,9 +26,8 @@ for(var/S in template.get_affected_turfs(T,centered = TRUE, orientation=orientation)) preview += image('icons/misc/debug_group.dmi',S ,"red") usr.client.images += preview - if(alert(usr,"Confirm location.", "Template Confirm","No","Yes") == "Yes") - if(template.annihilate && alert(usr,"This template is set to annihilate everything in the red square. \ - \nEVERYTHING IN THE RED SQUARE WILL BE DELETED, ARE YOU ABSOLUTELY SURE?", "Template Confirm","No","Yes") == "No") + if(tgui_alert(usr,"Confirm location.", "Template Confirm",list("No","Yes")) == "Yes") + if(template.annihilate && tgui_alert(usr,"This template is set to annihilate everything in the red square. EVERYTHING IN THE RED SQUARE WILL BE DELETED, ARE YOU ABSOLUTELY SURE?", "Template Confirm", list("No","Yes")) == "No") usr.client.images -= preview return @@ -57,11 +56,11 @@ orientation = dir2angle(orientation) if((!(orientation%180) && template.width > world.maxx || template.height > world.maxy) || (orientation%180 && template.width > world.maxy || template.height > world.maxx)) - if(alert(usr,"This template is larger than the existing z-levels. It will EXPAND ALL Z-LEVELS to match the size of the template. This may cause chaos. Are you sure you want to do this?","DANGER!!!","Cancel","Yes") == "Cancel") + if(tgui_alert(usr,"This template is larger than the existing z-levels. It will EXPAND ALL Z-LEVELS to match the size of the template. This may cause chaos. Are you sure you want to do this?","DANGER!!!",list("Cancel","Yes")) == "Cancel") to_chat(usr,"Template placement aborted.") return - if(alert(usr,"Confirm map load.", "Template Confirm","No","Yes") == "Yes") + if(tgui_alert(usr,"Confirm map load.", "Template Confirm",list("No","Yes")) == "Yes") if(template.load_new_z(orientation=orientation)) message_admins("[key_name_admin(usr)] has placed a map template ([template.name]) on Z level [world.maxz].") else diff --git a/code/modules/admin/verbs/mapping.dm b/code/modules/admin/verbs/mapping.dm index 22ed864f8b..79fa64d593 100644 --- a/code/modules/admin/verbs/mapping.dm +++ b/code/modules/admin/verbs/mapping.dm @@ -69,7 +69,7 @@ GLOBAL_LIST_BOILERPLATE(all_debugging_effects, /obj/effect/debugging) set name = "Camera Report" if(!master_controller) - alert(usr,"Master_controller not found.","Sec Camera Report") + tgui_alert_async(usr,"Master_controller not found.","Sec Camera Report") return 0 var/list/obj/machinery/camera/CL = list() @@ -273,7 +273,7 @@ var/list/debug_verbs = list ( set category = "ZAS" set name = "Reboot ZAS" - if(alert(usr, "This will destroy and remake all zone geometry on the whole map.","Reboot ZAS","Reboot ZAS","Nevermind") == "Reboot ZAS") + if(tgui_alert(usr, "This will destroy and remake all zone geometry on the whole map.","Reboot ZAS",list("Reboot ZAS","Nevermind")) == "Reboot ZAS") SSair.RebootZAS() /client/proc/count_objects_on_z_level() diff --git a/code/modules/admin/verbs/playsound.dm b/code/modules/admin/verbs/playsound.dm index 89c63d0260..93e66bbbbc 100644 --- a/code/modules/admin/verbs/playsound.dm +++ b/code/modules/admin/verbs/playsound.dm @@ -10,7 +10,7 @@ var/list/sounds_cache = list() sounds_cache += S - if(alert(usr, "Do you ready?\nSong: [S]\nNow you can also play this sound using \"Play Server Sound\".", "Confirmation request" ,"Play", "Cancel") == "Cancel") + if(tgui_alert(usr, "Do you ready?\nSong: [S]\nNow you can also play this sound using \"Play Server Sound\".", "Confirmation request", list("Play","Cancel")) == "Cancel") return log_admin("[key_name(src)] played sound [S]") diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index c1696a5589..8ddad6025b 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -4,7 +4,7 @@ if(!holder) return - var/confirm = alert(src, "Make [M] drop everything?", "Message", "Yes", "No") + var/confirm = tgui_alert(src, "Make [M] drop everything?", "Message", list("Yes", "No")) if(confirm != "Yes") return @@ -23,7 +23,7 @@ if (ismob(M)) if(istype(M, /mob/living/silicon/ai)) - alert(usr, "The AI can't be sent to prison you jerk!") + tgui_alert_async(usr, "The AI can't be sent to prison you jerk!") return //strip their stuff before they teleport into a cell :downs: for(var/obj/item/W in M) @@ -49,7 +49,7 @@ if(!holder) return - var/age = alert(src, "Age check", "Show accounts yonger then _____ days","7", "30" , "All") + var/age = tgui_alert(src, "Age check", "Show accounts yonger then _____ days", list("7","30","All")) if(age == "All") age = 9999999 @@ -220,12 +220,12 @@ if(!holder) return - var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No") + var/confirm = tgui_alert(src, "You sure?", "Confirm", list("Yes", "No")) if(confirm != "Yes") return log_admin("[key_name(src)] has added a random AI law.") message_admins("[key_name_admin(src)] has added a random AI law.", 1) - var/show_log = alert(src, "Show ion message?", "Message", "Yes", "No") + var/show_log = tgui_alert(src, "Show ion message?", "Message", list("Yes", "No")) if(show_log == "Yes") command_announcement.Announce("Ion storm detected near \the [station_name()]. Please check all AI-controlled equipment for errors.", "Anomaly Alert", new_sound = 'sound/AI/ionstorm.ogg') @@ -275,7 +275,7 @@ Ccomp's first proc. return if(GLOB.respawn_timers[target] == -1) // Their respawn timer is set to -1, which is 'not allowed to respawn' - var/response = alert(src, "Are you sure you wish to allow this individual to respawn? They would normally not be able to.","Allow impossible respawn?","No","Yes") + var/response = tgui_alert(src, "Are you sure you wish to allow this individual to respawn? They would normally not be able to.","Allow impossible respawn?",list("No","Yes")) if(response == "No") return @@ -387,11 +387,11 @@ Traitors and the like can also be revived with the previous role mostly intact. return //I frontload all the questions so we don't have a half-done process while you're reading. - var/location = alert(src, "Please specify where to spawn them.", "Location", "Right Here", "Arrivals", "Cancel") + var/location = tgui_alert(src, "Please specify where to spawn them.", "Location", list("Right Here", "Arrivals", "Cancel")) if(location == "Cancel" || !location) return - var/announce = alert(src,"Announce as if they had just arrived?", "Announce", "Yes", "No", "Cancel") + var/announce = tgui_alert(src,"Announce as if they had just arrived?", "Announce", list("Yes", "No", "Cancel")) if(announce == "Cancel") return else if(announce == "Yes") //Too bad buttons can't just have 1/0 values and different display strings @@ -399,7 +399,7 @@ Traitors and the like can also be revived with the previous role mostly intact. else announce = 0 - var/inhabit = alert(src,"Put the person into the spawned mob?", "Inhabit", "Yes", "No", "Cancel") + var/inhabit = tgui_alert(src,"Put the person into the spawned mob?", "Inhabit", list("Yes", "No", "Cancel")) if(inhabit == "Cancel") return else if(inhabit == "Yes") @@ -415,13 +415,13 @@ Traitors and the like can also be revived with the previous role mostly intact. //Found their record, they were spawned previously if(record_found) - var/samejob = alert(src,"Found [picked_client.prefs.real_name] in data core. They were [record_found.fields["real_rank"]] this round. Assign same job? They will not be re-added to the manifest/records, either way.","Previously spawned","Yes","Assistant","No") + var/samejob = tgui_alert(src,"Found [picked_client.prefs.real_name] in data core. They were [record_found.fields["real_rank"]] this round. Assign same job? They will not be re-added to the manifest/records, either way.","Previously spawned",list("Yes","Assistant","No")) if(samejob == "Yes") charjob = record_found.fields["real_rank"] else if(samejob == USELESS_JOB) //VOREStation Edit - Visitor not Assistant charjob = USELESS_JOB //VOREStation Edit - Visitor not Assistant else - records = alert(src,"No data core entry detected. Would you like add them to the manifest, and sec/med/HR records?","Records","Yes","No","Cancel") + records = tgui_alert(src,"No data core entry detected. Would you like add them to the manifest, and sec/med/HR records?","Records",list("Yes","No","Cancel")) if(records == "Cancel") return if(records == "Yes") @@ -440,7 +440,7 @@ Traitors and the like can also be revived with the previous role mostly intact. //If you've picked a job by now, you can equip them. var/equipment if(charjob) - equipment = alert(src,"Spawn them with equipment?", "Equipment", "Yes", "No", "Cancel") + equipment = tgui_alert(src,"Spawn them with equipment?", "Equipment", list("Yes", "No", "Cancel")) if(equipment == "Cancel") return else if(equipment == "Yes") @@ -464,7 +464,7 @@ Traitors and the like can also be revived with the previous role mostly intact. switch(location) if("Right Here") //Spawn them on your turf spawnloc = get_turf(src.mob) - sparks = alert(src,"Sparks like they teleported in?", "Showy", "Yes", "No", "Cancel") + sparks = tgui_alert(src,"Sparks like they teleported in?", "Showy", list("Yes", "No", "Cancel")) if(sparks == "Cancel") return if(sparks == "No") @@ -575,7 +575,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]", 1) - var/show_log = alert(src, "Show ion message?", "Message", "Yes", "No") + var/show_log = tgui_alert(src, "Show ion message?", "Message", list("Yes", "No")) if(show_log == "Yes") command_announcement.Announce("Ion storm detected near the [station_name()]. Please check all AI-controlled equipment for errors.", "Anomaly Alert", new_sound = 'sound/AI/ionstorm.ogg') feedback_add_details("admin_verb","IONC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! @@ -590,7 +590,7 @@ Traitors and the like can also be revived with the previous role mostly intact. if(!mob) return if(!istype(M)) - alert(usr, "Cannot revive a ghost") + tgui_alert_async(usr, "Cannot revive a ghost") return if(config.allow_admin_rev) M.revive() @@ -600,7 +600,7 @@ Traitors and the like can also be revived with the previous role mostly intact. message_admins(msg) admin_ticket_log(M, msg) else - alert(usr, "Admin revive disabled") + tgui_alert_async(usr, "Admin revive disabled") feedback_add_details("admin_verb","REJU") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/cmd_admin_create_centcom_report() @@ -620,7 +620,7 @@ Traitors and the like can also be revived with the previous role mostly intact. //New message handling post_comm_message(customname, replacetext(input, "\n", "
")) - switch(alert(usr, "Should this be announced to the general population?","Show world?","Yes","No")) + switch(tgui_alert(usr, "Should this be announced to the general population?","Show world?",list("Yes","No"))) if("Yes") command_announcement.Announce(input, customname, new_sound = 'sound/AI/commandreport.ogg', msg_sanitized = 1); if("No") @@ -669,7 +669,7 @@ Traitors and the like can also be revived with the previous role mostly intact. if ((devastation != -1) || (heavy != -1) || (light != -1) || (flash != -1)) if ((devastation > 20) || (heavy > 20) || (light > 20)) - if (alert(src, "Are you sure you want to do this? It will laaag.", "Confirmation", "Yes", "No") == "No") + if (tgui_alert(src, "Are you sure you want to do this? It will laaag.", "Confirmation", list("Yes", "No")) == "No") return explosion(O, devastation, heavy, light, flash) @@ -712,7 +712,7 @@ Traitors and the like can also be revived with the previous role mostly intact. if(!check_rights(R_ADMIN|R_FUN)) return //VOREStation Edit - var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No") + var/confirm = tgui_alert(src, "You sure?", "Confirm", list("Yes", "No")) if(confirm != "Yes") return //Due to the delay here its easy for something to have happened to the mob if(!M) return @@ -734,7 +734,7 @@ Traitors and the like can also be revived with the previous role mostly intact. if(!holder) return - var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No") + var/confirm = tgui_alert(src, "You sure?", "Confirm", list("Yes", "No")) if(confirm == "Yes") if (istype(mob, /mob/observer/dead)) // so they don't spam gibs everywhere return @@ -752,7 +752,7 @@ Traitors and the like can also be revived with the previous role mostly intact. to_chat(src, "Only administrators may use this command.") return var/mob/M = null - switch(alert(usr, "How would you like to ban someone today?", "Manual Ban", "Key List", "Enter Manually", "Cancel")) + switch(tgui_alert(usr, "How would you like to ban someone today?", "Manual Ban", "Key List", "Enter Manually", "Cancel")) if("Key List") var/list/keys = list() for(var/mob/M in player_list) @@ -762,10 +762,10 @@ Traitors and the like can also be revived with the previous role mostly intact. return M = selection:mob if ((M.client && M.client.holder && (M.client.holder.level >= holder.level))) - alert(usr, "You cannot perform this action. You must be of a higher administrative rank!") + tgui_alert_async(usr, "You cannot perform this action. You must be of a higher administrative rank!") return - switch(alert(usr, "Temporary Ban?","Temporary Ban","Yes","No")) + switch(tgui_alert(usr, "Temporary Ban?","Temporary Ban",list("Yes","No"))) if("Yes") var/mins = input(usr,"How long (in minutes)?","Ban time",1440) as num if(!mins) @@ -879,7 +879,7 @@ Traitors and the like can also be revived with the previous role mostly intact. if(!check_rights(R_ADMIN)) return //VOREStation Edit - var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No") + var/confirm = tgui_alert(src, "You sure?", "Confirm", list("Yes", "No")) if(confirm != "Yes") return var/choice @@ -908,7 +908,7 @@ Traitors and the like can also be revived with the previous role mostly intact. if(!check_rights(R_ADMIN)) return //VOREStation Edit - if(alert(src, "You sure?", "Confirm", "Yes", "No") != "Yes") return + if(tgui_alert(src, "You sure?", "Confirm", list("Yes", "No")) != "Yes") return if(!ticker || !emergency_shuttle.can_recall()) return @@ -962,7 +962,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(src, "Do you want to notify the players?", "Options", list("Yes", "No", "Cancel")) if(notifyplayers == "Cancel") return @@ -1007,7 +1007,7 @@ Traitors and the like can also be revived with the previous role mostly intact. if(!M) return - var/confirm = alert(usr, "Are you sure you want to cryo [M]?","Confirmation","No","Yes") + var/confirm = tgui_alert(usr, "Are you sure you want to cryo [M]?","Confirmation",list("No","Yes")) if(confirm == "No") return diff --git a/code/modules/admin/verbs/randomverbs_vr.dm b/code/modules/admin/verbs/randomverbs_vr.dm index 997556e3a4..63200f12fb 100644 --- a/code/modules/admin/verbs/randomverbs_vr.dm +++ b/code/modules/admin/verbs/randomverbs_vr.dm @@ -27,13 +27,13 @@ if(!chosen) return - var/char_name = alert(src, "Spawn mob with their character name?", "Mob name", "Yes", "No", "Cancel") + var/char_name = tgui_alert(src, "Spawn mob with their character name?", "Mob name", list("Yes", "No", "Cancel")) var/name = 0 if(char_name == "Cancel") return if(char_name == "Yes") name = 1 - var/vorgans = alert(src, "Spawn mob with their character's vore organs and prefs?", "Vore organs", "Yes", "No", "Cancel") + var/vorgans = tgui_alert(src, "Spawn mob with their character's vore organs and prefs?", "Vore organs", list("Yes", "No", "Cancel")) var/organs if(vorgans == "Cancel") return diff --git a/code/modules/admin/verbs/smite_vr.dm b/code/modules/admin/verbs/smite_vr.dm index 58dd314791..db56f532d2 100644 --- a/code/modules/admin/verbs/smite_vr.dm +++ b/code/modules/admin/verbs/smite_vr.dm @@ -77,7 +77,7 @@ kin_type = kin_types[kin_type] - var/myself = alert(usr, "Control the shadekin yourself or delete pred and prey after?","Control Shadekin?","Control","Cancel","Delete") + var/myself = tgui_alert(usr, "Control the shadekin yourself or delete pred and prey after?","Control Shadekin?",list("Control","Cancel","Delete")) if(myself == "Cancel" || !target) return diff --git a/code/modules/admin/verbs/striketeam.dm b/code/modules/admin/verbs/striketeam.dm index cb59ae2d12..1b63c998d8 100644 --- a/code/modules/admin/verbs/striketeam.dm +++ b/code/modules/admin/verbs/striketeam.dm @@ -36,16 +36,16 @@ var/const/commandos_possible = 6 //if more Commandos are needed in the future to_chat(usr, "Someone is already sending a team.") return - if(alert(usr, "Do you want to send in a strike team? Once enabled, this is irreversible.","Strike Team","Yes","No")!="Yes") + if(tgui_alert(usr, "Do you want to send in a strike team? Once enabled, this is irreversible.","Strike Team",list("Yes","No"))!="Yes") return - alert(usr, "This 'mode' will go on until everyone is dead or the station is destroyed. You may also admin-call the evac shuttle when appropriate. Spawned commandos have internals cameras which are viewable through a monitor inside the Spec. Ops. Office. Assigning the team's detailed task is recommended from there. While you will be able to manually pick the candidates from active ghosts, their assignment in the squad will be random.") + tgui_alert(usr, "This 'mode' will go on until everyone is dead or the station is destroyed. You may also admin-call the evac shuttle when appropriate. Spawned commandos have internals cameras which are viewable through a monitor inside the Spec. Ops. Office. Assigning the team's detailed task is recommended from there. While you will be able to manually pick the candidates from active ghosts, their assignment in the squad will be random.") // Should remain tgui_alert() (blocking) choice = null while(!choice) choice = sanitize(input(src, "Please specify which mission the strike team shall undertake.", "Specify Mission", "")) if(!choice) - if(alert(usr, "Error, no mission set. Do you want to exit the setup process?","Strike Team","Yes","No")=="Yes") + if(tgui_alert(usr, "Error, no mission set. Do you want to exit the setup process?","Strike Team",list("Yes","No"))=="Yes") return consider_ert_load() //VOREStation Add diff --git a/code/modules/admin/view_variables/admin_delete.dm b/code/modules/admin/view_variables/admin_delete.dm index 53a54786a9..7976d3bedf 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(src, "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]") feedback_add_details("admin_verb","ADEL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! diff --git a/code/modules/admin/view_variables/mass_edit_variables.dm b/code/modules/admin/view_variables/mass_edit_variables.dm index 7374759e8c..a20eccf994 100644 --- a/code/modules/admin/view_variables/mass_edit_variables.dm +++ b/code/modules/admin/view_variables/mass_edit_variables.dm @@ -49,7 +49,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(src, "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 @@ -115,7 +115,7 @@ var/pre_processing = new_value var/unique if (varsvars && 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 @@ -142,7 +142,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(src, "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 d77fc6b8b3..6500c45b00 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 && subtypes.len) - switch(alert(usr, "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") @@ -98,7 +98,7 @@ GLOBAL_PROTECT(VVpixelmovement) L += var_value if(IS_VALID_ASSOC_KEY(var_value)) - switch(alert(usr, "Would you like to associate a value with the list entry?","List VV","Yes","No")) + switch(tgui_alert(usr, "Would you like to associate a value with the list entry?","List VV","Yes","No")) if("Yes") L[var_value] = mod_list_add_ass(O) //hehe if (O) @@ -117,7 +117,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(src, "The list you're trying to edit is very long, continuing may crash the server.", "Warning", "Continue", "Abort") if(confirm != "Continue") return @@ -181,7 +181,7 @@ GLOBAL_PROTECT(VVpixelmovement) return var/assoc = 0 if(IS_VALID_ASSOC_KEY(L[index])) - 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(src, "Do you want to edit the key or its assigned value?", "Associated List", "Key", "Assigned Value", "Cancel") if (prompt == "Cancel") return if (prompt == "Assigned Value") @@ -316,7 +316,7 @@ GLOBAL_PROTECT(VVpixelmovement) 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(src, "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 diff --git a/code/modules/admin/view_variables/topic.dm b/code/modules/admin/view_variables/topic.dm index cede63695b..28f7fde397 100644 --- a/code/modules/admin/view_variables/topic.dm +++ b/code/modules/admin/view_variables/topic.dm @@ -177,14 +177,14 @@ to_chat(usr, "This can only be used on instances of type /obj") return - var/action_type = alert(usr, "Strict type ([O.type]) or type and all subtypes?","Type Selection","Strict type","Type and subtypes","Cancel") + var/action_type = tgui_alert(usr, "Strict type ([O.type]) or type and all subtypes?","Type Selection",list("Strict type","Type and subtypes","Cancel")) if(action_type == "Cancel" || !action_type) return - if(alert(usr, "Are you really sure you want to delete all objects of type [O.type]?","Delete All?","Yes","No") != "Yes") + if(tgui_alert(usr, "Are you really sure you want to delete all objects of type [O.type]?","Delete All?",list("Yes","No")) != "Yes") return - if(alert(usr, "Second confirmation required. Delete?","REALLY?","Yes","No") != "Yes") + if(tgui_alert(usr, "Second confirmation required. Delete?","REALLY?",list("Yes","No")) != "Yes") return var/O_type = O.type @@ -235,7 +235,7 @@ to_chat(usr, "This can only be done to instances of type /mob/living/carbon/human") return - if(alert(usr, "Confirm mob type change?","Confirm","Transform","Cancel") != "Transform") return + if(tgui_alert(usr, "Confirm mob type change?","Confirm",list("Transform","Cancel")) != "Transform") return if(!H) to_chat(usr, "Mob doesn't exist anymore") return @@ -249,7 +249,7 @@ to_chat(usr, "This can only be done to instances of type /mob/living/carbon/human") return - if(alert(usr, "Confirm mob type change?","Confirm","Transform","Cancel") != "Transform") return + if(tgui_alert(usr, "Confirm mob type change?","Confirm",list("Transform","Cancel")) != "Transform") return if(!H) to_chat(usr, "Mob doesn't exist anymore") return @@ -263,7 +263,7 @@ to_chat(usr, "This can only be done to instances of type /mob/living/carbon/human") return - if(alert(usr, "Confirm mob type change?","Confirm","Transform","Cancel") != "Transform") return + if(tgui_alert(usr, "Confirm mob type change?","Confirm",list("Transform","Cancel")) != "Transform") return if(!H) to_chat(usr, "Mob doesn't exist anymore") return @@ -277,7 +277,7 @@ to_chat(usr, "This can only be done to instances of type /mob/living/carbon/human") return - if(alert(usr, "Confirm mob type change?","Confirm","Transform","Cancel") != "Transform") return + if(tgui_alert(usr, "Confirm mob type change?","Confirm",list("Transform","Cancel")) != "Transform") return if(!H) to_chat(usr, "Mob doesn't exist anymore") return @@ -508,7 +508,7 @@ var/client/C = value["value"] if (!C) return - var/prompt = alert(usr, "Do you want to grant [C] access to view this VV window? (they will not be able to edit or change anysrc nor open nested vv windows unless they themselves are an admin)", "Confirm", "Yes", "No") + var/prompt = tgui_alert(usr, "Do you want to grant [C] access to view this VV window? (they will not be able to edit or change anysrc nor open nested vv windows unless they themselves are an admin)", "Confirm", list("Yes", "No")) if (prompt != "Yes") return if(!thing) diff --git a/code/modules/admin/view_variables/topic_list.dm b/code/modules/admin/view_variables/topic_list.dm index fd65bae100..c437a58a17 100644 --- a/code/modules/admin/view_variables/topic_list.dm +++ b/code/modules/admin/view_variables/topic_list.dm @@ -10,7 +10,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(usr, "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", "Yes", "No") if (prompt != "Yes") return target.Cut(target_index, target_index+1) diff --git a/code/modules/assembly/holder.dm b/code/modules/assembly/holder.dm index 941d002d08..4ae19fab51 100644 --- a/code/modules/assembly/holder.dm +++ b/code/modules/assembly/holder.dm @@ -126,7 +126,7 @@ to_chat(user, " BUG:Assembly part missing, please report this!") return if(istype(a_left,a_right.type))//If they are the same type it causes issues due to window code - switch(alert(usr, "Which side would you like to use?","Side","Left","Right")) + switch(tgui_alert(usr, "Which side would you like to use?","Side",list("Left","Right"))) if("Left") a_left.attack_self(user) if("Right") a_right.attack_self(user) return diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm index ad116e9013..323c83d82b 100644 --- a/code/modules/client/client procs.dm +++ b/code/modules/client/client procs.dm @@ -160,7 +160,7 @@ return null if(!config.guests_allowed && IsGuestKey(key)) - alert(src,"This server doesn't allow guest accounts to play. Please go to http://www.byond.com/ and register for a key.","Guest","OK") + alert(src,"This server doesn't allow guest accounts to play. Please go to http://www.byond.com/ and register for a key.","Guest") // Not tgui_alert del(src) return @@ -385,8 +385,7 @@ else var/error_message = query_hours.ErrorMsg() // Need this out here since the spawn below will split the stack and who knows what'll happen by the time it runs log_debug("Error loading play hours for [ckey]: [error_message]") - spawn(0) - alert(src, "The query to load your existing playtime failed. Screenshot this, give the screenshot to a developer, and reconnect, otherwise you may lose any recorded play hours (which may limit access to jobs). ERROR: [error_message]", "PROBLEMS!!") + tgui_alert_async(src, "The query to load your existing playtime failed. Screenshot this, give the screenshot to a developer, and reconnect, otherwise you may lose any recorded play hours (which may limit access to jobs). ERROR: [error_message]", "PROBLEMS!!") // VOREStation Edit End - Department Hours if(sql_id) @@ -472,7 +471,7 @@ //Timing if(src.chatOutputLoadedAt > (world.time - 10 SECONDS)) - alert(src, "You can only try to reload VChat every 10 seconds at most.") + tgui_alert_async(src, "You can only try to reload VChat every 10 seconds at most.") return verbs -= /client/proc/vchat_export_log diff --git a/code/modules/client/preference_setup/general/02_language.dm b/code/modules/client/preference_setup/general/02_language.dm index fc21c743c0..cea16c01f0 100644 --- a/code/modules/client/preference_setup/general/02_language.dm +++ b/code/modules/client/preference_setup/general/02_language.dm @@ -62,7 +62,7 @@ else if(href_list["add_language"]) var/datum/species/S = GLOB.all_species[pref.species] if(pref.alternate_languages.len >= S.num_alternate_languages) - alert(user, "You have already selected the maximum number of alternate languages for this species!") + tgui_alert_async(user, "You have already selected the maximum number of alternate languages for this species!") else var/list/available_languages = S.secondary_langs.Copy() for(var/L in GLOB.all_languages) @@ -76,7 +76,7 @@ available_languages -= pref.alternate_languages if(!available_languages.len) - alert(user, "There are no additional languages available to select.") + tgui_alert_async(user, "There are no additional languages available to select.") else var/new_lang = input(user, "Select an additional language", "Character Generation", null) as null|anything in available_languages if(new_lang && pref.alternate_languages.len < S.num_alternate_languages) @@ -90,13 +90,13 @@ char = input("Enter a single special character.\nYou may re-select the same characters.\nThe following characters are already in use by radio: ; : .\nThe following characters are already in use by special say commands: ! * ^", "Enter Character - [3 - keys.len] remaining") as null|text if(char) if(length(char) > 1) - alert(user, "Only single characters allowed.", "Error", "Ok") + tgui_alert_async(user, "Only single characters allowed.", "Error") else if(char in list(";", ":", ".")) - alert(user, "Radio character. Rejected.", "Error", "Ok") + tgui_alert_async(user, "Radio character. Rejected.", "Error") else if(char in list("!","*","^","-")) - alert(user, "Say character. Rejected.", "Error", "Ok") + tgui_alert_async(user, "Say character. Rejected.", "Error") else if(contains_az09(char)) - alert(user, "Non-special character. Rejected.", "Error", "Ok") + tgui_alert_async(user, "Non-special character. Rejected.", "Error") else keys.Add(char) while(char && keys.len < 3) diff --git a/code/modules/client/preference_setup/vore/02_size.dm b/code/modules/client/preference_setup/vore/02_size.dm index 5af5db28b2..19df50973f 100644 --- a/code/modules/client/preference_setup/vore/02_size.dm +++ b/code/modules/client/preference_setup/vore/02_size.dm @@ -78,7 +78,7 @@ swear to god I will find you and I will punch you for not reading these directions!\n\ ([WEIGHT_MIN]-[WEIGHT_MAX])", "Character Preference") as num|null if(new_weight) - var/unit_of_measurement = alert(user, "Is that number in pounds (lb) or kilograms (kg)?", "Confirmation", "Pounds", "Kilograms") + var/unit_of_measurement = tgui_alert(user, "Is that number in pounds (lb) or kilograms (kg)?", "Confirmation", list("Pounds", "Kilograms")) if(unit_of_measurement == "Pounds") new_weight = round(text2num(new_weight),4) if(unit_of_measurement == "Kilograms") diff --git a/code/modules/client/preference_setup/vore/07_traits.dm b/code/modules/client/preference_setup/vore/07_traits.dm index 78885b2e93..1a6f22ddbf 100644 --- a/code/modules/client/preference_setup/vore/07_traits.dm +++ b/code/modules/client/preference_setup/vore/07_traits.dm @@ -186,12 +186,6 @@ return TOPIC_NOACTION else if(href_list["custom_species"]) - /*if(pref.species != "Custom Species") - alert(usr, "You cannot set a custom species name unless you set your character to use the 'Custom Species' \ - species on the 'General' tab. If you have this set to something, it's because you had it set before the \ - Trait system was implemented. If you wish to change it, set your species to 'Custom Species' and configure \ - the species completely.") - return TOPIC_REFRESH*/ //There was no reason to have this. var/raw_choice = sanitize(input(user, "Input your custom species name:", "Character Preference", pref.custom_species) as null|text, MAX_NAME_LEN) if (CanUseTopic(user)) @@ -214,28 +208,28 @@ return TOPIC_REFRESH else if(href_list["blood_reset"]) - var/choice = alert(usr, "Reset blood color to human default (#A10808)?","Reset Blood Color","Reset","Cancel") + var/choice = tgui_alert(usr, "Reset blood color to human default (#A10808)?","Reset Blood Color",list("Reset","Cancel")) if(choice == "Reset") pref.blood_color = "#A10808" return TOPIC_REFRESH else if(href_list["clicked_pos_trait"]) var/datum/trait/trait = text2path(href_list["clicked_pos_trait"]) - var/choice = alert(usr, "Remove [initial(trait.name)] and regain [initial(trait.cost)] points?","Remove Trait","Remove","Cancel") + var/choice = tgui_alert(usr, "Remove [initial(trait.name)] and regain [initial(trait.cost)] points?","Remove Trait",list("Remove","Cancel")) if(choice == "Remove") pref.pos_traits -= trait return TOPIC_REFRESH else if(href_list["clicked_neu_trait"]) var/datum/trait/trait = text2path(href_list["clicked_neu_trait"]) - var/choice = alert(usr, "Remove [initial(trait.name)]?","Remove Trait","Remove","Cancel") + var/choice = tgui_alert(usr, "Remove [initial(trait.name)]?","Remove Trait",list("Remove","Cancel")) if(choice == "Remove") pref.neu_traits -= trait return TOPIC_REFRESH else if(href_list["clicked_neg_trait"]) var/datum/trait/trait = text2path(href_list["clicked_neg_trait"]) - var/choice = alert(usr, "Remove [initial(trait.name)] and lose [initial(trait.cost)] points?","Remove Trait","Remove","Cancel") + var/choice = tgui_alert(usr, "Remove [initial(trait.name)] and lose [initial(trait.cost)] points?","Remove Trait",list("Remove","Cancel")) if(choice == "Remove") pref.neg_traits -= trait return TOPIC_REFRESH @@ -310,7 +304,7 @@ done = TRUE if(trait_choice in nicelist) var/datum/trait/path = nicelist[trait_choice] - var/choice = alert(usr, "\[Cost:[initial(path.cost)]\] [initial(path.desc)]",initial(path.name),"Take Trait","Cancel","Go Back") + var/choice = tgui_alert(usr, "\[Cost:[initial(path.cost)]\] [initial(path.desc)]",initial(path.name),"Take Trait",list("Cancel","Go Back")) if(choice == "Cancel") trait_choice = null if(choice != "Go Back") @@ -325,21 +319,21 @@ var/conflict = FALSE if(pref.dirty_synth && !(instance.can_take & SYNTHETICS)) - alert(usr, "The trait you've selected can only be taken by organic characters!","Error") + tgui_alert_async(usr, "The trait you've selected can only be taken by organic characters!","Error") pref.dirty_synth = 0 //Just to be sure return TOPIC_REFRESH if(pref.gross_meatbag && !(instance.can_take & ORGANICS)) - alert(usr, "The trait you've selected can only be taken by synthetic characters!","Error") + tgui_alert_async(usr, "The trait you've selected can only be taken by synthetic characters!","Error") pref.gross_meatbag = 0 //Just to be sure return TOPIC_REFRESH if(pref.species in instance.banned_species) - alert(usr, "The trait you've selected cannot be taken by the species you've chosen!","Error") + tgui_alert_async(usr, "The trait you've selected cannot be taken by the species you've chosen!","Error") return TOPIC_REFRESH if( LAZYLEN(instance.allowed_species) && !(pref.species in instance.allowed_species)) //Adding white list handling -shark - alert(usr, "The trait you've selected cannot be taken by the species you've chosen!","Error") + tgui_alert_async(usr, "The trait you've selected cannot be taken by the species you've chosen!","Error") return TOPIC_REFRESH if(trait_choice in pref.pos_traits + pref.neu_traits + pref.neg_traits) @@ -358,8 +352,7 @@ break varconflict if(conflict) - alert(usr, "You cannot take this trait and [conflict] at the same time. \ - Please remove that trait, or pick another trait to add.","Error") + tgui_alert_async(usr, "You cannot take this trait and [conflict] at the same time. Please remove that trait, or pick another trait to add.", "Error") return TOPIC_REFRESH mylist += path diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 79b2f54634..dacb340d12 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -349,9 +349,9 @@ var/list/preferences_datums = list() sanitize_preferences() close_load_dialog(usr) else if(href_list["resetslot"]) - if("No" == alert(usr, "This will reset the current slot. Continue?", "Reset current slot?", "No", "Yes")) + if("No" == tgui_alert(usr, "This will reset the current slot. Continue?", "Reset current slot?", list("No", "Yes"))) return 0 - if("No" == alert(usr, "Are you completely sure that you want to reset this character slot?", "Reset current slot?", "No", "Yes")) + if("No" == tgui_alert(usr, "Are you completely sure that you want to reset this character slot?", "Reset current slot?", list("No", "Yes"))) return 0 load_character(SAVE_RESET) sanitize_preferences() diff --git a/code/modules/client/ui_style.dm b/code/modules/client/ui_style.dm index 7d0584bd70..0d636e8514 100644 --- a/code/modules/client/ui_style.dm +++ b/code/modules/client/ui_style.dm @@ -73,7 +73,7 @@ var/global/list/all_tooltip_styles = list( I.alpha = UI_style_alpha_new - if(alert(usr, "Like it? Save changes?","Save?","Yes", "No") == "Yes") + if(tgui_alert(usr, "Like it? Save changes?","Save?",list("Yes", "No")) == "Yes") prefs.UI_style = UI_style_new prefs.UI_style_alpha = UI_style_alpha_new prefs.UI_style_color = UI_style_color_new diff --git a/code/modules/client/verbs/suicide.dm b/code/modules/client/verbs/suicide.dm index 68ecda8531..a13d0bbb9f 100644 --- a/code/modules/client/verbs/suicide.dm +++ b/code/modules/client/verbs/suicide.dm @@ -20,7 +20,7 @@ to_chat(src, "You're already committing suicide! Be patient!") return - var/confirm = alert(usr, "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") if(!canmove || restrained()) //just while I finish up the new 'fun' suiciding verb. This is to prevent metagaming via suicide @@ -103,7 +103,7 @@ to_chat(src, "You're already committing suicide! Be patient!") return - var/confirm = alert(usr, "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") suiciding = 1 @@ -123,7 +123,7 @@ to_chat(src, "You're already committing suicide! Be patient!") return - var/confirm = alert(usr, "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") suiciding = 1 @@ -143,7 +143,7 @@ to_chat(src, "You're already committing suicide! Be patient!") return - var/confirm = alert(usr, "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") suiciding = 1 @@ -156,7 +156,7 @@ set category = "pAI Commands" set desc = "Kill yourself and become a ghost (You will receive a confirmation prompt)" set name = "pAI Suicide" - var/answer = input("REALLY kill yourself? This action can't be undone.", "Suicide", "No") in list ("Yes", "No") + var/answer = input("REALLY kill yourself? This action can't be undone.", "Suicide", "No") in list (list("Yes", "No")) if(answer == "Yes") var/obj/item/device/paicard/card = loc card.removePersonality() diff --git a/code/modules/clothing/spacesuits/rig/modules/ninja.dm b/code/modules/clothing/spacesuits/rig/modules/ninja.dm index f81a48c2ac..48752e3b6f 100644 --- a/code/modules/clothing/spacesuits/rig/modules/ninja.dm +++ b/code/modules/clothing/spacesuits/rig/modules/ninja.dm @@ -209,7 +209,7 @@ engage(1) /obj/item/rig_module/self_destruct/engage(var/skip_check) - if(!skip_check && usr && alert(usr, "Are you sure you want to push that button?", "Self-destruct", "No", "Yes") == "No") + if(!skip_check && usr && tgui_alert(usr, "Are you sure you want to push that button?", "Self-destruct", list("No", "Yes")) == "No") return if(holder && holder.wearer) smoke.set_up(10, 0, holder.loc) diff --git a/code/modules/clothing/spacesuits/rig/modules/specific/self_destruct.dm b/code/modules/clothing/spacesuits/rig/modules/specific/self_destruct.dm index 391bdf8f6c..861d6528d9 100644 --- a/code/modules/clothing/spacesuits/rig/modules/specific/self_destruct.dm +++ b/code/modules/clothing/spacesuits/rig/modules/specific/self_destruct.dm @@ -41,7 +41,7 @@ engage(1) /obj/item/rig_module/self_destruct/engage(var/skip_check) - if(!skip_check && usr && alert(usr, "Are you sure you want to push that button?", "Self-destruct", "No", "Yes") == "No") + if(!skip_check && usr && tgui_alert(usr, "Are you sure you want to push that button?", "Self-destruct", list("No", "Yes")) == "No") return if(holder && holder.wearer) smoke.set_up(10, 0, holder.loc) diff --git a/code/modules/detectivework/tools/scanner.dm b/code/modules/detectivework/tools/scanner.dm index 6f29d6adde..aaac54eee5 100644 --- a/code/modules/detectivework/tools/scanner.dm +++ b/code/modules/detectivework/tools/scanner.dm @@ -190,7 +190,7 @@ set category = "Object" set src in view(1) - if (alert(usr, "Are you sure you want to wipe all data from [src]?","Wipe Data","Yes","No") == "Yes") + if (tgui_alert(usr, "Are you sure you want to wipe all data from [src]?","Wipe Data",list("Yes","No")) == "Yes") stored = list() to_chat(usr, "Forensic data erase complete.") diff --git a/code/modules/economy/ATM.dm b/code/modules/economy/ATM.dm index fab1685205..f09c6ab7bc 100644 --- a/code/modules/economy/ATM.dm +++ b/code/modules/economy/ATM.dm @@ -229,7 +229,7 @@ log transactions var/transfer_amount = text2num(href_list["funds_amount"]) transfer_amount = round(transfer_amount, 0.01) if(transfer_amount <= 0) - alert(usr, "That is not a valid amount.") + tgui_alert_async(usr, "That is not a valid amount.") else if(transfer_amount <= authenticated_account.money) var/target_account_number = text2num(href_list["target_acc_number"]) var/transfer_purpose = href_list["purpose"] @@ -315,7 +315,7 @@ log transactions var/amount = max(text2num(href_list["funds_amount"]),0) amount = round(amount, 0.01) if(amount <= 0) - alert(usr, "That is not a valid amount.") + tgui_alert_async(usr, "That is not a valid amount.") else if(authenticated_account && amount > 0) if(amount <= authenticated_account.money) playsound(src, 'sound/machines/chime.ogg', 50, 1) @@ -341,7 +341,7 @@ log transactions var/amount = max(text2num(href_list["funds_amount"]),0) amount = round(amount, 0.01) if(amount <= 0) - alert(usr, "That is not a valid amount.") + tgui_alert_async(usr, "That is not a valid amount.") else if(authenticated_account && amount > 0) if(amount <= authenticated_account.money) playsound(src, 'sound/machines/chime.ogg', 50, 1) diff --git a/code/modules/economy/EFTPOS.dm b/code/modules/economy/EFTPOS.dm index 39433641ec..965b51c4ed 100644 --- a/code/modules/economy/EFTPOS.dm +++ b/code/modules/economy/EFTPOS.dm @@ -151,7 +151,7 @@ if(trycode >= 1000 && trycode <= 999999) access_code = trycode else - alert(usr, "That is not a valid code!") + tgui_alert_async(usr, "That is not a valid code!") print_reference() else to_chat(usr, "[bicon(src)]Incorrect code entered.") @@ -178,7 +178,7 @@ if("trans_value") var/try_num = input("Enter amount for EFTPOS transaction", "Transaction amount") as num if(try_num < 0) - alert(usr, "That is not a valid amount!") + tgui_alert_async(usr, "That is not a valid amount!") else transaction_amount = try_num if("toggle_lock") diff --git a/code/modules/emotes/emote_mob.dm b/code/modules/emotes/emote_mob.dm index d017325872..2a93663b7c 100644 --- a/code/modules/emotes/emote_mob.dm +++ b/code/modules/emotes/emote_mob.dm @@ -53,7 +53,7 @@ if(!message) return if (!m_type) - if(alert(src, "Is this an audible emote?", "Emote", "Yes", "No") == "No") + if(tgui_alert(src, "Is this an audible emote?", "Emote", list("Yes", "No")) == "No") m_type = VISIBLE_MESSAGE else m_type = AUDIBLE_MESSAGE diff --git a/code/modules/events/event_manager.dm b/code/modules/events/event_manager.dm index 90e9c9a9ef..360c6f1b7f 100644 --- a/code/modules/events/event_manager.dm +++ b/code/modules/events/event_manager.dm @@ -162,7 +162,7 @@ EC.delay_modifier = delay log_and_message_admins("has set the interval modifier for [severity_to_string[EC.severity]] events to [EC.delay_modifier].") else if(href_list["stop"]) - if(alert(usr, "Stopping an event may have unintended side-effects. Continue?","Stopping Event!","Yes","No") != "Yes") + if(tgui_alert(usr, "Stopping an event may have unintended side-effects. Continue?","Stopping Event!",list("Yes","No")) != "Yes") return var/datum/event/E = locate(href_list["stop"]) var/datum/event_meta/EM = E.event_meta @@ -199,7 +199,7 @@ EM.enabled = !EM.enabled log_and_message_admins("has [EM.enabled ? "enabled" : "disabled"] the [severity_to_string[EM.severity]] event '[EM.name]'.") else if(href_list["remove"]) - if(alert(usr, "This will remove the event from rotation. Continue?","Removing Event!","Yes","No") != "Yes") + if(tgui_alert(usr, "This will remove the event from rotation. Continue?","Removing Event!",list("Yes","No")) != "Yes") return var/datum/event_meta/EM = locate(href_list["remove"]) var/datum/event_container/EC = locate(href_list["EC"]) @@ -208,7 +208,7 @@ else if(href_list["add"]) if(!new_event.name || !new_event.event_type) return - if(alert(usr, "This will add a new event to the rotation. Continue?","Add Event!","Yes","No") != "Yes") + if(tgui_alert(usr, "This will add a new event to the rotation. Continue?","Add Event!",list("Yes","No")) != "Yes") return new_event.severity = selected_event_container.severity selected_event_container.available_events += new_event diff --git a/code/modules/hydroponics/seed_machines.dm b/code/modules/hydroponics/seed_machines.dm index 66e7875e16..690d970522 100644 --- a/code/modules/hydroponics/seed_machines.dm +++ b/code/modules/hydroponics/seed_machines.dm @@ -15,7 +15,7 @@ /obj/item/weapon/disk/botany/attack_self(var/mob/user as mob) if(genes.len) - var/choice = alert(user, "Are you sure you want to wipe the disk?", "Xenobotany Data", "No", "Yes") + var/choice = tgui_alert(user, "Are you sure you want to wipe the disk?", "Xenobotany Data", list("No", "Yes")) if(src && user && genes && choice && choice == "Yes" && user.Adjacent(get_turf(src))) to_chat(user, "You wipe the disk data.") name = initial(name) diff --git a/code/modules/hydroponics/trays/tray.dm b/code/modules/hydroponics/trays/tray.dm index 9d6af08e33..5cc881e987 100644 --- a/code/modules/hydroponics/trays/tray.dm +++ b/code/modules/hydroponics/trays/tray.dm @@ -148,7 +148,7 @@ var/datum/ghosttrap/plant/G = get_ghost_trap("living plant") if(!G.assess_candidate(user)) return - var/response = alert(user, "Are you sure you want to harvest this [seed.display_name]?", "Living plant request", "Yes", "No") + var/response = tgui_alert(user, "Are you sure you want to harvest this [seed.display_name]?", "Living plant request", list("Yes", "No")) if(response == "Yes") harvest() return diff --git a/code/modules/library/lib_machines.dm b/code/modules/library/lib_machines.dm index 6b4beb13f6..5106de6613 100644 --- a/code/modules/library/lib_machines.dm +++ b/code/modules/library/lib_machines.dm @@ -404,11 +404,11 @@ var/choice = input("Are you certain you wish to upload this title to the Archive?") in list("Confirm", "Abort") if(choice == "Confirm") if(scanner.cache.unique) - alert(usr, "This book has been rejected from the database. Aborting!") + tgui_alert_async(usr, "This book has been rejected from the database. Aborting!") else establish_old_db_connection() if(!dbcon_old.IsConnected()) - alert(usr, "Connection to Archive has been severed. Aborting.") + tgui_alert_async(usr, "Connection to Archive has been severed. Aborting.") else /* var/sqltitle = dbcon.Quote(scanner.cache.name) @@ -425,14 +425,14 @@ to_chat(usr,query.ErrorMsg()) else log_game("[usr.name]/[usr.key] has uploaded the book titled [scanner.cache.name], [length(scanner.cache.dat)] signs") - alert(usr, "Upload Complete.") + tgui_alert_async(usr, "Upload Complete.") //VOREStation Edit End if(href_list["targetid"]) var/sqlid = sanitizeSQL(href_list["targetid"]) establish_old_db_connection() if(!dbcon_old.IsConnected()) - alert(usr, "Connection to Archive has been severed. Aborting.") + tgui_alert_async(usr, "Connection to Archive has been severed. Aborting.") if(bibledelay) for (var/mob/V in hearers(src)) V.show_message("[src]'s monitor flashes, \"Printer unavailable. Please allow a short time before attempting to print.\"") @@ -463,7 +463,7 @@ var/sqlid = sanitizeSQL(href_list["delid"]) establish_old_db_connection() if(!dbcon_old.IsConnected()) - alert(usr, "Connection to Archive has been severed. Aborting.") + tgui_alert_async(usr, "Connection to Archive has been severed. Aborting.") else var/DBQuery/query = dbcon_old.NewQuery("DELETE FROM library WHERE id=[sqlid]") query.Execute() diff --git a/code/modules/mob/dead/observer/free_vr.dm b/code/modules/mob/dead/observer/free_vr.dm index 9c5e28ed19..54df25412b 100644 --- a/code/modules/mob/dead/observer/free_vr.dm +++ b/code/modules/mob/dead/observer/free_vr.dm @@ -11,8 +11,8 @@ var/global/list/prevent_respawns = list() set category = "OOC" set desc = "Free your job slot, remove yourself from the manifest, and prevent respawning as this character for this round." - var/confirm = alert(usr, "This will free up your job slot, remove you from the manifest, and allow you to respawn as this character. You can rejoin as another \ - character if you like. Do this now?","Quit This Round","Quit Round","Cancel") + var/confirm = tgui_alert(usr, "This will free up your job slot, remove you from the manifest, and allow you to respawn as this character. You can rejoin as another \ + character if you like. Do this now?","Quit This Round",list("Quit Round","Cancel")) if(confirm != "Quit Round") return diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 7f30c7197a..9eabbdb276 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -215,13 +215,13 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp else var/response if(src.client && src.client.holder) - response = alert(src, "You have the ability to Admin-Ghost. The regular Ghost verb will announce your presence to dead chat. Both variants will allow you to return to your body using 'aghost'.\n\nWhat do you wish to do?", "Are you sure you want to ghost?", "Ghost", "Admin Ghost", "Stay in body") + response = tgui_alert(src, "You have the ability to Admin-Ghost. The regular Ghost verb will announce your presence to dead chat. Both variants will allow you to return to your body using 'aghost'.\n\nWhat do you wish to do?", "Are you sure you want to ghost?", "Ghost", list("Admin Ghost", "Stay in body")) if(response == "Admin Ghost") if(!src.client) return src.client.admin_ghost() else - response = alert(src, "Are you -sure- you want to ghost?\n(You are alive, or otherwise have the potential to become alive. Don't abuse ghost unless you are inside a cryopod or equivalent! You can't change your mind so choose wisely!)", "Are you sure you want to ghost?", "Ghost", "Stay in body") // VOREStation edit because we don't make players stay dead for 30 minutes. + response = tgui_alert(src, "Are you -sure- you want to ghost?\n(You are alive, or otherwise have the potential to become alive. Don't abuse ghost unless you are inside a cryopod or equivalent! You can't change your mind so choose wisely!)", "Are you sure you want to ghost?", list("Ghost", "Stay in body")) // VOREStation edit because we don't make players stay dead for 30 minutes. if(response != "Ghost") return resting = 1 @@ -320,7 +320,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp to_chat(src, "You have been banned from using this feature") return if(config.antag_hud_restricted && !has_enabled_antagHUD && !client.holder) - var/response = alert(src, "If you turn this on, you will not be able to take any part in the round.","Are you sure you want to turn this feature on?","Yes","No") + var/response = tgui_alert(src, "If you turn this on, you will not be able to take any part in the round.","Are you sure you want to turn this feature on?",list("Yes","No")) if(response == "No") return can_reenter_corpse = FALSE set_respawn_timer(-1) // Foreeeever @@ -332,7 +332,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp to_chat(src, "AntagHUD [antagHUD ? "Enabled" : "Disabled"]") /mob/observer/dead/proc/jumpable_areas() - var/list/areas = return_sorted_areas() + var/list/areas = return_areas() if(client?.holder) return areas @@ -352,7 +352,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp mobs -= key return mobs -/mob/observer/dead/proc/dead_tele(var/area/A in jumpable_areas()) +/mob/observer/dead/proc/dead_tele() set category = "Ghost" set name = "Teleport" set desc = "Teleport to a location" @@ -361,25 +361,25 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp to_chat(usr, "Not when you're not dead!") return - if(!A) - A = input(usr, "Select an area:", "Ghost Teleport") as null|anything in jumpable_areas() + + var/area/A = tgui_input_list(usr, "Select an area:", "Ghost Teleport", jumpable_areas()) if(!A) return usr.forceMove(pick(get_area_turfs(A))) usr.on_mob_jump() -/mob/observer/dead/verb/follow(input in jumpable_mobs()) +/mob/observer/dead/verb/follow() set category = "Ghost" set name = "Follow" // "Haunt" set desc = "Follow and haunt a mob." - if(!input) - input = input(usr, "Select a mob:", "Ghost Follow") as null|anything in jumpable_mobs() + var/list/possible_mobs = jumpable_mobs() + var/input = tgui_input_list(usr, "Select a mob:", "Ghost Follow", possible_mobs) if(!input) return - var/target = jumpable_mobs()[input] + var/target = possible_mobs[input] if(!target) return ManualFollow(target) @@ -524,7 +524,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp return (T && T.holy) && (is_manifest || (mind in cult.current_antagonists)) -/mob/observer/dead/verb/jumptomob(input in jumpable_mobs()) //Moves the ghost instead of just changing the ghosts's eye -Nodrak +/mob/observer/dead/verb/jumptomob() //Moves the ghost instead of just changing the ghosts's eye -Nodrak set category = "Ghost" set name = "Jump to Mob" set desc = "Teleport to a mob" @@ -533,12 +533,12 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp if(!istype(usr, /mob/observer/dead)) //Make sure they're an observer! return - if(!input) - input = input(usr, "Select a mob:", "Ghost Jump") as null|anything in jumpable_mobs() + var/list/possible_mobs = jumpable_mobs() + var/input = tgui_input_list(usr, "Select a mob:", "Ghost Jump", possible_mobs) if(!input) return - var/target = jumpable_mobs()[input] + var/target = possible_mobs[input] if (!target)//Make sure we actually have a target return else @@ -621,7 +621,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp to_chat(src, "You may only spawn again as a mouse more than [mouse_respawn_time] minutes after your death. You have [timedifference_text] left.") return - var/response = alert(src, "Are you -sure- you want to become a mouse?","Are you sure you want to squeek?","Squeek!","Nope!") + var/response = tgui_alert(src, "Are you -sure- you want to become a mouse?","Are you sure you want to squeek?",list("Squeek!","Nope!")) if(response != "Squeek!") return //Hit the wrong key...again. @@ -899,7 +899,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp var/finalized = "No" while(finalized == "No" && src.client) - choice = input(usr,"What would you like to use for your ghost sprite?") as null|anything in possible_ghost_sprites + choice = tgui_input_list(usr, "What would you like to use for your ghost sprite?", "Ghost Sprite", possible_ghost_sprites) if(!choice) return @@ -911,7 +911,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp previous_state = icon_state icon_state = possible_ghost_sprites[choice] - finalized = alert(src, "Look at your sprite. Is this what you wish to use?","Ghost Sprite","No","Yes") + finalized = tgui_alert(src, "Look at your sprite. Is this what you wish to use?","Ghost Sprite",list("No","Yes")) ghost_sprite = possible_ghost_sprites[choice] diff --git a/code/modules/mob/dead/observer/observer_vr.dm b/code/modules/mob/dead/observer/observer_vr.dm index 636db5e347..60a833671b 100644 --- a/code/modules/mob/dead/observer/observer_vr.dm +++ b/code/modules/mob/dead/observer/observer_vr.dm @@ -36,7 +36,7 @@ var/req_time = world.time nif.notify("Transient mindstate detected, analyzing...") sleep(15) //So if they are typing they get interrupted by sound and message, and don't type over the box - var/response = alert(H,"[src] ([src.key]) wants to join into your Soulcatcher.","Soulcatcher Request","Deny","Allow") + var/response = tgui_alert(H,"[src] ([src.key]) wants to join into your Soulcatcher.","Soulcatcher Request",list("Deny","Allow")) if(response == "Deny") to_chat(src,"[H] denied your request.") diff --git a/code/modules/mob/living/bot/mulebot.dm b/code/modules/mob/living/bot/mulebot.dm index ea4f8343ae..785718820d 100644 --- a/code/modules/mob/living/bot/mulebot.dm +++ b/code/modules/mob/living/bot/mulebot.dm @@ -118,7 +118,7 @@ if(beaconlist.len) new_dest = input("Select new home tag", "Mulebot [suffix ? "([suffix])" : ""]", null) in null|beaconlist else - alert(usr, "No destination beacons available.") + tgui_alert_async(usr, "No destination beacons available.") if(new_dest) home = get_turf(beaconlist[new_dest]) homeName = new_dest @@ -156,7 +156,7 @@ if(beaconlist.len) new_dest = input("Select new destination tag", "Mulebot [suffix ? "([suffix])" : ""]") in null|beaconlist else - alert(usr, "No destination beacons available.") + tgui_alert_async(usr, "No destination beacons available.") if(new_dest) resetTarget() target = get_turf(beaconlist[new_dest]) diff --git a/code/modules/mob/living/carbon/alien/diona/progression.dm b/code/modules/mob/living/carbon/alien/diona/progression.dm index 0c81f9a0da..1fd40b4311 100644 --- a/code/modules/mob/living/carbon/alien/diona/progression.dm +++ b/code/modules/mob/living/carbon/alien/diona/progression.dm @@ -1,7 +1,7 @@ /mob/living/carbon/alien/diona/confirm_evolution() if(!is_alien_whitelisted(src, GLOB.all_species[SPECIES_DIONA])) - alert(src, "You are currently not whitelisted to play as a full diona.") + tgui_alert(src, "You are currently not whitelisted to play as a full diona.") return null if(amount_grown < max_grown) diff --git a/code/modules/mob/living/carbon/alien/larva/progression.dm b/code/modules/mob/living/carbon/alien/larva/progression.dm index 09f1330466..159daae1ef 100644 --- a/code/modules/mob/living/carbon/alien/larva/progression.dm +++ b/code/modules/mob/living/carbon/alien/larva/progression.dm @@ -5,7 +5,7 @@ to_chat(src, "Hunters are strong and agile, able to hunt away from the hive and rapidly move through ventilation shafts. Hunters generate plasma slowly and have low reserves.") to_chat(src, "Sentinels are tasked with protecting the hive and are deadly up close and at a range. They are not as physically imposing nor fast as the hunters.") to_chat(src, "Drones are the working class, offering the largest plasma storage and generation. They are the only caste which may evolve again, turning into the dreaded alien queen.") - var/alien_caste = alert(src, "Please choose which alien caste you shall belong to.","Alien Choice","Hunter","Sentinel","Drone") + var/alien_caste = tgui_alert(src, "Please choose which alien caste you shall belong to.","Alien Choice",list("Hunter","Sentinel","Drone")) return alien_caste ? "Xenomorph [alien_caste]" : null /mob/living/carbon/alien/larva/show_evolution_blurb() diff --git a/code/modules/mob/living/carbon/brain/posibrain.dm b/code/modules/mob/living/carbon/brain/posibrain.dm index 1eb57add13..a1f12f97b5 100644 --- a/code/modules/mob/living/carbon/brain/posibrain.dm +++ b/code/modules/mob/living/carbon/brain/posibrain.dm @@ -35,9 +35,9 @@ /obj/item/device/mmi/digital/posibrain/proc/question(var/client/C) spawn(0) if(!C) return - var/response = alert(C, "Someone is requesting a personality for a positronic brain. Would you like to play as one?", "Positronic brain request", "Yes", "No", "Never for this round") + var/response = tgui_alert(C, "Someone is requesting a personality for a positronic brain. Would you like to play as one?", "Positronic brain request", list("Yes", "No", "Never for this round")) if(response == "Yes") - response = alert(C, "Are you sure you want to play as a positronic brain?", "Positronic brain request", "Yes", "No") + response = tgui_alert(C, "Are you sure you want to play as a positronic brain?", "Positronic brain request", list("Yes", "No")) if(!C || brainmob.key || 0 == searching) return //handle logouts that happen whilst the alert is waiting for a response, and responses issued after a brain has been located. if(response == "Yes") transfer_personality(C.mob) diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index d5ee2f52ce..c9d4dfad52 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -402,7 +402,7 @@ if(usr.sleeping) to_chat(usr, "You are already sleeping") return - if(alert(src,"You sure you want to sleep for a while?","Sleep","Yes","No") == "Yes") + if(tgui_alert(src,"You sure you want to sleep for a while?","Sleep",list("Yes","No")) == "Yes") usr.AdjustSleeping(20) /mob/living/carbon/Bump(atom/A) diff --git a/code/modules/mob/living/carbon/give.dm b/code/modules/mob/living/carbon/give.dm index 2833dad987..c361959976 100644 --- a/code/modules/mob/living/carbon/give.dm +++ b/code/modules/mob/living/carbon/give.dm @@ -15,7 +15,7 @@ to_chat(src, "You don't have anything in your hands to give to \the [target].") return - if(alert(target,"[src] wants to give you \a [I]. Will you accept it?","Item Offer","Yes","No") == "No") //VOREStation Edit - make yes on the left to be consistent with other dialogs + if(tgui_alert(target,"[src] wants to give you \a [I]. Will you accept it?","Item Offer",list("Yes","No")) == "No") //VOREStation Edit - make yes on the left to be consistent with other dialogs target.visible_message("\The [src] tried to hand \the [I] to \the [target], \ but \the [target] didn't want it.") return diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 1e4a40eedb..141835566a 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -779,7 +779,7 @@ if(new_style) f_style = new_style - var/new_gender = alert(usr, "Please select gender.", "Character Generation", "Male", "Female", "Neutral") + var/new_gender = tgui_alert("Please select gender.", "Character Generation", list("Male", "Female", "Neutral")) if (new_gender) if(new_gender == "Male") gender = MALE diff --git a/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_powers.dm b/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_powers.dm index 56dc3110e5..948d45d19c 100644 --- a/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_powers.dm +++ b/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_powers.dm @@ -31,7 +31,7 @@ if(refactory.get_stored_material(DEFAULT_WALL_MATERIAL) < PER_LIMB_STEEL_COST) to_chat(src,"You're missing that limb, and need to store at least [PER_LIMB_STEEL_COST] steel to regenerate it.") return - var/regen = alert(src,"That limb is missing, do you want to regenerate it in exchange for [PER_LIMB_STEEL_COST] steel?","Regenerate limb?","Yes","No") + var/regen = tgui_alert(src,"That limb is missing, do you want to regenerate it in exchange for [PER_LIMB_STEEL_COST] steel?","Regenerate limb?",list("Yes","No")) if(regen != "Yes") return if(!refactory.use_stored_material(DEFAULT_WALL_MATERIAL,PER_LIMB_STEEL_COST)) @@ -109,7 +109,7 @@ to_chat(src, "You are already refactoring!") return - var/swap_not_rebuild = alert(src,"Do you want to rebuild, or reshape?","Rebuild or Reshape","Reshape","Cancel","Rebuild") + var/swap_not_rebuild = tgui_alert(src,"Do you want to rebuild, or reshape?","Rebuild or Reshape",list("Reshape","Cancel","Rebuild")) if(swap_not_rebuild == "Cancel") return if(swap_not_rebuild == "Reshape") diff --git a/code/modules/mob/living/carbon/human/species/station/station_special_abilities_vr.dm b/code/modules/mob/living/carbon/human/species/station/station_special_abilities_vr.dm index e494245802..a75f42c9a4 100644 --- a/code/modules/mob/living/carbon/human/species/station/station_special_abilities_vr.dm +++ b/code/modules/mob/living/carbon/human/species/station/station_special_abilities_vr.dm @@ -4,7 +4,7 @@ // Sanity is mostly handled in chimera_regenerate() - var/confirm = alert(usr, "Are you sure you want to completely reconstruct your form? This process can take up to twenty minutes, depending on how hungry you are, and you will be unable to move.", "Confirm Regeneration", "Yes", "No") + var/confirm = tgui_alert(usr, "Are you sure you want to completely reconstruct your form? This process can take up to twenty minutes, depending on how hungry you are, and you will be unable to move.", "Confirm Regeneration", list("Yes", "No")) if(confirm == "Yes") chimera_regenerate() @@ -91,7 +91,7 @@ verbs -= /mob/living/carbon/human/proc/hatch return - var/confirm = alert(usr, "Are you sure you want to hatch right now? This will be very obvious to anyone in view.", "Confirm Regeneration", "Yes", "No") + var/confirm = tgui_alert(usr, "Are you sure you want to hatch right now? This will be very obvious to anyone in view.", "Confirm Regeneration", list("Yes", "No")) if(confirm == "Yes") //Dead when hatching @@ -721,13 +721,13 @@ if(!T_ext) //Picking something here is critical. return if(T_ext.vital) - if(alert(usr, "Are you sure you wish to severely damage their [T_ext]? It will likely kill [T]...","Shred Limb","Yes", "No") != "Yes") + if(tgui_alert(usr, "Are you sure you wish to severely damage their [T_ext]? It will likely kill [T]...","Shred Limb",list("Yes", "No")) != "Yes") return //If they reconsider, don't continue. //Any internal organ, if there are any var/obj/item/organ/internal/T_int = input(src,"Do you wish to severely damage an internal organ, as well? If not, click 'cancel'") as null|anything in T_ext.internal_organs if(T_int && T_int.vital) - if(alert(usr, "Are you sure you wish to severely damage their [T_int]? It will likely kill [T]...","Shred Limb","Yes", "No") != "Yes") + if(tgui_alert(usr, "Are you sure you wish to severely damage their [T_int]? It will likely kill [T]...","Shred Limb",list("Yes", "No")) != "Yes") return //If they reconsider, don't continue. //And a belly, if they want @@ -889,7 +889,7 @@ return if(choice) - finalized = alert(src, "Are you sure you want to weave [desired_result.title]? It will cost you [desired_result.cost] silk.","Confirmation","Yes","No") + finalized = tgui_alert(src, "Are you sure you want to weave [desired_result.title]? It will cost you [desired_result.cost] silk.","Confirmation",list("Yes","No")) if(!desired_result || !istype(desired_result)) return @@ -948,7 +948,7 @@ return if(choice) - finalized = alert(src, "Are you sure you want to weave [desired_result.title]? It will cost you [desired_result.cost] silk.","Confirmation","Yes","No") + finalized = tgui_alert(src, "Are you sure you want to weave [desired_result.title]? It will cost you [desired_result.cost] silk.","Confirmation",list("Yes","No")) if(!desired_result || !istype(desired_result)) return diff --git a/code/modules/mob/living/living_vr.dm b/code/modules/mob/living/living_vr.dm index ab5607d22b..04523d514e 100644 --- a/code/modules/mob/living/living_vr.dm +++ b/code/modules/mob/living/living_vr.dm @@ -9,14 +9,7 @@ set desc = "Customize the text which appears when you type- e.g. 'says', 'asks', 'exclaims'." if(src.client) - var/customsaylist[] = list( - "Say", - "Whisper", - "Ask (?)", - "Exclaim/Shout/Yell (!)", - "Cancel" - ) - var/sayselect = input("Which say-verb do you wish to customize?") as null|anything in customsaylist //we can't use alert() for this because there's too many terms + var/sayselect = tgui_alert(src, "Which say-verb do you wish to customize?", "Select Verb", list("Say","Whisper","Ask (?)","Exclaim/Shout/Yell (!)","Cancel")) if(sayselect == "Say") custom_say = sanitize(input(usr, "This word or phrase will appear instead of 'says': [src] says, \"Hi.\"", "Custom Say", null) as text) diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index b165f6c149..7eee24671f 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -382,7 +382,7 @@ var/list/ai_verbs_default = list( if(check_unable(AI_CHECK_WIRELESS)) return - var/confirm = alert(usr, "Are you sure you want to call the shuttle?", "Confirm Shuttle Call", "Yes", "No") + var/confirm = tgui_alert(usr, "Are you sure you want to call the shuttle?", "Confirm Shuttle Call", list("Yes", "No")) if(check_unable(AI_CHECK_WIRELESS)) return @@ -401,7 +401,7 @@ var/list/ai_verbs_default = list( if(check_unable(AI_CHECK_WIRELESS)) return - var/confirm = alert(usr, "Are you sure you want to recall the shuttle?", "Confirm Shuttle Recall", "Yes", "No") + var/confirm = tgui_alert(usr, "Are you sure you want to recall the shuttle?", "Confirm Shuttle Recall", list("Yes", "No")) if(check_unable(AI_CHECK_WIRELESS)) return @@ -597,7 +597,7 @@ var/list/ai_verbs_default = list( return var/input - var/choice = alert(usr, "Would you like to select a hologram based on a (visible) crew member, switch to unique avatar, or load your character from your character slot?","Hologram Selection","Crew Member","Unique","My Character") + var/choice = tgui_alert(usr, "Would you like to select a hologram based on a (visible) crew member, switch to unique avatar, or load your character from your character slot?","Hologram Selection",list("Crew Member","Unique","My Character")) switch(choice) if("Crew Member") //A seeable crew member (or a dog) @@ -611,7 +611,7 @@ var/list/ai_verbs_default = list( holo_icon = new_holo else - alert(usr, "No suitable records found. Aborting.") + tgui_alert_async(usr, "No suitable records found. Aborting.") if("My Character") //Loaded character slot if(!client || !client.prefs) return @@ -853,7 +853,7 @@ var/list/ai_verbs_default = list( A = D if(istype(A)) - switch(alert(src, "Do you want to open \the [A] for [target]?", "Doorknob_v2a.exe", "Yes", "No")) + switch(tgui_alert(src, "Do you want to open \the [A] for [target]?", "Doorknob_v2a.exe", list("Yes", "No"))) if("Yes") A.AIShiftClick() to_chat(src, "You open \the [A] for [target].") diff --git a/code/modules/mob/living/silicon/ai/latejoin.dm b/code/modules/mob/living/silicon/ai/latejoin.dm index 7fa82e8ae3..fc244d6742 100644 --- a/code/modules/mob/living/silicon/ai/latejoin.dm +++ b/code/modules/mob/living/silicon/ai/latejoin.dm @@ -20,8 +20,7 @@ var/global/list/empty_playable_ai_cores = list() return // Guard against misclicks, this isn't the sort of thing we want happening accidentally - if(alert(usr, "WARNING: This will immediately empty your core and ghost you, removing your character from the round permanently (similar to cryo and robotic storage). Are you entirely sure you want to do this?", - "Store Core", "No", "No", "Yes") != "Yes") + if(tgui_alert(usr, "WARNING: This will immediately empty your core and ghost you, removing your character from the round permanently (similar to cryo and robotic storage). Are you entirely sure you want to do this?", "Store Core", list("No", "Yes")) != "Yes") return // We warned you. diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm index 57e25d32d7..bd045a80b0 100644 --- a/code/modules/mob/living/silicon/pai/pai.dm +++ b/code/modules/mob/living/silicon/pai/pai.dm @@ -343,7 +343,7 @@ if(!choice) return icon_state = possible_chassis[choice] - finalized = alert(usr, "Look at your sprite. Is this what you wish to use?","Choose Chassis","No","Yes") + finalized = tgui_alert(usr, "Look at your sprite. Is this what you wish to use?","Choose Chassis",list("No","Yes")) chassis = possible_chassis[choice] verbs |= /mob/living/proc/hide @@ -458,7 +458,7 @@ var/obj/item/weapon/card/id/ID = W.GetID() if(ID) if (idaccessible == 1) - switch(alert(user, "Do you wish to add access to [src] or remove access from [src]?","Access Modify","Add Access","Remove Access", "Cancel")) + switch(tgui_alert(user, "Do you wish to add access to [src] or remove access from [src]?","Access Modify",list("Add Access","Remove Access", "Cancel"))) if("Add Access") idcard.access |= ID.access to_chat(user, "You add the access from the [W] to [src].") @@ -492,8 +492,7 @@ set desc = "Wipe your software. This is functionally equivalent to cryo or robotic storage, freeing up your job slot." // Make sure people don't kill themselves accidentally - if(alert(usr, "WARNING: This will immediately wipe your software and ghost you, removing your character from the round permanently (similar to cryo and robotic storage). Are you entirely sure you want to do this?", - "Wipe Software", "No", "No", "Yes") != "Yes") + if(tgui_alert(usr, "WARNING: This will immediately wipe your software and ghost you, removing your character from the round permanently (similar to cryo and robotic storage). Are you entirely sure you want to do this?", "Wipe Software", list("No", "Yes")) != "Yes") return close_up() diff --git a/code/modules/mob/living/silicon/pai/personality.dm b/code/modules/mob/living/silicon/pai/personality.dm index c4928878ce..73ae49dcb7 100644 --- a/code/modules/mob/living/silicon/pai/personality.dm +++ b/code/modules/mob/living/silicon/pai/personality.dm @@ -50,7 +50,7 @@ if (isnull(version) || version != 1) fdel(path) if (!silent) - alert(user, "Your savefile was incompatible with this version and was deleted.") + tgui_alert_async(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/recruit.dm b/code/modules/mob/living/silicon/pai/recruit.dm index ac9d5b4f27..13e1780a9e 100644 --- a/code/modules/mob/living/silicon/pai/recruit.dm +++ b/code/modules/mob/living/silicon/pai/recruit.dm @@ -365,7 +365,7 @@ var/datum/paiController/paiController // Global handler for pAI candidates if(!C) return asked.Add(C.key) asked[C.key] = world.time - var/response = alert(C, "[inquirer] is requesting a pAI personality. Would you like to play as a personal AI?", "pAI Request", "Yes", "No", "Never for this round") + var/response = tgui_alert(C, "[inquirer] is requesting a pAI personality. Would you like to play as a personal AI?", "pAI Request", list("Yes", "No", "Never for this round")) if(!C) return //handle logouts that happen whilst the alert is waiting for a response. if(response == "Yes") recruitWindow(C.mob) diff --git a/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_vr.dm b/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_vr.dm index 81cc9f3dce..8d5fcee0d1 100644 --- a/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_vr.dm +++ b/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_vr.dm @@ -321,7 +321,7 @@ return if(href_list["clean"]) if(!cleaning) - var/confirm = alert(usr, "You are about to engage self-cleaning mode. This will fill your [src] with caustic enzymes to remove any objects or biomatter, and convert them into energy. Are you sure?", "Confirmation", "Self-Clean", "Cancel") + var/confirm = tgui_alert(usr, "You are about to engage self-cleaning mode. This will fill your [src] with caustic enzymes to remove any objects or biomatter, and convert them into energy. Are you sure?", "Confirmation", list("Self-Clean", "Cancel")) if(confirm == "Self-Clean") if(cleaning) return diff --git a/code/modules/mob/living/silicon/robot/drone/drone.dm b/code/modules/mob/living/silicon/robot/drone/drone.dm index 802da6788f..afa61a5317 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone.dm @@ -314,7 +314,7 @@ var/list/mob_hat_cache = list() /mob/living/silicon/robot/drone/proc/question(var/client/C) spawn(0) if(!C || jobban_isbanned(C,"Cyborg")) return - var/response = alert(C, "Someone is attempting to reboot a maintenance drone. Would you like to play as one?", "Maintenance drone reboot", "Yes", "No", "Never for this round") + var/response = tgui_alert(C, "Someone is attempting to reboot a maintenance drone. Would you like to play as one?", "Maintenance drone reboot", list("Yes", "No", "Never for this round")) if(!C || ckey) return if(response == "Yes") diff --git a/code/modules/mob/living/silicon/robot/robot_items.dm b/code/modules/mob/living/silicon/robot/robot_items.dm index cbf2caf765..30fc9f1048 100644 --- a/code/modules/mob/living/silicon/robot/robot_items.dm +++ b/code/modules/mob/living/silicon/robot/robot_items.dm @@ -17,13 +17,13 @@ files = new /datum/research/techonly(src) //Setup the research data holder. /obj/item/weapon/portable_destructive_analyzer/attack_self(user as mob) - var/response = alert(user, "Analyzing the item inside will *DESTROY* the item for good.\n\ + var/response = tgui_alert(user, "Analyzing the item inside will *DESTROY* the item for good.\n\ Syncing to the research server will send the data that is stored inside to research.\n\ Ejecting will place the loaded item onto the floor.", - "What would you like to do?", "Analyze", "Sync", "Eject") + "What would you like to do?", list("Analyze", "Sync", "Eject")) if(response == "Analyze") if(loaded_item) - var/confirm = alert(user, "This will destroy the item inside forever. Are you sure?","Confirm Analyze","Yes","No") + var/confirm = tgui_alert(user, "This will destroy the item inside forever. Are you sure?","Confirm Analyze",list("Yes","No")) if(confirm == "Yes" && !QDELETED(loaded_item)) //This is pretty copypasta-y to_chat(user, "You activate the analyzer's microlaser, analyzing \the [loaded_item] and breaking it down.") flick("portable_analyzer_scan", src) diff --git a/code/modules/mob/living/silicon/robot/robot_vr.dm b/code/modules/mob/living/silicon/robot/robot_vr.dm index d894ad3e1c..dbcd8baa94 100644 --- a/code/modules/mob/living/silicon/robot/robot_vr.dm +++ b/code/modules/mob/living/silicon/robot/robot_vr.dm @@ -74,7 +74,7 @@ set desc = "Select your resting pose." sitting = FALSE bellyup = FALSE - var/choice = alert(src, "Select resting pose", "", "Resting", "Sitting", "Belly up") + var/choice = tgui_alert(src, "Select resting pose", "Resting Pose", list("Resting", "Sitting", "Belly up")) switch(choice) if("Resting") return 0 diff --git a/code/modules/mob/living/silicon/robot/subtypes/thinktank/thinktank_interactions.dm b/code/modules/mob/living/silicon/robot/subtypes/thinktank/thinktank_interactions.dm index 0c998b7b54..f9a78b4f12 100644 --- a/code/modules/mob/living/silicon/robot/subtypes/thinktank/thinktank_interactions.dm +++ b/code/modules/mob/living/silicon/robot/subtypes/thinktank/thinktank_interactions.dm @@ -37,7 +37,7 @@ if(client || key || stat == DEAD || !ticker || !ticker.mode) return ..() - var/confirm = alert(usr, "Do you wish to take control of \the [src]?", "Platform Control", "No", "Yes") + var/confirm = tgui_alert(usr, "Do you wish to take control of \the [src]?", "Platform Control", list("No", "Yes")) if(confirm != "Yes" || QDELETED(src) || client || key || stat == DEAD || !ticker || !ticker.mode) return ..() diff --git a/code/modules/mob/login.dm b/code/modules/mob/login.dm index 58e47f15db..398c748ccc 100644 --- a/code/modules/mob/login.dm +++ b/code/modules/mob/login.dm @@ -15,7 +15,7 @@ if(matches) matches += " and " matches += "ID ([client.computer_id])" if(!config.disable_cid_warn_popup) - spawn() alert(usr, "You appear to have logged in with another key this round, which is not permitted. Please contact an administrator if you believe this message to be in error.") + tgui_alert_async(usr, "You appear to have logged in with another key this round, which is not permitted. Please contact an administrator if you believe this message to be in error.") if(matches) if(M.client) message_admins("Notice: [key_name_admin(src)] has the same [matches] as [key_name_admin(M)].", 1) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index dba586b741..96c974c5ec 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -367,7 +367,7 @@ // Final chance to abort "respawning" if(mind && timeofdeath) // They had spawned before - var/choice = alert(usr, "Returning to the menu will prevent your character from being revived in-round. Are you sure?", "Confirmation", "No, wait", "Yes, leave") + var/choice = tgui_alert(usr, "Returning to the menu will prevent your character from being revived in-round. Are you sure?", "Confirmation", list("No, wait", "Yes, leave")) if(choice == "No, wait") return diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index b664a0c871..67eab03afa 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -134,7 +134,7 @@ if(href_list["observe"]) var/alert_time = ticker?.current_state <= GAME_STATE_SETTING_UP ? 1 : round(config.respawn_time/10/60) - if(alert(src,"Are you sure you wish to observe? You will have to wait up to [alert_time] minute\s before being able to spawn into the game!","Player Setup","Yes","No") == "Yes") + if(tgui_alert(src,"Are you sure you wish to observe? You will have to wait up to [alert_time] minute\s before being able to spawn into the game!","Player Setup",list("Yes","No")) == "Yes") if(!client) return 1 //Make a new mannequin quickly, and allow the observer to take the appearance @@ -187,7 +187,7 @@ if(client.prefs.species != "Human" && !check_rights(R_ADMIN, 0)) //VORESTATION EDITS: THE COMMENTED OUT AREAS FROM LINE 154 TO 178 if (config.usealienwhitelist) if(!is_alien_whitelisted(src, client.prefs.species)) - alert(src, "You are currently not whitelisted to Play [client.prefs.species].") + tgui_alert(src, "You are currently not whitelisted to Play [client.prefs.species].") return 0 */ LateChoices() @@ -214,13 +214,13 @@ return if(!is_alien_whitelisted(src, GLOB.all_species[client.prefs.species])) - alert(src, "You are currently not whitelisted to play [client.prefs.species].") + tgui_alert(src, "You are currently not whitelisted to play [client.prefs.species].") return 0 var/datum/species/S = GLOB.all_species[client.prefs.species] if(!(S.spawn_flags & SPECIES_CAN_JOIN)) - alert(src,"Your current species, [client.prefs.species], is not available for play on the station.") + tgui_alert_async(src,"Your current species, [client.prefs.species], is not available for play on the station.") return 0 AttemptLateSpawn(href_list["SelectedJob"],client.prefs.spawnpoint) @@ -403,7 +403,7 @@ to_chat(usr, "There is an administrative lock on entering the game!") return 0 if(!IsJobAvailable(rank)) - alert(src,"[rank] is not available. Please try another.") + tgui_alert_async(src,"[rank] is not available. Please try another.") return 0 if(!spawn_checks_vr(rank)) return 0 // VOREStation Insert if(!client) diff --git a/code/modules/mob/new_player/new_player_vr.dm b/code/modules/mob/new_player/new_player_vr.dm index a317e9a0d9..ca96cf2407 100644 --- a/code/modules/mob/new_player/new_player_vr.dm +++ b/code/modules/mob/new_player/new_player_vr.dm @@ -64,6 +64,5 @@ //Final popup notice if (!pass) - spawn() - alert(src,"There were problems with spawning your character. Check your message log for details.","Error","OK") + tgui_alert_async(src,"There were problems with spawning your character. Check your message log for details.","Error") return pass diff --git a/code/modules/modular_computers/computers/modular_computer/interaction.dm b/code/modules/modular_computers/computers/modular_computer/interaction.dm index 24c02c1add..1c3daa2092 100644 --- a/code/modules/modular_computers/computers/modular_computer/interaction.dm +++ b/code/modules/modular_computers/computers/modular_computer/interaction.dm @@ -101,7 +101,7 @@ if(enabled) tgui_interact(user) else if(check_rights(R_ADMIN|R_EVENT, 0, 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/modular_computers/file_system/programs/generic/file_browser.dm b/code/modules/modular_computers/file_system/programs/generic/file_browser.dm index 784b6ac039..b3827e507c 100644 --- a/code/modules/modular_computers/file_system/programs/generic/file_browser.dm +++ b/code/modules/modular_computers/file_system/programs/generic/file_browser.dm @@ -57,7 +57,7 @@ var/datum/computer_file/data/F = HDD.find_file_by_name(open_file) if(!F || !istype(F)) return - if(F.do_not_edit && (alert(usr, "WARNING: This file is not compatible with editor. Editing it may result in permanently corrupted formatting or damaged data consistency. Edit anyway?", "Incompatible File", "No", "Yes") == "No")) + if(F.do_not_edit && (tgui_alert(usr, "WARNING: This file is not compatible with editor. Editing it may result in permanently corrupted formatting or damaged data consistency. Edit anyway?", "Incompatible File", list("No", "Yes")) == "No")) return var/oldtext = html_decode(F.stored_data) diff --git a/code/modules/modular_computers/file_system/programs/generic/wordprocessor.dm b/code/modules/modular_computers/file_system/programs/generic/wordprocessor.dm index 988e7b5a84..b22be72d1e 100644 --- a/code/modules/modular_computers/file_system/programs/generic/wordprocessor.dm +++ b/code/modules/modular_computers/file_system/programs/generic/wordprocessor.dm @@ -118,7 +118,7 @@ if("PRG_openfile") if(is_edited) - if(alert(usr, "Would you like to save your changes first?","Save Changes","Yes","No") == "Yes") + if(tgui_alert(usr, "Would you like to save your changes first?","Save Changes",list("Yes","No")) == "Yes") save_file(open_file) browsing = 0 if(!open_file(params["PRG_openfile"])) @@ -127,7 +127,7 @@ if("PRG_newfile") if(is_edited) - if(alert(usr, "Would you like to save your changes first?","Save Changes","Yes","No") == "Yes") + if(tgui_alert(usr, "Would you like to save your changes first?","Save Changes",list("Yes","No")) == "Yes") save_file(open_file) var/newname = sanitize(input(usr, "Enter file name:", "New File") as text|null) diff --git a/code/modules/modular_computers/file_system/programs/research/ntmonitor.dm b/code/modules/modular_computers/file_system/programs/research/ntmonitor.dm index 0ce6dd5c49..d1aa9b7833 100644 --- a/code/modules/modular_computers/file_system/programs/research/ntmonitor.dm +++ b/code/modules/modular_computers/file_system/programs/research/ntmonitor.dm @@ -59,7 +59,7 @@ ntnet_global.setting_disabled = FALSE return TRUE - var/response = alert(usr, "Really disable NTNet wireless? If your computer is connected wirelessly you won't be able to turn it back on! This will affect all connected wireless devices.", "NTNet shutdown", "Yes", "No") + var/response = tgui_alert(usr, "Really disable NTNet wireless? If your computer is connected wirelessly you won't be able to turn it back on! This will affect all connected wireless devices.", "NTNet shutdown", list("Yes", "No")) if(response == "Yes" && tgui_status(usr, state) == STATUS_INTERACTIVE) ntnet_global.setting_disabled = TRUE return TRUE diff --git a/code/modules/multiz/ladders.dm b/code/modules/multiz/ladders.dm index b1f5b08f6d..8c726a8ed3 100644 --- a/code/modules/multiz/ladders.dm +++ b/code/modules/multiz/ladders.dm @@ -64,7 +64,7 @@ to_chat(M, "\The [src] is incomplete and can't be climbed.") return if(target_down && target_up) - var/direction = alert(M,"Do you want to go up or down?", "Ladder", "Up", "Down", "Cancel") + var/direction = tgui_alert(M,"Do you want to go up or down?", "Ladder", list("Up", "Down", "Cancel")) if(direction == "Cancel") return diff --git a/code/modules/nifsoft/software/13_soulcatcher.dm b/code/modules/nifsoft/software/13_soulcatcher.dm index adaa711296..a182ee1961 100644 --- a/code/modules/nifsoft/software/13_soulcatcher.dm +++ b/code/modules/nifsoft/software/13_soulcatcher.dm @@ -144,7 +144,7 @@ if("Erase Contents") var/mob/living/carbon/brain/caught_soul/brainpick = input(nif.human,"Select a mind to delete:","Erase Mind") as null|anything in brainmobs - var/warning = alert(nif.human,"Are you SURE you want to erase \"[brainpick]\"?","Erase Mind","CANCEL","DELETE","CANCEL") + var/warning = tgui_alert(nif.human,"Are you SURE you want to erase \"[brainpick]\"?","Erase Mind",list("CANCEL","DELETE")) if(warning == "DELETE") brainmobs -= brainpick qdel(brainpick) diff --git a/code/modules/overmap/bluespace_rift_vr.dm b/code/modules/overmap/bluespace_rift_vr.dm index 198ccc2277..cb95936804 100644 --- a/code/modules/overmap/bluespace_rift_vr.dm +++ b/code/modules/overmap/bluespace_rift_vr.dm @@ -34,7 +34,7 @@ /obj/effect/overmap/bluespace_rift/attack_ghost(var/mob/observer/dead/user) if(!partner && user?.client?.holder) - var/response = alert(user, "You appear to be staff. This rift has no exit point. If you want to make one, move to where you want it to go, and click 'Make Here', otherwise click 'Cancel'","Rift Exit","Cancel","Make Here") + var/response = tgui_alert(user, "You appear to be staff. This rift has no exit point. If you want to make one, move to where you want it to go, and click 'Make Here', otherwise click 'Cancel'",list("Rift Exit","Cancel","Make Here")) if(response == "Make Here") new type(get_turf(user), src) else if(partner) diff --git a/code/modules/paperwork/adminpaper.dm b/code/modules/paperwork/adminpaper.dm index b10b88f410..378dc483c9 100644 --- a/code/modules/paperwork/adminpaper.dm +++ b/code/modules/paperwork/adminpaper.dm @@ -40,7 +40,7 @@ var/originhash = md5("[origin]") var/timehash = copytext(md5("[world.time]"),1,10) var/text = null - var/logo = alert(usr, "Do you want the header of your fax to have a NanoTrasen, SolGov, or Trader logo?","Fax Logo","NanoTrasen","SolGov","Trader") //VOREStation Add - Trader + var/logo = tgui_alert(usr, "Do you want the header of your fax to have a NanoTrasen, SolGov, or Trader logo?","Fax Logo",list("NanoTrasen","SolGov","Trader")) //VOREStation Add - Trader if(logo == "SolGov") logo = "sglogo.png" //VOREStation Edit/Add @@ -118,7 +118,7 @@ return if(href_list["confirm"]) - switch(alert(usr, "Are you sure you want to send the fax as is?","Send Fax", "Yes", "No")) + switch(tgui_alert(usr, "Are you sure you want to send the fax as is?","Send Fax", list("Yes", "No"))) if("Yes") if(headerOn) info = header + info diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index 59f2825b72..fe863752be 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -433,7 +433,7 @@ var/obj/item/i = usr.get_active_hand() // Check to see if he still got that darn pen, also check if he's using a crayon or pen. var/iscrayon = 0 if(!istype(i, /obj/item/weapon/pen)) - alert(usr, "You aren't holding a pen anymore! If you want to keep your work, grab one.", "", "Okay") + tgui_alert(usr, "You aren't holding a pen anymore! If you want to keep your work, grab one.", "No Pen!") // Should remain tgui_alert() (blocking) i = usr.get_active_hand() if(!istype(i, /obj/item/weapon/pen)) diff --git a/code/modules/paperwork/paperbin.dm b/code/modules/paperwork/paperbin.dm index 2a91257966..1cae6883c4 100644 --- a/code/modules/paperwork/paperbin.dm +++ b/code/modules/paperwork/paperbin.dm @@ -49,7 +49,7 @@ return var/response = "" if(!papers.len > 0) - response = alert(user, "Do you take regular paper, or Carbon copy paper?", "Paper type request", "Regular", "Carbon-Copy", "Cancel") + response = tgui_alert(user, "Do you take regular paper, or Carbon copy paper?", "Paper type request", list("Regular", "Carbon-Copy", "Cancel")) if (response != "Regular" && response != "Carbon-Copy") add_fingerprint(user) return diff --git a/code/modules/random_map/drop/droppod.dm b/code/modules/random_map/drop/droppod.dm index cf465154a5..ad2d966c0e 100644 --- a/code/modules/random_map/drop/droppod.dm +++ b/code/modules/random_map/drop/droppod.dm @@ -162,7 +162,7 @@ if(!spawn_path) return - if(alert(usr, "Do you wish the mob to have a player?","Assign Player?","No","Yes") == "No") + if(tgui_alert(usr, "Do you wish the mob to have a player?","Assign Player?",list("No","Yes")) == "No") var/spawn_count = input("How many mobs do you wish the pod to contain?", "Drop Pod Selection", null) as num if(spawn_count <= 0) return @@ -196,7 +196,7 @@ var/datum/antagonist/A = all_antag_types[antag_type] A.equip(spawned_mob) - if(alert(usr, "Are you SURE you wish to deploy this drop pod? It will cause a sizable explosion and gib anyone underneath it.","Danger!","No","Yes") == "No") + if(tgui_alert(usr, "Are you SURE you wish to deploy this drop pod? It will cause a sizable explosion and gib anyone underneath it.","Danger!",list("No","Yes")) == "No") if(spawned_mob) qdel(spawned_mob) if(spawned_mobs.len) diff --git a/code/modules/random_map/drop/supply.dm b/code/modules/random_map/drop/supply.dm index 666b419656..4ead81388f 100644 --- a/code/modules/random_map/drop/supply.dm +++ b/code/modules/random_map/drop/supply.dm @@ -41,25 +41,25 @@ var/chosen_loot_type var/list/chosen_loot_types - var/choice = alert(usr, "Do you wish to supply a custom loot list?","Supply Drop","No","Yes") + var/choice = tgui_alert(usr, "Do you wish to supply a custom loot list?","Supply Drop",list("No","Yes")) if(choice == "Yes") chosen_loot_types = list() - choice = alert(usr, "Do you wish to add mobs?","Supply Drop","No","Yes") + choice = tgui_alert(usr, "Do you wish to add mobs?","Supply Drop",list("No","Yes")) if(choice == "Yes") while(1) var/adding_loot_type = input("Select a new loot path. Cancel to finish.", "Loot Selection", null) as null|anything in typesof(/mob/living) if(!adding_loot_type) break chosen_loot_types |= adding_loot_type - choice = alert(usr, "Do you wish to add structures or machines?","Supply Drop","No","Yes") + choice = tgui_alert(usr, "Do you wish to add structures or machines?","Supply Drop",list("No","Yes")) if(choice == "Yes") while(1) var/adding_loot_type = input("Select a new loot path. Cancel to finish.", "Loot Selection", null) as null|anything in typesof(/obj) - typesof(/obj/item) if(!adding_loot_type) break chosen_loot_types |= adding_loot_type - choice = alert(usr, "Do you wish to add any non-weapon items?","Supply Drop","No","Yes") + choice = tgui_alert(usr, "Do you wish to add any non-weapon items?","Supply Drop",list("No","Yes")) if(choice == "Yes") while(1) var/adding_loot_type = input("Select a new loot path. Cancel to finish.", "Loot Selection", null) as null|anything in typesof(/obj/item) - typesof(/obj/item/weapon) @@ -67,14 +67,14 @@ break chosen_loot_types |= adding_loot_type - choice = alert(usr, "Do you wish to add weapons?","Supply Drop","No","Yes") + choice = tgui_alert(usr, "Do you wish to add weapons?","Supply Drop",list("No","Yes")) if(choice == "Yes") while(1) var/adding_loot_type = input("Select a new loot path. Cancel to finish.", "Loot Selection", null) as null|anything in typesof(/obj/item/weapon) if(!adding_loot_type) break chosen_loot_types |= adding_loot_type - choice = alert(usr, "Do you wish to add ABSOLUTELY ANYTHING ELSE? (you really shouldn't need to)","Supply Drop","No","Yes") + choice = tgui_alert(usr, "Do you wish to add ABSOLUTELY ANYTHING ELSE? (you really shouldn't need to)","Supply Drop",list("No","Yes")) if(choice == "Yes") while(1) var/adding_loot_type = input("Select a new loot path. Cancel to finish.", "Loot Selection", null) as null|anything in typesof(/atom/movable) @@ -82,11 +82,11 @@ break chosen_loot_types |= adding_loot_type else - choice = alert(usr, "Do you wish to specify a loot type?","Supply Drop","No","Yes") + choice = tgui_alert(usr, "Do you wish to specify a loot type?","Supply Drop",list("No","Yes")) if(choice == "Yes") chosen_loot_type = input("Select a loot type.", "Loot Selection", null) as null|anything in supply_drop_random_loot_types() - choice = alert(usr, "Are you SURE you wish to deploy this supply drop? It will cause a sizable explosion and gib anyone underneath it.","Supply Drop","No","Yes") + choice = tgui_alert(usr, "Are you SURE you wish to deploy this supply drop? It will cause a sizable explosion and gib anyone underneath it.","Supply Drop",list("No","Yes")) if(choice == "No") return log_admin("[key_name(usr)] dropped supplies at ([usr.x],[usr.y],[usr.z])") diff --git a/code/modules/random_map/random_map_verbs.dm b/code/modules/random_map/random_map_verbs.dm index db6a2d153b..ff8ba91cdc 100644 --- a/code/modules/random_map/random_map_verbs.dm +++ b/code/modules/random_map/random_map_verbs.dm @@ -41,7 +41,7 @@ return var/datum/random_map/M - if(alert(usr, "Do you wish to customise the map?","Customize","Yes","No") == "Yes") + if(tgui_alert(usr, "Do you wish to customise the map?","Customize",list("Yes","No")) == "Yes") var/seed = input("Seed? (blank for none)") as text|null var/lx = input("X-size? (blank for default)") as num|null var/ly = input("Y-size? (blank for default)") as num|null diff --git a/code/modules/reagents/hoses/connector.dm b/code/modules/reagents/hoses/connector.dm index a2d941cca8..ce4f5bbec3 100644 --- a/code/modules/reagents/hoses/connector.dm +++ b/code/modules/reagents/hoses/connector.dm @@ -13,7 +13,7 @@ if(LAZYLEN(available_sockets)) if(available_sockets.len == 1) var/obj/item/hose_connector/AC = available_sockets[1] - var/choice = alert(usr, "Are you sure you want to disconnect [AC]?", "Confirm", "Yes", "No") + var/choice = tgui_alert(usr, "Are you sure you want to disconnect [AC]?", "Confirm", list("Yes", "No")) if(choice == "Yes" && Adjacent(user)) visible_message("[user] disconnects \the hose from \the [src].") @@ -26,7 +26,7 @@ if(choice) var/obj/item/hose_connector/AC = choice - var/confirm = alert(usr, "Are you sure you want to disconnect [AC]?", "Confirm", "Yes", "No") + var/confirm = tgui_alert(usr, "Are you sure you want to disconnect [AC]?", "Confirm", list("Yes", "No")) if(confirm == "Yes" && Adjacent(user)) visible_message("[user] disconnects \the hose from \the [src].") diff --git a/code/modules/reagents/reagent_containers/spray.dm b/code/modules/reagents/reagent_containers/spray.dm index 24c39dce43..28585ff5fe 100644 --- a/code/modules/reagents/reagent_containers/spray.dm +++ b/code/modules/reagents/reagent_containers/spray.dm @@ -88,7 +88,7 @@ set category = "Object" set src in usr - 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)) to_chat(usr, "You empty \the [src] onto the floor.") diff --git a/code/modules/recycling/sortingmachinery.dm b/code/modules/recycling/sortingmachinery.dm index 36c71882fb..84e140ee4b 100755 --- a/code/modules/recycling/sortingmachinery.dm +++ b/code/modules/recycling/sortingmachinery.dm @@ -40,7 +40,7 @@ to_chat(user, "You need to set a destination first!") else if(istype(W, /obj/item/weapon/pen)) - switch(alert(usr, "What would you like to alter?","Select Alteration","Title","Description", "Cancel")) + switch(tgui_alert(usr, "What would you like to alter?","Select Alteration",list("Title","Description","Cancel"))) if("Title") var/str = sanitizeSafe(input(usr,"Label text?","Set label",""), MAX_NAME_LEN) if(!str || !length(str)) @@ -151,7 +151,7 @@ to_chat(user, "You need to set a destination first!") else if(istype(W, /obj/item/weapon/pen)) - switch(alert(usr, "What would you like to alter?","Select Alteration","Title","Description", "Cancel")) + switch(tgui_alert(usr, "What would you like to alter?","Select Alteration",list("Title","Description","Cancel"))) if("Title") var/str = sanitizeSafe(input(usr,"Label text?","Set label",""), MAX_NAME_LEN) if(!str || !length(str)) diff --git a/code/modules/research/rdconsole_tgui.dm b/code/modules/research/rdconsole_tgui.dm index e5b2a05bb4..792e5443b9 100644 --- a/code/modules/research/rdconsole_tgui.dm +++ b/code/modules/research/rdconsole_tgui.dm @@ -410,7 +410,7 @@ to_chat(usr, "The destructive analyzer is busy at the moment.") return - if(alert(usr, "Proceeding will destroy loaded item. Continue?", "Destructive analyzer confirmation", "Yes", "No") == "No" || !linked_destroy) + if(tgui_alert(usr, "Proceeding will destroy loaded item. Continue?", "Destructive analyzer confirmation", list("Yes", "No")) == "No" || !linked_destroy) return linked_destroy.busy = 1 busy_msg = "Processing and Updating Database..." @@ -605,7 +605,7 @@ if("reset") //Reset the R&D console's database. griefProtection() - var/choice = alert(usr, "R&D Console Database Reset", "Are you sure you want to reset the R&D console's database? Data lost cannot be recovered.", "Continue", "Cancel") + var/choice = tgui_alert(usr, "R&D Console Database Reset", "Are you sure you want to reset the R&D console's database? Data lost cannot be recovered.", list("Continue", "Cancel")) if(choice == "Continue") busy_msg = "Updating Database..." qdel(files) diff --git a/code/modules/research/server.dm b/code/modules/research/server.dm index b0101e846d..2c40713acd 100644 --- a/code/modules/research/server.dm +++ b/code/modules/research/server.dm @@ -248,7 +248,7 @@ var/obj/machinery/r_n_d/server/target = locate(params["server"]) if(!istype(target)) return FALSE - var/choice = alert(usr, "Technology Data Rest", "Are you sure you want to reset this technology to its default data? Data lost cannot be recovered.", "Continue", "Cancel") + var/choice = tgui_alert(usr, "Technology Data Rest", "Are you sure you want to reset this technology to its default data? Data lost cannot be recovered.", list("Continue", "Cancel")) if(choice == "Continue") for(var/datum/tech/T in target.files.known_tech) if(T.id == params["tech"]) @@ -261,7 +261,7 @@ var/obj/machinery/r_n_d/server/target = locate(params["server"]) if(!istype(target)) return FALSE - var/choice = alert(usr, "Design Data Deletion", "Are you sure you want to delete this design? If you still have the prerequisites for the design, it'll reset to its base reliability. Data lost cannot be recovered.", "Continue", "Cancel") + var/choice = tgui_alert(usr, "Design Data Deletion", "Are you sure you want to delete this design? If you still have the prerequisites for the design, it'll reset to its base reliability. Data lost cannot be recovered.", list("Continue", "Cancel")) if(choice == "Continue") for(var/datum/design/D in target.files.known_designs) if(D.id == params["design"]) diff --git a/code/modules/resleeving/computers.dm b/code/modules/resleeving/computers.dm index be2a694780..d8c8b56a5e 100644 --- a/code/modules/resleeving/computers.dm +++ b/code/modules/resleeving/computers.dm @@ -404,7 +404,7 @@ //Body to sleeve into, but mind is in another living body. if(active_mr.mind_ref.current && active_mr.mind_ref.current.stat < DEAD) //Mind is in a body already that's alive - var/answer = alert(active_mr.mind_ref.current,"Someone is attempting to restore a backup of your mind. Do you want to abandon this body, and move there? You MAY suffer memory loss! (Same rules as CMD apply)","Resleeving","No","Yes") + var/answer = tgui_alert(active_mr.mind_ref.current,"Someone is attempting to restore a backup of your mind. Do you want to abandon this body, and move there? You MAY suffer memory loss! (Same rules as CMD apply)","Resleeving",list("No","Yes")) //They declined to be moved. if(answer == "No") diff --git a/code/modules/resleeving/infomorph.dm b/code/modules/resleeving/infomorph.dm index c149dc7805..ee1edfd8da 100644 --- a/code/modules/resleeving/infomorph.dm +++ b/code/modules/resleeving/infomorph.dm @@ -367,7 +367,7 @@ var/list/infomorph_emotions = list( var/obj/item/weapon/card/id/ID = W.GetID() if(ID) if (idaccessible == 1) - switch(alert(user, "Do you wish to add access to [src] or remove access from [src]?","Modify Access","Add Access","Remove Access", "Cancel")) + switch(tgui_alert(user, "Do you wish to add access to [src] or remove access from [src]?","Modify Access",list("Add Access","Remove Access","Cancel"))) if("Add Access") idcard.access |= ID.access to_chat(user, "You add the access from the [W] to [src].") @@ -402,8 +402,7 @@ var/list/infomorph_emotions = list( set desc = "Wipe yourself from your hardware. This is functionally equivalent to cryo or robotic storage, freeing up your job slot." // Make sure people don't kill themselves accidentally - if(alert(usr, "WARNING: This will immediately remove you from the round, and remove your mind backups from storage, similar to cryo. Are you entirely sure you want to do this?", - "Suspend Self", "No", "No", "Yes") != "Yes") + if(tgui_alert(usr, "WARNING: This will immediately remove you from the round, and remove your mind backups from storage, similar to cryo. Are you entirely sure you want to do this?", "Suspend Self", list("No", "Yes")) != "Yes") return close_up() diff --git a/code/modules/shieldgen/shield_generator.dm b/code/modules/shieldgen/shield_generator.dm index abe6c6efbf..37275899b8 100644 --- a/code/modules/shieldgen/shield_generator.dm +++ b/code/modules/shieldgen/shield_generator.dm @@ -458,7 +458,7 @@ if("begin_shutdown") if(running < SHIELD_RUNNING) // Discharging or off return - var/alert = alert(usr, "Are you sure you wish to do this? It will drain the power inside the internal storage rapidly.", "Are you sure?", "Yes", "No") + var/alert = tgui_alert(usr, "Are you sure you wish to do this? It will drain the power inside the internal storage rapidly.", "Are you sure?", list("Yes", "No")) if(tgui_status(usr, state) != STATUS_INTERACTIVE) return if(running < SHIELD_RUNNING) diff --git a/code/modules/shuttles/shuttles_web.dm b/code/modules/shuttles/shuttles_web.dm index 6eca24d7c6..f871f49bdd 100644 --- a/code/modules/shuttles/shuttles_web.dm +++ b/code/modules/shuttles/shuttles_web.dm @@ -375,11 +375,11 @@ if(MS.skip_docking_checks() || MS.check_undocked()) return 1 - var/choice = alert(usr, "The shuttle is currently docked! Please undock before continuing.","Error","Cancel","Force Launch") + var/choice = tgui_alert(usr, "The shuttle is currently docked! Please undock before continuing.","Error",list("Cancel","Force Launch")) if(choice == "Cancel") return 0 - choice = alert(usr, "Forcing a shuttle launch while docked may result in severe injury, death and/or damage to property. Are you sure you wish to continue?", "Force Launch", "Force Launch", "Cancel") + choice = tgui_alert(usr, "Forcing a shuttle launch while docked may result in severe injury, death and/or damage to property. Are you sure you wish to continue?", "Force Launch", list("Force Launch", "Cancel")) if(choice == "Cancel") return 0 diff --git a/code/modules/spells/spellbook.dm b/code/modules/spells/spellbook.dm index b4e5e94b70..0c855626fc 100644 --- a/code/modules/spells/spellbook.dm +++ b/code/modules/spells/spellbook.dm @@ -125,7 +125,7 @@ break else if(aspell.can_improve("speed") && aspell.can_improve("power")) - switch(alert(src, "Do you want to upgrade this spell's speed or power?", "Select Upgrade", "Speed", "Power", "Cancel")) + switch(tgui_alert(src, "Do you want to upgrade this spell's speed or power?", "Select Upgrade", list("Speed", "Power", "Cancel"))) if("Speed") temp = aspell.quicken_spell() if("Power") diff --git a/code/modules/surgery/robotics.dm b/code/modules/surgery/robotics.dm index da306fab04..ba0bb41dbd 100644 --- a/code/modules/surgery/robotics.dm +++ b/code/modules/surgery/robotics.dm @@ -473,7 +473,7 @@ var/try_name = input(target,"Pick a name for your new form!", "New Name", target.name) var/clean_name = sanitizeName(try_name, allow_numbers = TRUE) if(clean_name) - var/okay = alert(target,"New name will be '[clean_name]', ok?", "Confirmation","Cancel","Ok") + var/okay = tgui_alert(target,"New name will be '[clean_name]', ok?", "Confirmation",list("Cancel","Ok")) if(okay == "Ok") new_name = clean_name @@ -567,7 +567,7 @@ var/try_name = input(target,"Pick a name for your new form!", "New Name", target.name) var/clean_name = sanitizeName(try_name, allow_numbers = TRUE) if(clean_name) - var/okay = alert(target,"New name will be '[clean_name]', ok?", "Confirmation","Cancel","Ok") + var/okay = tgui_alert(target,"New name will be '[clean_name]', ok?", "Confirmation",list("Cancel","Ok")) if(okay == "Ok") new_name = clean_name diff --git a/code/modules/tgui/external.dm b/code/modules/tgui/external.dm index d6c663871e..9abd0adce7 100644 --- a/code/modules/tgui/external.dm +++ b/code/modules/tgui/external.dm @@ -162,13 +162,13 @@ set name = "Fix TGUI" set category = "OOC" - if(alert(src, "Only use this verb if you have a white TGUI window stuck on your screen.", "Fix TGUI", "Continue", "Nevermind") != "Continue") + if(alert(src, "Only use this verb if you have a white TGUI window stuck on your screen.", "Fix TGUI", "Continue", "Nevermind") != "Continue") // Not tgui_alert since we're fixing tgui return SStgui.close_user_uis(mob) - if(alert(src, "Did that fix the problem?", "Fix TGUI", "Yes", "No") == "No") + if(alert(src, "Did that fix the problem?", "Fix TGUI", "Yes", "No") == "No") // Not tgui_alert since we're fixing tgui SStgui.force_close_all_windows(mob) - alert(src, "UIs should be fixed now. If not, please cry to your nearest coder.", "Fix TGUI") + alert(src, "UIs should be fixed now. If not, please cry to your nearest coder.", "Fix TGUI") // Not tgui_alert since we're fixing tgui /** * verb diff --git a/code/modules/tgui/modules/admin_shuttle_controller.dm b/code/modules/tgui/modules/admin_shuttle_controller.dm index d2ce9bc69e..3c88efd95d 100644 --- a/code/modules/tgui/modules/admin_shuttle_controller.dm +++ b/code/modules/tgui/modules/admin_shuttle_controller.dm @@ -86,7 +86,7 @@ shuttle.launch() else if(istype(S, /datum/shuttle/autodock)) var/datum/shuttle/autodock/shuttle = S - if(alert(usr, "Are you sure you want to launch [shuttle]?", "Launching Shuttle", "Yes", "No") == "Yes") + if(tgui_alert(usr, "Are you sure you want to launch [shuttle]?", "Launching Shuttle", list("Yes", "No")) == "Yes") shuttle.launch(src) else to_chat(usr, "The shuttle control panel isn't quite sure how to move [S] ([S?.type]).") diff --git a/code/modules/tgui/modules/agentcard.dm b/code/modules/tgui/modules/agentcard.dm index 15a0a6d49b..a83e1b9021 100644 --- a/code/modules/tgui/modules/agentcard.dm +++ b/code/modules/tgui/modules/agentcard.dm @@ -118,7 +118,7 @@ to_chat(usr, "Sex changed to '[new_sex]'.") . = TRUE if("factoryreset") - if(alert(usr, "This will factory reset the card, including access and owner. Continue?", "Factory Reset", "No", "Yes") == "Yes" && tgui_status(usr, state) == STATUS_INTERACTIVE) + if(tgui_alert(usr, "This will factory reset the card, including access and owner. Continue?", "Factory Reset", list("No", "Yes")) == "Yes" && tgui_status(usr, state) == STATUS_INTERACTIVE) S.age = initial(S.age) S.access = syndicate_access.Copy() S.assignment = initial(S.assignment) diff --git a/code/modules/tgui/modules/communications.dm b/code/modules/tgui/modules/communications.dm index 572f354dfa..395f581e0a 100644 --- a/code/modules/tgui/modules/communications.dm +++ b/code/modules/tgui/modules/communications.dm @@ -282,7 +282,7 @@ if(isAI(usr) || isrobot(usr)) to_chat(usr, "Firewalls prevent you from recalling the shuttle.") return - var/response = alert(usr, "Are you sure you wish to recall the shuttle?", "Confirm", "Yes", "No") + var/response = tgui_alert(usr, "Are you sure you wish to recall the shuttle?", "Confirm", list("Yes", "No")) if(response == "Yes") cancel_call_proc(usr) setMenuState(usr, COMM_SCREEN_MAIN) @@ -301,7 +301,7 @@ var/datum/comm_message_listener/l = obtain_message_listener() if(params["msgid"]) setCurrentMessage(usr, text2num(params["msgid"])) - var/response = alert(usr, "Are you sure you wish to delete this message?", "Confirm", "Yes", "No") + var/response = tgui_alert(usr, "Are you sure you wish to delete this message?", "Confirm", list("Yes", "No")) if(response == "Yes") if(current_viewing_message) if(l != global_message_listener) diff --git a/code/modules/tgui/tgui_alert.dm b/code/modules/tgui/tgui_alert.dm index 94c817ce6e..dc309cbe2b 100644 --- a/code/modules/tgui/tgui_alert.dm +++ b/code/modules/tgui/tgui_alert.dm @@ -142,7 +142,8 @@ src.callback = callback /datum/tgui_modal/async/Destroy(force, ...) - QDEL_NULL(callback) + if(callback) + QDEL_NULL(callback) . = ..() /datum/tgui_modal/async/tgui_close(mob/user) @@ -153,7 +154,7 @@ . = ..() if (!. || choice == null) return - callback.InvokeAsync(choice) + callback?.InvokeAsync(choice) qdel(src) /datum/tgui_modal/async/wait() diff --git a/code/modules/vchat/vchat_client.dm b/code/modules/vchat/vchat_client.dm index f005a8f2f1..b2cd9df758 100644 --- a/code/modules/vchat/vchat_client.dm +++ b/code/modules/vchat/vchat_client.dm @@ -77,8 +77,7 @@ GLOBAL_DATUM_INIT(iconCache, /savefile, new("data/iconCache.sav")) //Cache of ic return FALSE if(!winexists(owner, "htmloutput")) - spawn() - alert(owner, "Updated chat window does not exist. If you are using a custom skin file please allow the game to update.") + tgui_alert_async(owner, "Updated chat window does not exist. If you are using a custom skin file please allow the game to update.") become_broken() return FALSE @@ -161,7 +160,7 @@ GLOBAL_DATUM_INIT(iconCache, /savefile, new("data/iconCache.sav")) //Cache of ic update_vis() spawn() - alert(owner,"VChat didn't load after some time. Switching to use oldchat as a fallback. Try using 'Reload VChat' verb in OOC verbs, or reconnecting to try again.") + tgui_alert_async(owner,"VChat didn't load after some time. Switching to use oldchat as a fallback. Try using 'Reload VChat' verb in OOC verbs, or reconnecting to try again.") //Provide the JS with who we are /datum/chatOutput/proc/send_playerinfo() diff --git a/code/modules/virus2/admin.dm b/code/modules/virus2/admin.dm index b322f8775a..9eef58102a 100644 --- a/code/modules/virus2/admin.dm +++ b/code/modules/virus2/admin.dm @@ -155,7 +155,7 @@ if(!I) return infectionchance = I if("stype") - var/S = alert(usr, "Which spread type?", "Spread Type", "Contact", "Airborne", "Blood") + var/S = tgui_alert(usr, "Which spread type?", "Spread Type", list("Contact", "Airborne", "Blood")) if(!S) return spreadtype = S if("speed") @@ -193,8 +193,8 @@ species |= infectee.species.get_bodytype() if("go") if(!antigens.len) - var/a = alert(usr, "This disease has no antigens; it will be impossible to permanently immunise anyone without them.\ - It is strongly recommended to set at least one antigen. Do you want to go back and edit your virus?", "Antigens", "Yes", "Yes", "No") + var/a = tgui_alert(usr, "This disease has no antigens; it will be impossible to permanently immunise anyone without them.\ + It is strongly recommended to set at least one antigen. Do you want to go back and edit your virus?", "Antigens", list("Yes", "No")) if(a == "Yes") return var/datum/disease2/disease/D = new D.infectionchance = infectionchance diff --git a/code/modules/vore/eating/living_vr.dm b/code/modules/vore/eating/living_vr.dm index 6392c882cb..8ca60c0b1c 100644 --- a/code/modules/vore/eating/living_vr.dm +++ b/code/modules/vore/eating/living_vr.dm @@ -161,10 +161,7 @@ //Handle case: /obj/item/device/radio/beacon else if(istype(I,/obj/item/device/radio/beacon)) - var/confirm = alert(user, - "[src == user ? "Eat the beacon?" : "Feed the beacon to [src]?"]", - "Confirmation", - "Yes!", "Cancel") + var/confirm = tgui_alert(user, "[src == user ? "Eat the beacon?" : "Feed the beacon to [src]?"]", "Confirmation", list("Yes!", "Cancel")) if(confirm == "Yes!") var/obj/belly/B = input("Which belly?", "Select A Belly") as null|anything in vore_organs if(!istype(B)) @@ -416,7 +413,7 @@ //You're in a belly! if(isbelly(loc)) var/obj/belly/B = loc - var/confirm = alert(src, "You're in a mob. Don't use this as a trick to get out of hostile animals. This is for escaping from preference-breaking and if you're otherwise unable to escape from endo (pred AFK for a long time).", "Confirmation", "Okay", "Cancel") + var/confirm = tgui_alert(src, "You're in a mob. Don't use this as a trick to get out of hostile animals. This is for escaping from preference-breaking and if you're otherwise unable to escape from endo (pred AFK for a long time).", "Confirmation", list("Okay", "Cancel")) if(confirm != "Okay" || loc != B) return //Actual escaping @@ -435,7 +432,7 @@ var/mob/living/silicon/pred = loc.loc //Thing holding the belly! var/obj/item/device/dogborg/sleeper/belly = loc //The belly! - var/confirm = alert(src, "You're in a dogborg sleeper. This is for escaping from preference-breaking or if your predator disconnects/AFKs. If your preferences were being broken, please admin-help as well.", "Confirmation", "Okay", "Cancel") + var/confirm = tgui_alert(src, "You're in a dogborg sleeper. This is for escaping from preference-breaking or if your predator disconnects/AFKs. If your preferences were being broken, please admin-help as well.", "Confirmation", list("Okay", "Cancel")) if(confirm != "Okay" || loc != belly) return //Actual escaping @@ -623,7 +620,7 @@ else visible_message("[src] is threatening to make [P] disappear!") if(P.id) - var/confirm = alert(src, "The PDA you're holding contains a vulnerable ID card. Will you risk it?", "Confirmation", "Definitely", "Cancel") + var/confirm = tgui_alert(src, "The PDA you're holding contains a vulnerable ID card. Will you risk it?", "Confirmation", list("Definitely", "Cancel")) if(confirm != "Definitely") return if(!do_after(src, 100, P)) diff --git a/code/modules/vore/eating/silicon_vr.dm b/code/modules/vore/eating/silicon_vr.dm index 48ed2a4fae..df5b488cd4 100644 --- a/code/modules/vore/eating/silicon_vr.dm +++ b/code/modules/vore/eating/silicon_vr.dm @@ -64,7 +64,7 @@ //Already full if (hologram.bellied) - var/choice = alert(usr, "You can only contain one person. [hologram.bellied] is in you.", "Already Full", "Drop Mob", "Cancel") + var/choice = tgui_alert(usr, "You can only contain one person. [hologram.bellied] is in you.", "Already Full", list("Drop Mob", "Cancel")) if(choice == "Drop Mob") hologram.drop_prey() return diff --git a/code/modules/vore/eating/simple_animal_vr.dm b/code/modules/vore/eating/simple_animal_vr.dm index 9e68ad631a..c59251d889 100644 --- a/code/modules/vore/eating/simple_animal_vr.dm +++ b/code/modules/vore/eating/simple_animal_vr.dm @@ -43,12 +43,12 @@ to_chat(user, "This predator isn't friendly, and doesn't give a shit about your opinions of it digesting you.") return if(vore_selected.digest_mode == DM_HOLD) - var/confirm = alert(user, "Enabling digestion on [name] will cause it to digest all stomach contents. Using this to break OOC prefs is against the rules. Digestion will reset after 20 minutes.", "Enabling [name]'s Digestion", "Enable", "Cancel") + var/confirm = tgui_alert(user, "Enabling digestion on [name] will cause it to digest all stomach contents. Using this to break OOC prefs is against the rules. Digestion will reset after 20 minutes.", "Enabling [name]'s Digestion", list("Enable", "Cancel")) if(confirm == "Enable") vore_selected.digest_mode = DM_DIGEST addtimer(VARSET_CALLBACK(vore_selected, digest_mode, vore_default_mode), 20 MINUTES) else - var/confirm = alert(user, "This mob is currently set to process all stomach contents. Do you want to disable this?", "Disabling [name]'s Digestion", "Disable", "Cancel") + var/confirm = tgui_alert(user, "This mob is currently set to process all stomach contents. Do you want to disable this?", "Disabling [name]'s Digestion", list("Disable", "Cancel")) if(confirm == "Disable") vore_selected.digest_mode = DM_HOLD diff --git a/code/modules/vore/eating/vorepanel_vr.dm b/code/modules/vore/eating/vorepanel_vr.dm index aeb5520c1e..b91d613a3f 100644 --- a/code/modules/vore/eating/vorepanel_vr.dm +++ b/code/modules/vore/eating/vorepanel_vr.dm @@ -242,7 +242,7 @@ show_pictures = !show_pictures return TRUE if("int_help") - alert(usr, "These control how your belly responds to someone using 'resist' while inside you. The percent chance to trigger each is listed below, \ + tgui_alert(usr, "These control how your belly responds to someone using 'resist' while inside you. The percent chance to trigger each is listed below, \ and you can change them to whatever you see fit. Setting them to 0% will disable the possibility of that interaction. \ These only function as long as interactions are turned on in general. Keep in mind, the 'belly mode' interactions (digest/absorb) \ will affect all prey in that belly, if one resists and triggers digestion/absorption. If multiple trigger at the same time, \ @@ -275,7 +275,7 @@ break if(failure_msg) //Something went wrong. - alert(usr, failure_msg, "Error!") + tgui_alert_async(usr, failure_msg, "Error!") return TRUE var/obj/belly/NB = new(host) @@ -305,17 +305,17 @@ if("saveprefs") if(!host.save_vore_prefs()) - alert(usr, "ERROR: Virgo-specific preferences failed to save!","Error") + tgui_alert_async(usr, "ERROR: Virgo-specific preferences failed to save!","Error") else to_chat(usr, "Virgo-specific preferences saved!") unsaved_changes = FALSE return TRUE if("reloadprefs") - var/alert = alert(usr, "Are you sure you want to reload character slot preferences? This will remove your current vore organs and eject their contents.","Confirmation","Reload","Cancel") + var/alert = tgui_alert(usr, "Are you sure you want to reload character slot preferences? This will remove your current vore organs and eject their contents.","Confirmation",list("Reload","Cancel")) if(alert != "Reload") return FALSE if(!host.apply_vore_prefs()) - alert(usr, "ERROR: Virgo-specific preferences failed to apply!","Error") + tgui_alert_async(usr, "ERROR: Virgo-specific preferences failed to apply!","Error") else to_chat(usr,"Virgo-specific preferences applied from active slot!") unsaved_changes = FALSE @@ -327,7 +327,7 @@ new_flavor = readd_quotes(new_flavor) if(length(new_flavor) > FLAVOR_MAX) - alert(usr, "Entered flavor/taste text too long. [FLAVOR_MAX] character limit.","Error!") + tgui_alert_async(usr, "Entered flavor/taste text too long. [FLAVOR_MAX] character limit.","Error!") return FALSE host.vore_taste = new_flavor unsaved_changes = TRUE @@ -339,7 +339,7 @@ new_smell = readd_quotes(new_smell) if(length(new_smell) > FLAVOR_MAX) - alert(usr, "Entered perfume/smell text too long. [FLAVOR_MAX] character limit.","Error!") + tgui_alert_async(usr, "Entered perfume/smell text too long. [FLAVOR_MAX] character limit.","Error!") return FALSE host.vore_smell = new_smell unsaved_changes = TRUE @@ -446,10 +446,10 @@ var/intent = "Examine" if(isliving(target)) - intent = alert(usr, "What do you want to do to them?","Query","Examine","Help Out","Devour") + intent = tgui_alert(usr, "What do you want to do to them?","Query",list("Examine","Help Out","Devour")) else if(istype(target, /obj/item)) - intent = alert(usr, "What do you want to do to that?","Query","Examine","Use Hand") + intent = tgui_alert(usr, "What do you want to do to that?","Query",list("Examine","Use Hand")) switch(intent) if("Examine") //Examine a mob inside another mob @@ -518,7 +518,7 @@ //Handle the [All] choice. Ugh inelegant. Someone make this pretty. if(params["pickall"]) - intent = alert(usr, "Eject all, Move all?","Query","Eject all","Cancel","Move all") + intent = tgui_alert(usr, "Eject all, Move all?","Query",list("Eject all","Cancel","Move all")) switch(intent) if("Cancel") return TRUE @@ -597,7 +597,7 @@ /datum/vore_look/proc/set_attr(mob/user, params) if(!host.vore_selected) - alert(usr, "No belly selected to modify.") + tgui_alert_async(usr, "No belly selected to modify.") return FALSE var/attr = params["attribute"] @@ -617,7 +617,7 @@ break if(failure_msg) //Something went wrong. - alert(user,failure_msg,"Error!") + tgui_alert_async(user,failure_msg,"Error!") return FALSE host.vore_selected.name = new_name @@ -685,12 +685,12 @@ if(new_desc) new_desc = readd_quotes(new_desc) if(length(new_desc) > BELLIES_DESC_MAX) - alert(usr, "Entered belly desc too long. [BELLIES_DESC_MAX] character limit.","Error") + tgui_alert_async(usr, "Entered belly desc too long. [BELLIES_DESC_MAX] character limit.","Error") return FALSE host.vore_selected.desc = new_desc . = TRUE if("b_msgs") - alert(user,"Setting abusive or deceptive messages will result in a ban. Consider this your warning. Max 150 characters per message (500 for idle messages), max 10 messages per topic.","Really, don't.") + tgui_alert(user,"Setting abusive or deceptive messages will result in a ban. Consider this your warning. Max 150 characters per message (500 for idle messages), max 10 messages per topic.","Really, don't.") // Should remain tgui_alert() (blocking) var/help = " Press enter twice to separate messages. '%pred' will be replaced with your name. '%prey' will be replaced with the prey's name. '%belly' will be replaced with your belly's name. '%count' will be replaced with the number of anything in your belly (will not work for absorbed examine). '%countprey' will be replaced with the number of living prey in your belly (or absorbed prey for absorbed examine)." switch(params["msgtype"]) if("dmp") @@ -749,7 +749,7 @@ host.vore_selected.set_messages(new_message,"im_drain") if("reset") - var/confirm = alert(user,"This will delete any custom messages. Are you sure?","Confirmation","DELETE","Cancel") + var/confirm = tgui_alert(user,"This will delete any custom messages. Are you sure?","Confirmation",list("Cancel","DELETE")) if(confirm == "DELETE") host.vore_selected.digest_messages_prey = initial(host.vore_selected.digest_messages_prey) host.vore_selected.digest_messages_owner = initial(host.vore_selected.digest_messages_owner) @@ -763,7 +763,7 @@ var/new_verb = html_encode(input(usr,"New verb when eating (infinitive tense, e.g. nom or swallow):","New Verb") as text|null) if(length(new_verb) > BELLIES_NAME_MAX || length(new_verb) < BELLIES_NAME_MIN) - alert(usr, "Entered verb length invalid (must be longer than [BELLIES_NAME_MIN], no longer than [BELLIES_NAME_MAX]).","Error") + tgui_alert_async(usr, "Entered verb length invalid (must be longer than [BELLIES_NAME_MIN], no longer than [BELLIES_NAME_MAX]).","Error") return FALSE host.vore_selected.vore_verb = new_verb @@ -891,7 +891,7 @@ host.vore_selected.escapable = 0 to_chat(usr,"Prey will not be able to have special interactions with your [lowertext(host.vore_selected.name)].") else - alert(usr, "Something went wrong. Your stomach will now not have special interactions. Press the button enable them again and tell a dev.","Error") //If they somehow have a varable that's not 0 or 1 + tgui_alert_async(usr, "Something went wrong. Your stomach will now not have special interactions. Press the button enable them again and tell a dev.","Error") //If they somehow have a varable that's not 0 or 1 host.vore_selected.escapable = 0 . = TRUE if("b_escapechance") @@ -936,7 +936,7 @@ host.vore_selected.disable_hud = !host.vore_selected.disable_hud . = TRUE if("b_del") - var/alert = alert(usr, "Are you sure you want to delete your [lowertext(host.vore_selected.name)]?","Confirmation","Delete","Cancel") + var/alert = tgui_alert(usr, "Are you sure you want to delete your [lowertext(host.vore_selected.name)]?","Confirmation",list("Cancel","Delete")) if(!(alert == "Delete")) return FALSE @@ -958,7 +958,7 @@ failure_msg += "You must have at least one belly. " if(failure_msg) - alert(user,failure_msg,"Error!") + tgui_alert_async(user,failure_msg,"Error!") return FALSE qdel(host.vore_selected) diff --git a/code/modules/xenoarcheaology/artifacts/artifact.dm b/code/modules/xenoarcheaology/artifacts/artifact.dm index 1365f8113c..e2ee017349 100644 --- a/code/modules/xenoarcheaology/artifacts/artifact.dm +++ b/code/modules/xenoarcheaology/artifacts/artifact.dm @@ -88,7 +88,7 @@ var/effect_type = input(usr, "What type do you want?", "Effect Type") as null|anything in typesof(/datum/artifact_effect) - /datum/artifact_effect if(effect_type) my_effect = new effect_type(src) - if(alert(usr, "Do you want a secondary effect?", "Second Effect", "No", "Yes") == "Yes") + if(tgui_alert(usr, "Do you want a secondary effect?", "Second Effect", list("No", "Yes")) == "Yes") var/second_effect_type = input(usr, "What type do you want as well?", "Second Effect Type") as null|anything in typesof(/datum/artifact_effect) - list(/datum/artifact_effect, effect_type) secondary_effect = new second_effect_type(src) else diff --git a/code/modules/xenoarcheaology/tools/artifact_harvester.dm b/code/modules/xenoarcheaology/tools/artifact_harvester.dm index bb6db8b8b8..b149b52ec1 100644 --- a/code/modules/xenoarcheaology/tools/artifact_harvester.dm +++ b/code/modules/xenoarcheaology/tools/artifact_harvester.dm @@ -101,7 +101,7 @@ if("drainbattery") if(inserted_battery) if(inserted_battery.battery_effect && inserted_battery.stored_charge > 0) - if(alert(usr, "This action will dump all charge, safety gear is recommended before proceeding","Warning","Continue","Cancel")) + if(tgui_alert(usr, "This action will dump all charge, safety gear is recommended before proceeding","Warning",list("Continue","Cancel"))) if(!inserted_battery.battery_effect.activated) inserted_battery.battery_effect.ToggleActivate(1) last_process = world.time diff --git a/code/modules/xenoarcheaology/tools/geosample_scanner.dm b/code/modules/xenoarcheaology/tools/geosample_scanner.dm index 1455ef8737..d6711db804 100644 --- a/code/modules/xenoarcheaology/tools/geosample_scanner.dm +++ b/code/modules/xenoarcheaology/tools/geosample_scanner.dm @@ -64,7 +64,7 @@ to_chat(user, "You can't do that while [src] is scanning!") else if(istype(I, /obj/item/stack/nanopaste)) - var/choice = alert(usr, "What do you want to do with the nanopaste?","Radiometric Scanner","Scan nanopaste","Fix seal integrity") + var/choice = tgui_alert(usr, "What do you want to do with the nanopaste?","Radiometric Scanner",list("Scan nanopaste","Fix seal integrity")) if(choice == "Fix seal integrity") var/obj/item/stack/nanopaste/N = I var/amount_used = min(N.get_amount(), 10 - scanner_seal_integrity / 10) @@ -75,7 +75,7 @@ var/obj/item/weapon/reagent_containers/glass/G = I if(!G.is_open_container()) return - var/choice = alert(usr, "What do you want to do with the container?","Radiometric Scanner","Add coolant","Empty coolant","Scan container") + var/choice = tgui_alert(usr, "What do you want to do with the container?","Radiometric Scanner",list("Add coolant","Empty coolant","Scan container")) if(choice == "Add coolant") var/amount_transferred = min(src.reagents.maximum_volume - src.reagents.total_volume, G.reagents.total_volume) var/trans = G.reagents.trans_to_obj(src, amount_transferred) diff --git a/code/modules/xenobio/items/slime_objects.dm b/code/modules/xenobio/items/slime_objects.dm index 5e48a99767..9a945e0058 100644 --- a/code/modules/xenobio/items/slime_objects.dm +++ b/code/modules/xenobio/items/slime_objects.dm @@ -29,9 +29,9 @@ spawn(0) if(!C) return - var/response = alert(C, "Someone is requesting a soul for a promethean. Would you like to play as one?", "Promethean request", "Yes", "No", "Never for this round") + var/response = tgui_alert(C, "Someone is requesting a soul for a promethean. Would you like to play as one?", "Promethean request", list("Yes", "No", "Never for this round")) if(response == "Yes") - response = alert(C, "Are you sure you want to play as a promethean?", "Promethean request", "Yes", "No") + response = tgui_alert(C, "Are you sure you want to play as a promethean?", "Promethean request", list("Yes", "No")) if(!C || 2 == searching) return //handle logouts that happen whilst the alert is waiting for a response, and responses issued after a brain has been located. if(response == "Yes") diff --git a/code/modules/xenobio2/machinery/gene_manipulators.dm b/code/modules/xenobio2/machinery/gene_manipulators.dm index 91ff77fc94..4438c60fdf 100644 --- a/code/modules/xenobio2/machinery/gene_manipulators.dm +++ b/code/modules/xenobio2/machinery/gene_manipulators.dm @@ -22,7 +22,7 @@ /obj/item/weapon/disk/xenobio/attack_self(var/mob/user as mob) if(genes.len) - var/choice = alert(user, "Are you sure you want to wipe the disk?", "Xenobiological Data", "No", "Yes") + var/choice = tgui_alert(user, "Are you sure you want to wipe the disk?", "Xenobiological Data", list("No", "Yes")) if(src && user && genes && choice && choice == "Yes" && user.Adjacent(get_turf(src))) to_chat(user, "You wipe the disk data.") name = initial(name) diff --git a/interface/interface.dm b/interface/interface.dm index 4889230311..0c9d1f67a3 100644 --- a/interface/interface.dm +++ b/interface/interface.dm @@ -21,7 +21,7 @@ set desc = "Visit the forum." set hidden = 1 if( config.forumurl ) - if(alert(usr, "This will open the forum in your browser. Are you sure?","Visit Website","Yes","No")=="No") + if(tgui_alert(usr, "This will open the forum in your browser. Are you sure?","Visit Website",list("Yes","No"))=="No") return src << link(config.forumurl) else @@ -34,7 +34,7 @@ set hidden = 1 if(config.rulesurl) - if(alert(usr, "This will open the rules in your browser. Are you sure?","Visit Website","Yes","No")=="No") + if(tgui_alert(usr, "This will open the rules in your browser. Are you sure?","Visit Website",list("Yes","No"))=="No") return src << link(config.rulesurl) else @@ -47,7 +47,7 @@ set hidden = 1 if(config.mapurl) - if(alert(usr, "This will open the map in your browser. Are you sure?","Visit Website","Yes","No")=="No") + if(tgui_alert(usr, "This will open the map in your browser. Are you sure?","Visit Website",list("Yes","No"))=="No") return src << link(config.mapurl) else @@ -60,7 +60,7 @@ set hidden = 1 if(config.githuburl) - if(alert(usr, "This will open the GitHub in your browser. Are you sure?","Visit Website","Yes","No")=="No") + if(tgui_alert(usr, "This will open the GitHub in your browser. Are you sure?","Visit Website",list("Yes","No"))=="No") return src << link(config.githuburl) else diff --git a/maps/tether/tether_things.dm b/maps/tether/tether_things.dm index f5cdceb181..283ec4e9f6 100644 --- a/maps/tether/tether_things.dm +++ b/maps/tether/tether_things.dm @@ -249,7 +249,7 @@ var/mob/living/carbon/human/user = AM - var/choice = alert(usr, "Do you want to depart via the tram? Your character will leave the round.","Departure","Yes","No") + var/choice = tgui_alert(usr, "Do you want to depart via the tram? Your character will leave the round.","Departure",list("Yes","No")) if(user && Adjacent(user) && choice == "Yes") var/mob/observer/dead/newghost = user.ghostize() newghost.timeofdeath = world.time