diff --git a/code/controllers/subsystems/garbage.dm b/code/controllers/subsystems/garbage.dm index 5573b23ae83..362a4055bce 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("Running this will lock everything up for about 5 minutes. Would you like to begin the search?", "Find References", "Yes", "No") == "No") + 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") running_find_references = null return diff --git a/code/controllers/subsystems/supply.dm b/code/controllers/subsystems/supply.dm index 47a0e0e7bd4..f47131a05a4 100644 --- a/code/controllers/subsystems/supply.dm +++ b/code/controllers/subsystems/supply.dm @@ -310,7 +310,7 @@ SUBSYSTEM_DEF(supply) /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(alert(user, "Are you really sure? There is no way to recover the order once deleted.", "Delete Record", "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 @@ -354,7 +354,7 @@ SUBSYSTEM_DEF(supply) /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(alert(user, "Are you really sure? There is no way to recover the receipt once deleted.", "Delete Record", "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/datums/datumvars.dm b/code/datums/datumvars.dm index 7b09c83308c..da98fd4cefe 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("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 = 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") 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/locations/locations.dm b/code/datums/locations/locations.dm index 0081318eb05..688217fea0b 100644 --- a/code/datums/locations/locations.dm +++ b/code/datums/locations/locations.dm @@ -33,7 +33,7 @@ var/global/datum/locations/milky_way/all_locations = new() 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") if(specific == "Yes" && length(choice.contents) > 0) - choice = input(user, "Please choose a location.","Locations") as null|anything in choice.contents + choice = input(user, "Please choose a location.", "Locations") as null|anything in choice.contents else break to_chat(user,choice.name) diff --git a/code/datums/mind.dm b/code/datums/mind.dm index de91fd48abc..9ecada8a9ea 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("Not before round-start!", "Alert") + alert(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 72b808165a4..8103e91a143 100644 --- a/code/defines/obj.dm +++ b/code/defines/obj.dm @@ -8,12 +8,9 @@ return attack_hand(user) /obj/structure/signpost/attack_hand(mob/user as mob) - switch(alert("Travel back to ss13?",,"Yes","No")) - if("Yes") - if(user.z != src.z) return - user.forceMove(pick(latejoin)) - if("No") - return + if(alert(user, "Travel back to ss13?","Return?","Yes","No") == "Yes") + if(user.z != src.z) return + user.forceMove(pick(latejoin)) /obj/effect/mark var/mark = "" diff --git a/code/game/antagonist/antagonist_factions.dm b/code/game/antagonist/antagonist_factions.dm index 15191897ce8..18bfddcdfde 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 = alert(player.current, "Asked by [src]: Do you want to join the [faction.faction_descriptor]?", "Join the [faction.faction_descriptor]?", "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 708f047a57c..c1c7592d7b3 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("The game hasn't started yet!") + alert(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 65fce3cecf6..de50443a8dd 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("Are we sure we wish to regenerate? We will appear to be dead while doing so.","Revival","Yes","No") == "No") + 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") 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 4b095d2cd16..2b388e683e1 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("The cloth of reality can't take that much of a strain. Remove some runes first!") + alert(user, "The cloth of reality can't take that much of a strain. Remove some runes first!") return else - switch(alert("You open the tome",,"Read it","Scribe a rune", "Cancel")) + switch(alert(user, "You open the tome", "Tome", "Read it","Scribe a rune","Cancel")) if("Cancel") return if("Read it") diff --git a/code/game/gamemodes/malfunction/newmalf_ability_trees/HARDWARE.dm b/code/game/gamemodes/malfunction/newmalf_ability_trees/HARDWARE.dm index c9b76400d94..0390fb55f77 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("Really destroy core?", "Core self-destruct", "YES", "NO") + var/choice = alert(user, "Really destroy core?", "Core self-destruct", "YES", "NO") if(choice != "YES") return @@ -82,7 +82,7 @@ user.bombing_station = 0 return - var/choice = alert("Really destroy station?", "Station self-destruct", "YES", "NO") + var/choice = alert(user, "Really destroy station?", "Station self-destruct", "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 8c27df27322..ec32f445d76 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("[note] - Is this what you want?", "Hardware selection", "Yes", "No") + var/confirmation = alert(user, "[note] - Is this what you want?", "Hardware selection", "Yes", "No") if(confirmation != "Yes") to_chat(user, "Selection cancelled. Use command again to select") return diff --git a/code/game/gamemodes/nuclear/pinpointer.dm b/code/game/gamemodes/nuclear/pinpointer.dm index 62406c38774..80e9053e427 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("Please select the mode you want to put the pinpointer in.", "Pinpointer Mode Select", "Location", "Disk Recovery", "Other Signature")) + switch(alert(usr, "Please select the mode you want to put the pinpointer in.", "Pinpointer Mode Select", "Location", "Disk Recovery", "Other Signature")) if("Location") mode = 1 @@ -145,7 +145,7 @@ if("Other Signature") mode = 2 - switch(alert("Search for item signature or DNA fragment?" , "Signature Mode Select" , "" , "Item" , "DNA")) + switch(alert(usr, "Search for item signature or DNA fragment?" , "Signature Mode Select" , "" , "Item" , "DNA")) if("Item") var/datum/objective/steal/itemlist diff --git a/code/game/machinery/computer/guestpass.dm b/code/game/machinery/computer/guestpass.dm index 29925b20597..12789b4ecb7 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("Do you really want to deactivate this guest pass? (you can't reactivate it)", "Confirm Deactivation", "Yes", "No") + var/confirm = alert(usr, "Do you really want to deactivate this guest pass? (you can't reactivate it)", "Confirm Deactivation", "Yes", "No") if(confirm == "Yes") //rip guest pass \The [user] deactivates \the [src].") diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 3cd05e69b57..b0f77a97a9b 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?",,"Yes","No") == "Yes") + if(alert(M,"Would you like to enter long-term storage?","Cryopod","Yes","No") == "Yes") if(!M) return willing = 1 else diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm index 4c283cd3014..390009f25b5 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?",,"Yes","No") == "Yes") + if(alert(user,"Would you like to request an AI's presence?","Request AI","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 8cc0c56e5fe..f652f045396 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("Please confirm Feed channel creation","Network Channel Handler","Confirm","Cancel") + var/choice = alert(usr, "Please confirm Feed channel creation","Network Channel Handler","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("Please confirm Wanted Issue change.", "Network Security Handler", "Confirm", "Cancel") + var/choice = alert(usr, "Please confirm Wanted Issue change.", "Network Security Handler", "Confirm", "Cancel") if(choice == "Confirm") if(news_network.wanted_issue) if(news_network.wanted_issue.is_admin_message) - alert("The wanted issue has been distributed by a [using_map.company_name] higherup. You cannot edit it.", "Ok") + alert(usr, "The wanted issue has been distributed by a [using_map.company_name] higherup. You cannot edit it.", "Ok") 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("The wanted issue has been distributed by a [using_map.company_name] higherup. You cannot take it down.","Ok") + alert(usr, "The wanted issue has been distributed by a [using_map.company_name] higherup. You cannot take it down.","Ok") return - var/choice = alert("Please confirm Wanted Issue removal","Network Security Handler","Confirm","Cancel") + var/choice = alert(usr, "Please confirm Wanted Issue removal","Network Security Handler","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("This channel was created by a [using_map.company_name] Officer. You cannot censor it.","Ok") + alert(usr, "This channel was created by a [using_map.company_name] Officer. You cannot censor it.","Ok") 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("This message was created by a [using_map.company_name] Officer. You cannot censor its author.","Ok") + alert(usr, "This message was created by a [using_map.company_name] Officer. You cannot censor its author.","Ok") 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("This channel was created by a [using_map.company_name] Officer. You cannot censor it.","Ok") + alert(usr, "This channel was created by a [using_map.company_name] Officer. You cannot censor it.","Ok") 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("This channel was created by a [using_map.company_name] Officer. You cannot place a D-Notice upon it.","Ok") + alert(usr, "This channel was created by a [using_map.company_name] Officer. You cannot place a D-Notice upon it.","Ok") return FC.censored = !FC.censored FC.update() diff --git a/code/game/magic/archived_book.dm b/code/game/magic/archived_book.dm index cc29ed2a8b8..6940768da49 100644 --- a/code/game/magic/archived_book.dm +++ b/code/game/magic/archived_book.dm @@ -48,7 +48,7 @@ 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("Connection to Archive has been severed. Aborting.") + alert(usr, "Connection to Archive has been severed. Aborting.") 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 a1ea2ab4519..50f4e8727f0 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",null,"Force","Energy","Stun") + var/new_damtype = alert(src.occupant,"Gauntlet Phase Emitter Mode","Damage Type","Force","Energy","Stun") switch(new_damtype) if("Force") damtype = "brute" diff --git a/code/game/mecha/mecha_actions.dm b/code/game/mecha/mecha_actions.dm index c70c3b9b837..1e1c7907043 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",null,"Brute","Fire","Toxic") + var/new_damtype = alert(src.occupant,"Melee Damage Type","Damage Type","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 5286670849d..8370872263f 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("Do I want to rip the poster from the wall?","You think...","Yes","No") == "Yes") + if(alert(usr, "Do I want to rip the poster from the wall?","You think...","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 8046cf439ab..b323ef89467 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("Do I want to rip the poster from the wall?","You think...","Yes","No") == "Yes") + if(alert(usr, "Do I want to rip the poster from the wall?","You think...","Yes","No") == "Yes") if(ruined || !user.Adjacent(src)) return diff --git a/code/game/objects/items/devices/denecrotizer_vr.dm b/code/game/objects/items/devices/denecrotizer_vr.dm index 12bfffbacb0..35df978bd80 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("Would you like to become [src]? It is bound to [revivedby].",,"Yes","No") + var/reply = alert(usr, "Would you like to become [src]? It is bound to [revivedby].","Bind To","Yes","No") if(reply == "No") return diff --git a/code/game/objects/items/devices/multitool.dm b/code/game/objects/items/devices/multitool.dm index 18fc2935429..5bfbc66464c 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("What do you want to do with \the [src]?","Multitool Menu", "Switch Mode", "Clear Buffers", "Cancel") + var/choice = alert(usr, "What do you want to do with \the [src]?","Multitool Menu", "Switch Mode", "Clear Buffers", "Cancel") switch(choice) if("Cancel") to_chat(user,"You lower \the [src].") diff --git a/code/game/objects/items/devices/translocator_vr.dm b/code/game/objects/items/devices/translocator_vr.dm index 0fb898edbfa..df7f4a872fe 100644 --- a/code/game/objects/items/devices/translocator_vr.dm +++ b/code/game/objects/items/devices/translocator_vr.dm @@ -166,16 +166,16 @@ switch(choice) if("Create Beacon") if(beacons_left <= 0) - alert("The translocator can't support any more beacons!","Error") + alert(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("Entered name length invalid (must be longer than 2, no more than than 20).","Error") + alert(usr, "Entered name length invalid (must be longer than 2, no more than than 20).","Error") return if(new_name in beacons) - alert("No duplicate names, please. '[new_name]' exists already.","Error") + alert(usr, "No duplicate names, please. '[new_name]' exists already.","Error") return var/obj/item/device/perfect_tele_beacon/nb = new(get_turf(src)) diff --git a/code/game/objects/items/toys/toys.dm b/code/game/objects/items/toys/toys.dm index 61218364ad5..d105f471741 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("Are you sure you want to recolor your blade?", "Confirm Recolor", "Yes", "No") == "Yes") + if(alert(usr, "Are you sure you want to recolor your blade?", "Confirm Recolor", "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 a19ecd1d8e0..78f4bbce1cd 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("Current receiver spectrum is set to: [catastasis]","Multitool-Circuitboard interface","Switch to [opposite_catastasis]","Cancel") ) + switch( alert(usr, "Current receiver spectrum is set to: [catastasis]","Multitool-Circuitboard interface","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 01f6591104e..532b174871a 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("Would you like edit the ID, or show it?","Show or Edit?", "Edit","Show")) + switch(alert(usr, "Would you like edit the ID, or show it?","Show or Edit?", "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 c81f1d0ff5b..64666c44a46 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("What sort of explosion would you prefer?", "Implant Intent", "Localized Limb", "Destroy Body", "Full Explosion") + elevel = alert(usr, "What sort of explosion would you prefer?", "Implant Intent", "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 c4025f088a8..77b5b6d732d 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("Are you sure you want to recolor your blade?", "Confirm Recolor", "Yes", "No") == "Yes") + if(alert(usr, "Are you sure you want to recolor your blade?", "Confirm Recolor", "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 e4a518e8db2..2d5ad36ef7e 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("Are you sure you want to recolor your shield?", "Confirm Recolor", "Yes", "No") == "Yes") + if(alert(usr, "Are you sure you want to recolor your shield?", "Confirm Recolor", "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/structures/trash_pile_vr.dm b/code/game/objects/structures/trash_pile_vr.dm index 8c85871f768..1d7438b4b6d 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("Do you want to exit \the [src]?","Un-Hide?","Exit","Stay") + var/choice = alert(usr, "Do you want to exit \the [src]?","Un-Hide?","Exit","Stay") if(choice == "Exit") if(L == hider) hider = null L.forceMove(get_turf(src)) else if(!hider) - var/choice = alert("Do you want to hide in \the [src]?","Un-Hide?","Hide","Stay") + var/choice = alert(usr, "Do you want to hide in \the [src]?","Un-Hide?","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 108f7a747e1..70a0d945ee2 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("Do you want to dispatch an Emergency Response Team?",,"Yes","No") != "Yes") + if(alert(usr, "Do you want to dispatch an Emergency Response Team?","ERT","Yes","No") != "Yes") return - if(alert("Do you want this Response Team to be announced?",,"Yes","No") != "Yes") + if(alert(usr, "Do you want this Response Team to be announced?","ERT","Yes","No") != "Yes") silent_ert = 1 if(get_security_level() != "red") // Allow admins to reconsider if the alert level isn't Red - switch(alert("The station is not in red alert. Do you still want to dispatch a response team?",,"Yes","No")) + switch(alert(usr, "The station is not in red alert. Do you still want to dispatch a response team?","ERT","Yes","No")) if("No") return if(send_emergency_team) diff --git a/code/game/trader_visit.dm b/code/game/trader_visit.dm index a788be683ee..77bb192e65d 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("Do you want to dispatch the Beruang trade ship?",,"Yes","No") != "Yes") + if(alert(usr, "Do you want to dispatch the Beruang trade ship?","Trade Ship","Yes","No") != "Yes") return if(get_security_level() == "red") // Allow admins to reconsider if the alert level is Red - switch(alert("The station is in red alert. Do you still want to send traders?",,"Yes","No")) + switch(alert(usr, "The station is in red alert. Do you still want to send traders?","Trade Ship","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 a32ddc578dc..31f2cd0578f 100644 --- a/code/modules/admin/DB ban/functions.dm +++ b/code/modules/admin/DB ban/functions.dm @@ -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("Unban [pckey]?", "Unban?", "Yes", "No") == "Yes") + if(alert(usr, "Unban [pckey]?", "Unban?", "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 482044e4af8..ca8c20fad71 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("Restart the game world?", "Restart", "Yes", "Cancel") + var/confirm = alert(usr, "Restart the game world?", "Restart", "Yes", "Cancel") if(confirm == "Cancel") return if(confirm == "Yes") @@ -1010,7 +1010,7 @@ var/datum/announcement/minor/admin_min_announcer = new SSticker.delay_end = !SSticker.delay_end log_admin("[key_name(usr)] [SSticker.delay_end ? "delayed the round end" : "has made the round end normally"].") message_admins("[key_name(usr)] [SSticker.delay_end ? "delayed the round end" : "has made the round end normally"].", 1) - return //alert("Round end delayed", null, null, null, null, null) + return round_progressing = !round_progressing if (!round_progressing) to_world("The game start has been delayed.") @@ -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("Reboot server?",,"Yes","No") == "No") + if( alert(usr, "Reboot server?","Reboot!","Yes","No") == "No") 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("Admin jumping disabled") + alert(usr, "Admin jumping disabled") else - alert("[M.name] is not prisoned.") + alert(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("Not before roundstart!", "Alert") + alert(usr, "Not before roundstart!", "Alert") return var/out = "Current mode: [ticker.mode.name] ([ticker.mode.config_tag])
" @@ -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?",,"Yes","No") == "Yes") + if(alert(src, "[key_name(H)] is paralyzed, would you like to unparalyze them?","Paralyze Mob","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("Would you like the fax stamped?",, "Yes", "No")) + switch(alert(usr, "Would you like the fax stamped?","Stamped?", "Yes", "No")) if("No") shouldStamp = 0 diff --git a/code/modules/admin/admin_secrets.dm b/code/modules/admin/admin_secrets.dm index 22430f17a3e..30d5e7f9923 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("Execute the command '[name]'?", name, "No","Yes") == "Yes") + if(!warn_before_use || alert(usr, "Execute the command '[name]'?", name, "No","Yes") == "Yes") return 1 return 0 diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index b0f553a4871..7ff7156a4c0 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -374,7 +374,7 @@ set category = "Admin" if(holder) - if(alert("Confirm self-deadmin for the round? You can't re-admin yourself without someone promoting you.",,"Yes","No") == "Yes") + if(alert(usr, "Confirm self-deadmin for the round? You can't re-admin yourself without someone promoting you.","Deadmin","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("Switch from code [get_security_level()] to code [sec_level]?","Change security level?","Yes","No") == "Yes") + if(alert(usr, "Switch from code [get_security_level()] to code [sec_level]?","Change security level?","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("Are you sure you want to tell them to man up?","Confirmation","Deal with it","No")=="No") return + if(alert(usr, "Are you sure you want to tell them to man up?","Confirmation","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("Are you sure you want to tell the whole server up?","Confirmation","Deal with it","No")=="No") return + if(alert(usr, "Are you sure you want to tell the whole server up?","Confirmation","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 0a4ec4f0b2c..be3ab256521 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("Proc owned by something?",,"Yes","No")) + switch(alert(usr, "Proc owned by something?","Call Proc","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 68460ebaae8..7fa8b3154f4 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("Capture includes non existant turf, Continue capture?","Continue capture?", "No", "Yes") + var/answer = alert(usr, "Capture includes non existant turf, Continue capture?","Continue capture?", "No", "Yes") hasasked = 1 if(answer == "No") return diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm index 92536a6e053..a5d5b8bf677 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("The game hasn't started yet!") + alert(usr, "The game hasn't started yet!") 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 b586e108466..8e29dba896f 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("The game mode is [ticker.mode.name]") - else alert("For some reason there's a ticker, but not a game mode") + 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") diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 32babac135e..29f2a2ed80a 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("Are you sure you want to remove [adm_ckey]?","Message","Yes","Cancel") == "Yes") + if(alert(usr, "Are you sure you want to remove [adm_ckey]?","Message","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("You can't call the shuttle during blob!") + alert(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("The shuttle is neither counting down to launch nor is it in transit. Please try again when it is.") + alert(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("Delete old mob?","Message","Yes","No","Cancel")) + switch(alert(usr, "Delete old mob?","Message","Yes","No","Cancel")) if("Cancel") return if("Yes") delmob = 1 @@ -332,7 +332,7 @@ var/duration - switch(alert("Temporary Ban?",,"Yes","No")) + switch(alert(usr, "Temporary Ban?","Temporary Ban","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("You cannot perform this action. You must be of a higher administrative rank!") + alert(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("Temporary Ban?",,"Yes","No", "Cancel")) + switch(alert(usr, "Temporary Ban?","Temporary Ban","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("Job: '[job]' Reason: '[reason]' Un-jobban?","Please Confirm","Yes","No")) + switch(alert(usr, "Job: '[job]' Reason: '[reason]' Un-jobban?","Please Confirm","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("Do you want to unjobban [t]?","Unjobban confirmation", "Yes", "No") == "Yes") && t) //No more misclicks! Unless you do it twice. + if((alert(usr, "Do you want to unjobban [t]?","Unjobban confirmation", "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("Temporary Ban?",,"Yes","No", "Cancel")) + switch(alert(usr, "Temporary Ban?","Temporary Ban","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?",,"Yes","No","Cancel")) + switch(alert(usr,"IP ban?","IP Ban","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.", null, null, null, null) + return alert(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.", null, null, null, null) + return alert(usr, "The game has already started.") if(master_mode != "secret") - return alert(usr, "The game mode has to be secret!", null, null, null, null) + return alert(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.", null, null, null, null) + return alert(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.", null, null, null, null) + return alert(usr, "The game has already started.") if(master_mode != "secret") - return alert(usr, "The game mode has to be secret!", null, null, null, null) + return alert(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) @@ -1556,7 +1556,7 @@ if(!check_rights(R_ADMIN|R_MOD|R_EVENT)) return if(!ticker || !ticker.mode) - alert("The game hasn't started yet!") + alert(usr, "The game hasn't started yet!") return var/mob/M = locate(href_list["traitor"]) @@ -1622,13 +1622,13 @@ paths += path if(!paths) - alert("The path list you sent is empty") + alert(usr, "The path list you sent is empty") return if(length(paths) > 5) - alert("Select fewer object types, (max 5)") + alert(usr, "Select fewer object types, (max 5)") return else if(length(removed_paths)) - alert("Removed:\n" + jointext(removed_paths, "\n")) + alert(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("Please confirm Feed channel creation","Network Channel Handler","Confirm","Cancel") + var/choice = alert(usr, "Please confirm Feed channel creation","Network Channel Handler","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("Please confirm Wanted Issue [(input_param==1) ? ("creation.") : ("edit.")]","Network Security Handler","Confirm","Cancel") + var/choice = alert(usr, "Please confirm Wanted Issue [(input_param==1) ? ("creation.") : ("edit.")]","Network Security Handler","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("Please confirm Wanted Issue removal","Network Security Handler","Confirm","Cancel") + var/choice = alert(usr, "Please confirm Wanted Issue removal","Network Security Handler","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 394c3262c08..6211707c385 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?",,"Yes","No") != "No") + if(alert(usr, "You already have a ticket open. Is this for the same issue?","Duplicate?","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 ba0d970f9b9..e2d8d715924 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.",,"Yes","No") != "No") + 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") 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 b735daccb83..e79c8139e6c 100644 --- a/code/modules/admin/verbs/adminjump.dm +++ b/code/modules/admin/verbs/adminjump.dm @@ -1,202 +1,202 @@ -/mob/proc/on_mob_jump() - return - -/mob/observer/dead/on_mob_jump() - following = null - -/client/proc/Jump(var/area/A in return_sorted_areas()) - 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) - usr.on_mob_jump() - usr.forceMove(pick(get_area_turfs(A))) - - log_admin("[key_name(usr)] jumped to [A]") - 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("Admin jumping disabled") - -/client/proc/jumptoturf(var/turf/T in world) - set name = "Jump to Turf" - set category = "Admin" - if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT)) - return - if(config.allow_admin_jump) - log_admin("[key_name(usr)] jumped to [T.x],[T.y],[T.z] in [T.loc]") - message_admins("[key_name_admin(usr)] jumped to [T.x],[T.y],[T.z] in [T.loc]", 1) - usr.on_mob_jump() - 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("Admin jumping disabled") - return - -/client/proc/jumptomob(var/mob/M in mob_list) - set category = "Admin" - set name = "Jump to Mob" - set popup_menu = FALSE //VOREStation Edit - Declutter. - - if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT)) - return - - if(config.allow_admin_jump) - 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) - var/mob/A = src.mob - var/turf/T = get_turf(M) - if(T && isturf(T)) - feedback_add_details("admin_verb","JM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - A.on_mob_jump() - A.forceMove(T) - else - to_chat(A, "This mob is not located in the game world.") - else - alert("Admin jumping disabled") - -/client/proc/jumptocoord(tx as num, ty as num, tz as num) - set category = "Admin" - set name = "Jump to Coordinate" - - if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT)) - return - - if (config.allow_admin_jump) - if(src.mob) - var/mob/A = src.mob - A.on_mob_jump() - var/turf/T = locate(tx, ty, tz) - if(!T) - to_chat(usr, "Those coordinates are outside the boundaries of the map.") - return - A.forceMove(T) - feedback_add_details("admin_verb","JC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - message_admins("[key_name_admin(usr)] jumped to coordinates [tx], [ty], [tz]") - - else - alert("Admin jumping disabled") - -/client/proc/jumptokey() - set category = "Admin" - set name = "Jump to Key" - - if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT)) - return - - if(config.allow_admin_jump) - 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) - if(!selection) - to_chat(src, "No keys found.") - return - var/mob/M = selection:mob - log_admin("[key_name(usr)] jumped to [key_name(M)]") - message_admins("[key_name_admin(usr)] jumped to [key_name_admin(M)]", 1) - usr.on_mob_jump() - 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("Admin jumping disabled") - -/client/proc/Getmob(var/mob/M in mob_list) - 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) - 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) - admin_ticket_log(M, msg) - M.on_mob_jump() - 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("Admin jumping disabled") - -/client/proc/Getkey() - set category = "Admin" - set name = "Get Key" - set desc = "Key to teleport" - - if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT)) - return - - if(config.allow_admin_jump) - 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) - if(!selection) - return - var/mob/M = selection:mob - - if(!M) - return - 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) - if(M) - M.on_mob_jump() - 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("Admin jumping disabled") - -/client/proc/sendmob(var/mob/M in sortmobs()) - 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("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" - set name = "Move Atom to Coordinate" - - if(!check_rights(R_ADMIN|R_DEBUG|R_EVENT)) - return - - if(config.allow_admin_jump) - if(isnull(tx)) - tx = input("Select X coordinate", "Move Atom", null, null) as null|num - if(!tx) return - if(isnull(ty)) - ty = input("Select Y coordinate", "Move Atom", null, null) as null|num - if(!ty) return - if(isnull(tz)) - tz = input("Select Z coordinate", "Move Atom", null, null) as null|num - if(!tz) return - var/turf/T = locate(tx, ty, tz) - if(!T) - to_chat(usr, "Those coordinates are outside the boundaries of the map.") - return - if(ismob(AM)) - var/mob/M = AM - M.on_mob_jump() - AM.forceMove(T) - 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("Admin jumping disabled") +/mob/proc/on_mob_jump() + return + +/mob/observer/dead/on_mob_jump() + following = null + +/client/proc/Jump(var/area/A in return_sorted_areas()) + 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) + usr.on_mob_jump() + usr.forceMove(pick(get_area_turfs(A))) + + log_admin("[key_name(usr)] jumped to [A]") + 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") + +/client/proc/jumptoturf(var/turf/T in world) + set name = "Jump to Turf" + set category = "Admin" + if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT)) + return + if(config.allow_admin_jump) + log_admin("[key_name(usr)] jumped to [T.x],[T.y],[T.z] in [T.loc]") + message_admins("[key_name_admin(usr)] jumped to [T.x],[T.y],[T.z] in [T.loc]", 1) + usr.on_mob_jump() + 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") + return + +/client/proc/jumptomob(var/mob/M in mob_list) + set category = "Admin" + set name = "Jump to Mob" + set popup_menu = FALSE //VOREStation Edit - Declutter. + + if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT)) + return + + if(config.allow_admin_jump) + 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) + var/mob/A = src.mob + var/turf/T = get_turf(M) + if(T && isturf(T)) + feedback_add_details("admin_verb","JM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + A.on_mob_jump() + A.forceMove(T) + else + to_chat(A, "This mob is not located in the game world.") + else + alert(usr, "Admin jumping disabled") + +/client/proc/jumptocoord(tx as num, ty as num, tz as num) + set category = "Admin" + set name = "Jump to Coordinate" + + if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT)) + return + + if (config.allow_admin_jump) + if(src.mob) + var/mob/A = src.mob + A.on_mob_jump() + var/turf/T = locate(tx, ty, tz) + if(!T) + to_chat(usr, "Those coordinates are outside the boundaries of the map.") + return + A.forceMove(T) + feedback_add_details("admin_verb","JC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + message_admins("[key_name_admin(usr)] jumped to coordinates [tx], [ty], [tz]") + + else + alert(usr, "Admin jumping disabled") + +/client/proc/jumptokey() + set category = "Admin" + set name = "Jump to Key" + + if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT)) + return + + if(config.allow_admin_jump) + 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) + if(!selection) + to_chat(src, "No keys found.") + return + var/mob/M = selection:mob + log_admin("[key_name(usr)] jumped to [key_name(M)]") + message_admins("[key_name_admin(usr)] jumped to [key_name_admin(M)]", 1) + usr.on_mob_jump() + 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") + +/client/proc/Getmob(var/mob/M in mob_list) + 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) + 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) + admin_ticket_log(M, msg) + M.on_mob_jump() + 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") + +/client/proc/Getkey() + set category = "Admin" + set name = "Get Key" + set desc = "Key to teleport" + + if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT)) + return + + if(config.allow_admin_jump) + 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) + if(!selection) + return + var/mob/M = selection:mob + + if(!M) + return + 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) + if(M) + M.on_mob_jump() + 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") + +/client/proc/sendmob(var/mob/M in sortmobs()) + 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") + +/client/proc/cmd_admin_move_atom(var/atom/movable/AM, tx as num, ty as num, tz as num) + set category = "Admin" + set name = "Move Atom to Coordinate" + + if(!check_rights(R_ADMIN|R_DEBUG|R_EVENT)) + return + + if(config.allow_admin_jump) + if(isnull(tx)) + tx = input("Select X coordinate", "Move Atom", null, null) as null|num + if(!tx) return + if(isnull(ty)) + ty = input("Select Y coordinate", "Move Atom", null, null) as null|num + if(!ty) return + if(isnull(tz)) + tz = input("Select Z coordinate", "Move Atom", null, null) as null|num + if(!tz) return + var/turf/T = locate(tx, ty, tz) + if(!T) + to_chat(usr, "Those coordinates are outside the boundaries of the map.") + return + if(ismob(AM)) + var/mob/M = AM + M.on_mob_jump() + AM.forceMove(T) + 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") diff --git a/code/modules/admin/verbs/atmosdebug.dm b/code/modules/admin/verbs/atmosdebug.dm index 0691e370e53..93ff591dc4a 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("WARNING: This command should not be run on a live server. Do you want to continue?", "Check Piping", "No", "Yes") == "No") + if(alert(usr, "WARNING: This command should not be run on a live server. Do you want to continue?", "Check Piping", "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 fa623f5aaa9..7c63114663d 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("Would you like to change the floor or wall holders?","Room Builder", "Floor", "Wall") + var/choice = alert(usr, "Would you like to change the floor or wall holders?","Room Builder", "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("Change the new light range, power, or color?", "Light Maker", "Range", "Power", "Color") + var/choice = alert(usr, "Change the new light range, power, or color?", "Light Maker", "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("No results found. Sorry.") + alert(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 94c51703475..8136d227a09 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("Do you wish for [H] to be allowed to select non-whitelisted races?","Alter Mob Appearance","Yes","No","Cancel")) + switch(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("Are you sure you wish to edit this mob's appearance? Skrell, Unathi, Tajaran can result in unintended consequences.",,"Yes","No")) + 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")) if("No") return var/new_facial = input("Please select facial hair color.", "Character Generation") as color diff --git a/code/modules/admin/verbs/cinematic.dm b/code/modules/admin/verbs/cinematic.dm index a643b370fc4..323a1d6d6c6 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("Are you sure you want to run [cinematic]?","Confirmation","Yes","No")=="No") return + if(alert(usr, "Are you sure you want to run [cinematic]?","Confirmation","Yes","No")=="No") return if(!ticker) return switch(cinematic) if("explosion") - if(alert("The game will be over. Are you really sure?", "Confirmation" ,"Continue", "Cancel") == "Cancel") + if(alert(usr, "The game will be over. Are you really sure?", "Confirmation" ,"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 25dad06f463..b672b84a17e 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("Wait until the game starts") + alert(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("Invalid mob") + alert(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("Wait until the game starts") + alert(usr, "Wait until the game starts") return if(!M) - alert("That mob doesn't seem to exist, close the panel and try again.") + alert(usr, "That mob doesn't seem to exist, close the panel and try again.") return if(istype(M, /mob/new_player)) - alert("The mob must not be a new_player.") + alert(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("Wait until the game starts") + alert(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("Invalid mob") + alert(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("Wait until the game starts") + alert(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("Invalid mob") + alert(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("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.",,"Yes","No") != "Yes") + 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") 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("Are you sure? This will start up the engine. Should only be used during debug!",,"Yes","No") != "Yes") + if(alert(usr, "Are you sure? This will start up the engine. Should only be used during debug!","Start Singularity","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("Are you sure? This will start up the engine. Should only be used during debug!",,"Setup Completely","Setup except coolant","No") + 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") 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("Wait until the game starts") + alert(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("Invalid mob") + alert(usr, "Invalid mob") /datum/admins/proc/view_runtimes() set category = "Debug" diff --git a/code/modules/admin/verbs/dice.dm b/code/modules/admin/verbs/dice.dm index 72e78be2b00..b8d2146cf4b 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("Do you want to inform the world about your game?",,"Yes", "No") == "Yes") + if(alert(usr, "Do you want to inform the world about your game?","Show world?","Yes", "No") == "Yes") to_world("

The dice have been rolled by Gods!

") var/result = roll(dice) - if(alert("Do you want to inform the world about the result?",,"Yes", "No") == "Yes") + if(alert(usr, "Do you want to inform the world about the result?","Show world?","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/grief_fixers.dm b/code/modules/admin/verbs/grief_fixers.dm index b8815876b23..ba4052586f8 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("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(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") return feedback_add_details("admin_verb","FA") diff --git a/code/modules/admin/verbs/mapping.dm b/code/modules/admin/verbs/mapping.dm index ec25ff1dda3..22ed864f8bb 100644 --- a/code/modules/admin/verbs/mapping.dm +++ b/code/modules/admin/verbs/mapping.dm @@ -273,7 +273,7 @@ var/list/debug_verbs = list ( set category = "ZAS" set name = "Reboot ZAS" - if(alert("This will destroy and remake all zone geometry on the whole map.","Reboot ZAS","Reboot ZAS","Nevermind") == "Reboot ZAS") + if(alert(usr, "This will destroy and remake all zone geometry on the whole map.","Reboot ZAS","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 7df6891ce70..89c63d02606 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("Do you ready?\nSong: [S]\nNow you can also play this sound using \"Play Server Sound\".", "Confirmation request" ,"Play", "Cancel") == "Cancel") + if(alert(usr, "Do you ready?\nSong: [S]\nNow you can also play this sound using \"Play Server Sound\".", "Confirmation request" ,"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 01f024b5428..c1696a55898 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -23,7 +23,7 @@ if (ismob(M)) if(istype(M, /mob/living/silicon/ai)) - alert("The AI can't be sent to prison you jerk!", null, null, null, null, null) + alert(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) @@ -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("Cannot revive a ghost") + alert(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("Admin revive disabled") + alert(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("Should this be announced to the general population?",,"Yes","No")) + switch(alert(usr, "Should this be announced to the general population?","Show world?","Yes","No")) if("Yes") command_announcement.Announce(input, customname, new_sound = 'sound/AI/commandreport.ogg', msg_sanitized = 1); if("No") @@ -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("How would you like to ban someone today?", "Manual Ban", "Key List", "Enter Manually", "Cancel")) + switch(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("You cannot perform this action. You must be of a higher administrative rank!") + alert(usr, "You cannot perform this action. You must be of a higher administrative rank!") return - switch(alert("Temporary Ban?",,"Yes","No")) + switch(alert(usr, "Temporary Ban?","Temporary Ban","Yes","No")) if("Yes") var/mins = input(usr,"How long (in minutes)?","Ban time",1440) as num if(!mins) @@ -1007,7 +1007,7 @@ Traitors and the like can also be revived with the previous role mostly intact. if(!M) return - var/confirm = alert("Are you sure you want to cryo [M]?","Confirmation","No","Yes") + var/confirm = alert(usr, "Are you sure you want to cryo [M]?","Confirmation","No","Yes") if(confirm == "No") return diff --git a/code/modules/admin/verbs/smite_vr.dm b/code/modules/admin/verbs/smite_vr.dm index e8441b1b31d..58dd3147912 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("Control the shadekin yourself or delete pred and prey after?","Control Shadekin?","Control","Cancel","Delete") + var/myself = alert(usr, "Control the shadekin yourself or delete pred and prey after?","Control Shadekin?","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 98438fb9491..cb59ae2d12a 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("Do you want to send in a strike team? Once enabled, this is irreversible.",,"Yes","No")!="Yes") + if(alert(usr, "Do you want to send in a strike team? Once enabled, this is irreversible.","Strike Team","Yes","No")!="Yes") return - alert("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.") + 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.") choice = null while(!choice) choice = sanitize(input(src, "Please specify which mission the strike team shall undertake.", "Specify Mission", "")) if(!choice) - if(alert("Error, no mission set. Do you want to exit the setup process?",,"Yes","No")=="Yes") + if(alert(usr, "Error, no mission set. Do you want to exit the setup process?","Strike Team","Yes","No")=="Yes") return consider_ert_load() //VOREStation Add diff --git a/code/modules/admin/view_variables/modify_variables.dm b/code/modules/admin/view_variables/modify_variables.dm index 593773999dd..d77fc6b8b34 100644 --- a/code/modules/admin/view_variables/modify_variables.dm +++ b/code/modules/admin/view_variables/modify_variables.dm @@ -24,7 +24,7 @@ GLOBAL_PROTECT(VVpixelmovement) if (!subtypes || !subtypes.len) return FALSE if (subtypes && subtypes.len) - switch(alert("Strict object type detection?", "Type detection", "Strictly this type","This type and subtypes", "Cancel")) + switch(alert(usr, "Strict object type detection?", "Type detection", "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("Would you like to associate a value with the list entry?",,"Yes","No")) + switch(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) diff --git a/code/modules/admin/view_variables/topic.dm b/code/modules/admin/view_variables/topic.dm index 43c51e65c66..cede63695b4 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("Strict type ([O.type]) or type and all subtypes?",,"Strict type","Type and subtypes","Cancel") + var/action_type = alert(usr, "Strict type ([O.type]) or type and all subtypes?","Type Selection","Strict type","Type and subtypes","Cancel") if(action_type == "Cancel" || !action_type) return - if(alert("Are you really sure you want to delete all objects of type [O.type]?",,"Yes","No") != "Yes") + if(alert(usr, "Are you really sure you want to delete all objects of type [O.type]?","Delete All?","Yes","No") != "Yes") return - if(alert("Second confirmation required. Delete?",,"Yes","No") != "Yes") + if(alert(usr, "Second confirmation required. Delete?","REALLY?","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("Confirm mob type change?",,"Transform","Cancel") != "Transform") return + if(alert(usr, "Confirm mob type change?","Confirm","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("Confirm mob type change?",,"Transform","Cancel") != "Transform") return + if(alert(usr, "Confirm mob type change?","Confirm","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("Confirm mob type change?",,"Transform","Cancel") != "Transform") return + if(alert(usr, "Confirm mob type change?","Confirm","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("Confirm mob type change?",,"Transform","Cancel") != "Transform") return + if(alert(usr, "Confirm mob type change?","Confirm","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("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 = 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") 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 c76023ec1f4..fd65bae1009 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("Do you want to remove item number [target_index] from list?", "Confirm", "Yes", "No") + var/prompt = 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 0f9a9b2f50f..941d002d08f 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("Which side would you like to use?",,"Left","Right")) + switch(alert(usr, "Which side would you like to use?","Side","Left","Right")) if("Left") a_left.attack_self(user) if("Right") a_right.attack_self(user) return diff --git a/code/modules/client/preference_setup/vore/07_traits.dm b/code/modules/client/preference_setup/vore/07_traits.dm index 72c3126c1b8..78885b2e93f 100644 --- a/code/modules/client/preference_setup/vore/07_traits.dm +++ b/code/modules/client/preference_setup/vore/07_traits.dm @@ -187,7 +187,7 @@ else if(href_list["custom_species"]) /*if(pref.species != "Custom Species") - alert("You cannot set a custom species name unless you set your character to use the '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.") @@ -214,28 +214,28 @@ return TOPIC_REFRESH else if(href_list["blood_reset"]) - var/choice = alert("Reset blood color to human default (#A10808)?","Reset Blood Color","Reset","Cancel") + var/choice = alert(usr, "Reset blood color to human default (#A10808)?","Reset Blood Color","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("Remove [initial(trait.name)] and regain [initial(trait.cost)] points?","Remove Trait","Remove","Cancel") + var/choice = alert(usr, "Remove [initial(trait.name)] and regain [initial(trait.cost)] points?","Remove Trait","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("Remove [initial(trait.name)]?","Remove Trait","Remove","Cancel") + var/choice = alert(usr, "Remove [initial(trait.name)]?","Remove Trait","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("Remove [initial(trait.name)] and lose [initial(trait.cost)] points?","Remove Trait","Remove","Cancel") + var/choice = alert(usr, "Remove [initial(trait.name)] and lose [initial(trait.cost)] points?","Remove Trait","Remove","Cancel") if(choice == "Remove") pref.neg_traits -= trait return TOPIC_REFRESH @@ -310,7 +310,7 @@ done = TRUE if(trait_choice in nicelist) var/datum/trait/path = nicelist[trait_choice] - var/choice = alert("\[Cost:[initial(path.cost)]\] [initial(path.desc)]",initial(path.name),"Take Trait","Cancel","Go Back") + var/choice = alert(usr, "\[Cost:[initial(path.cost)]\] [initial(path.desc)]",initial(path.name),"Take Trait","Cancel","Go Back") if(choice == "Cancel") trait_choice = null if(choice != "Go Back") @@ -325,21 +325,21 @@ var/conflict = FALSE if(pref.dirty_synth && !(instance.can_take & SYNTHETICS)) - alert("The trait you've selected can only be taken by organic characters!","Error") + alert(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("The trait you've selected can only be taken by synthetic characters!","Error") + alert(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("The trait you've selected cannot be taken by the species you've chosen!","Error") + alert(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("The trait you've selected cannot be taken by the species you've chosen!","Error") + alert(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,7 +358,7 @@ break varconflict if(conflict) - alert("You cannot take this trait and [conflict] at the same time. \ + alert(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 diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index cece75e07c5..79b2f54634d 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("This will reset the current slot. Continue?", "Reset current slot?", "No", "Yes")) + if("No" == alert(usr, "This will reset the current slot. Continue?", "Reset current slot?", "No", "Yes")) return 0 - if("No" == alert("Are you completely sure that you want to reset this character slot?", "Reset current slot?", "No", "Yes")) + if("No" == alert(usr, "Are you completely sure that you want to reset this character slot?", "Reset current slot?", "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 bcf580bd471..7d0584bd702 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("Like it? Save changes?",,"Yes", "No") == "Yes") + if(alert(usr, "Like it? Save changes?","Save?","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 314816c59fe..68ecda85315 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("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No") + var/confirm = alert(usr, "Are you sure you want to commit suicide?", "Confirm Suicide", "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("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No") + var/confirm = alert(usr, "Are you sure you want to commit suicide?", "Confirm Suicide", "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("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No") + var/confirm = alert(usr, "Are you sure you want to commit suicide?", "Confirm Suicide", "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("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No") + var/confirm = alert(usr, "Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No") if(confirm == "Yes") suiciding = 1 diff --git a/code/modules/detectivework/tools/scanner.dm b/code/modules/detectivework/tools/scanner.dm index a3b813f96fb..6f29d6addef 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("Are you sure you want to wipe all data from [src]?",,"Yes","No") == "Yes") + if (alert(usr, "Are you sure you want to wipe all data from [src]?","Wipe Data","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 128dd0e4496..fab16852054 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("That is not a valid amount.") + alert(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("That is not a valid amount.") + alert(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("That is not a valid amount.") + alert(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 ecf9ff4688a..39433641ecb 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("That is not a valid code!") + alert(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("That is not a valid amount!") + alert(usr, "That is not a valid amount!") else transaction_amount = try_num if("toggle_lock") diff --git a/code/modules/events/event_manager.dm b/code/modules/events/event_manager.dm index 09c04c71aba..90e9c9a9efa 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("Stopping an event may have unintended side-effects. Continue?","Stopping Event!","Yes","No") != "Yes") + if(alert(usr, "Stopping an event may have unintended side-effects. Continue?","Stopping Event!","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("This will remove the event from rotation. Continue?","Removing Event!","Yes","No") != "Yes") + if(alert(usr, "This will remove the event from rotation. Continue?","Removing Event!","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("This will add a new event to the rotation. Continue?","Add Event!","Yes","No") != "Yes") + if(alert(usr, "This will add a new event to the rotation. Continue?","Add Event!","Yes","No") != "Yes") return new_event.severity = selected_event_container.severity selected_event_container.available_events += new_event diff --git a/code/modules/library/lib_machines.dm b/code/modules/library/lib_machines.dm index 3de7d81ced1..6b4beb13f64 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("This book has been rejected from the database. Aborting!") + alert(usr, "This book has been rejected from the database. Aborting!") else establish_old_db_connection() if(!dbcon_old.IsConnected()) - alert("Connection to Archive has been severed. Aborting.") + alert(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("Upload Complete.") + alert(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("Connection to Archive has been severed. Aborting.") + alert(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("Connection to Archive has been severed. Aborting.") + alert(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 6cbb09900c4..9c5e28ed19d 100644 --- a/code/modules/mob/dead/observer/free_vr.dm +++ b/code/modules/mob/dead/observer/free_vr.dm @@ -11,7 +11,7 @@ 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("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 \ + 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") if(confirm != "Quit Round") return diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index f42a4f3be00..7f30c7197aa 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -1,969 +1,969 @@ -/mob/observer - name = "observer" - desc = "This shouldn't appear" - density = 0 - -/mob/observer/dead - name = "ghost" - desc = "It's a g-g-g-g-ghooooost!" //jinkies! - icon = 'icons/mob/ghost.dmi' - icon_state = "ghost" - stat = DEAD - canmove = 0 - blinded = 0 - anchored = 1 // don't get pushed around - - var/can_reenter_corpse - var/datum/hud/living/carbon/hud = null // hud - var/bootime = 0 - var/started_as_observer //This variable is set to 1 when you enter the game as an observer. - //If you died in the game and are a ghsot - this will remain as null. - //Note that this is not a reliable way to determine if admins started as observers, since they change mobs a lot. - var/has_enabled_antagHUD = 0 - var/medHUD = 0 - var/secHUD = 0 - var/antagHUD = 0 - universal_speak = 1 - var/atom/movable/following = null - var/admin_ghosted = 0 - var/anonsay = 0 - var/ghostvision = 1 //is the ghost able to see things humans can't? - incorporeal_move = 1 - - var/is_manifest = 0 //If set to 1, the ghost is able to whisper. Usually only set if a cultist drags them through the veil. - var/ghost_sprite = null - var/global/list/possible_ghost_sprites = list( - "Clear" = "blank", - "Green Blob" = "otherthing", - "Bland" = "ghost", - "Robed-B" = "ghost1", - "Robed-BAlt" = "ghost2", - "King" = "ghostking", - "Shade" = "shade", - "Hecate" = "ghost-narsie", - "Glowing Statue" = "armour", - "Artificer" = "artificer", - "Behemoth" = "behemoth", - "Harvester" = "harvester", - "Wraith" = "wraith", - "Viscerator" = "viscerator", - "Corgi" = "corgi", - "Tamaskan" = "tamaskan", - "Black Cat" = "blackcat", - "Lizard" = "lizard", - "Goat" = "goat", - "Space Bear" = "bear", - "Bats" = "bat", - "Chicken" = "chicken_white", - "Parrot"= "parrot_fly", - "Goose" = "goose", - "Penguin" = "penguin", - "Brown Crab" = "crab", - "Gray Crab" = "evilcrab", - "Trout" = "trout-swim", - "Salmon" = "salmon-swim", - "Pike" = "pike-swim", - "Koi" = "koi-swim", - "Carp" = "carp", - "Red Robes" = "robe_red", - "Faithless" = "faithless", - "Shadowform" = "forgotten", - "Dark Ethereal" = "bloodguardian", - "Holy Ethereal" = "lightguardian", - "Red Elemental" = "magicRed", - "Blue Elemental" = "magicBlue", - "Pink Elemental" = "magicPink", - "Orange Elemental" = "magicOrange", - "Green Elemental" = "magicGreen", - "Daemon" = "daemon", - "Guard Spider" = "guard", - "Hunter Spider" = "hunter", - "Nurse Spider" = "nurse", - "Rogue Drone" = "drone", - "ED-209" = "ed209", - "Beepsky" = "secbot" - ) - var/last_revive_notification = null // world.time of last notification, used to avoid spamming players from defibs or cloners. - var/cleanup_timer // Refernece to a timer that will delete this mob if no client returns - -/mob/observer/dead/New(mob/body) - - appearance = body - invisibility = INVISIBILITY_OBSERVER - layer = BELOW_MOB_LAYER - plane = PLANE_GHOSTS - alpha = 127 - - sight |= SEE_TURFS | SEE_MOBS | SEE_OBJS | SEE_SELF - see_invisible = SEE_INVISIBLE_OBSERVER - see_in_dark = world.view //I mean. I don't even know if byond has occlusion culling... but... - verbs += /mob/observer/dead/proc/dead_tele - - var/turf/T - if(ismob(body)) - T = get_turf(body) //Where is the body located? - attack_log = body.attack_log //preserve our attack logs by copying them to our ghost - gender = body.gender - if(body.mind && body.mind.name) - name = body.mind.name - else - if(body.real_name) - name = body.real_name - else - if(gender == MALE) - name = capitalize(pick(first_names_male)) + " " + capitalize(pick(last_names)) - else - name = capitalize(pick(first_names_female)) + " " + capitalize(pick(last_names)) - - mind = body.mind //we don't transfer the mind but we keep a reference to it. - - // Fix for naked ghosts. - // Unclear why this isn't being grabbed by appearance. - if(ishuman(body)) - var/mob/living/carbon/human/H = body - add_overlay(H.overlays_standing) - - if(!T) T = pick(latejoin) //Safety in case we cannot find the body's position - forceMove(T) - - if(!name) //To prevent nameless ghosts - name = capitalize(pick(first_names_male)) + " " + capitalize(pick(last_names)) - real_name = name - animate(src, pixel_y = 2, time = 10, loop = -1) - ..() - -/mob/observer/dead/Topic(href, href_list) - if (href_list["track"]) - var/mob/target = locate(href_list["track"]) in mob_list - if(target) - ManualFollow(target) - if(href_list["reenter"]) - reenter_corpse() - return - -/mob/observer/dead/attackby(obj/item/W, mob/user) - if(istype(W,/obj/item/weapon/book/tome)) - var/mob/observer/dead/M = src - M.manifest(user) - -/mob/observer/dead/CanPass(atom/movable/mover, turf/target) - return TRUE - -/mob/observer/dead/set_stat(var/new_stat) - if(new_stat != DEAD) - CRASH("It is best if observers stay dead, thank you.") - -/mob/observer/dead/examine_icon() - var/icon/I = get_cached_examine_icon(src) - if(!I) - I = getFlatIcon(src, defdir = SOUTH, no_anim = TRUE) - set_cached_examine_icon(src, I, 200 SECONDS) - return I - -/mob/observer/dead/examine(mob/user) - . = ..() - - if(is_admin(user)) - . += "\t>[ADMIN_FULLMONTY(src)]" - -/* -Transfer_mind is there to check if mob is being deleted/not going to have a body. -Works together with spawning an observer, noted above. -*/ - -/mob/observer/dead/Life() - ..() - if(!loc) return - if(!client) return 0 - - handle_regular_hud_updates() - handle_vision() - -/mob/proc/ghostize(var/can_reenter_corpse = 1) - if(key) - if(ishuman(src)) - var/mob/living/carbon/human/H = src - if(H.vr_holder && !can_reenter_corpse) - H.exit_vr() - return 0 - var/mob/observer/dead/ghost = new(src) //Transfer safety to observer spawning proc. - ghost.can_reenter_corpse = can_reenter_corpse - ghost.timeofdeath = src.timeofdeath //BS12 EDIT - ghost.key = key - if(istype(loc, /obj/structure/morgue)) - var/obj/structure/morgue/M = loc - M.update() - else if(istype(loc, /obj/structure/closet/body_bag)) - var/obj/structure/closet/body_bag/B = loc - B.update() - if(ghost.client) - ghost.client.time_died_as_mouse = ghost.timeofdeath - if(ghost.client && !ghost.client.holder && !config.antag_hud_allowed) // For new ghosts we remove the verb from even showing up if it's not allowed. - ghost.verbs -= /mob/observer/dead/verb/toggle_antagHUD // Poor guys, don't know what they are missing! - return ghost - -/* -This is the proc mobs get to turn into a ghost. Forked from ghostize due to compatibility issues. -*/ -/mob/living/verb/ghost() - set category = "OOC" - set name = "Ghost" - set desc = "Relinquish your life and enter the land of the dead." - - if(stat == DEAD && !forbid_seeing_deadchat) - announce_ghost_joinleave(ghostize(1)) - 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") - 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. - if(response != "Ghost") - return - resting = 1 - var/turf/location = get_turf(src) - var/special_role = check_special_role() - if(!istype(loc,/obj/machinery/cryopod)) - log_and_message_admins("has ghosted outside cryo[special_role ? " as [special_role]" : ""]. (JMP)",usr) - else if(special_role) - log_and_message_admins("has ghosted in cryo as [special_role]. (JMP)",usr) - var/mob/observer/dead/ghost = ghostize(0) // 0 parameter is so we can never re-enter our body, "Charlie, you can never come baaaack~" :3 - if(ghost) - ghost.timeofdeath = world.time // Because the living mob won't have a time of death and we want the respawn timer to work properly. - ghost.set_respawn_timer() - announce_ghost_joinleave(ghost) - -/mob/observer/dead/can_use_hands() return 0 -/mob/observer/dead/is_active() return 0 - -/mob/observer/dead/Stat() - ..() - if(statpanel("Status")) - if(emergency_shuttle) - var/eta_status = emergency_shuttle.get_status_panel_eta() - if(eta_status) - stat(null, eta_status) - -/mob/observer/dead/verb/reenter_corpse() - set category = "Ghost" - set name = "Re-enter Corpse" - if(!client) return - if(!(mind && mind.current && can_reenter_corpse)) - to_chat(src, "You have no body.") - return - if(mind.current.key && copytext(mind.current.key,1,2)!="@") //makes sure we don't accidentally kick any clients - to_chat(usr, "Another consciousness is in your body... it is resisting you.") - return - //VOREStation Add - if(prevent_respawns.Find(mind.name)) - to_chat(usr, "You already quit this round as this character, sorry!") - return - //VOREStation Add End - if(mind.current.ajourn && mind.current.stat != DEAD) //check if the corpse is astral-journeying (it's client ghosted using a cultist rune). - var/found_rune - for(var/obj/effect/rune/R in mind.current.loc) //whilst corpse is alive, we can only reenter the body if it's on the rune - if(R && R.word1 == cultwords["hell"] && R.word2 == cultwords["travel"] && R.word3 == cultwords["self"]) // Found an astral journey rune. - found_rune = 1 - break - if(!found_rune) - to_chat(usr, "The astral cord that ties your body and your spirit has been severed. You are likely to wander the realm beyond until your body is finally dead and thus reunited with you.") - return - mind.current.ajourn=0 - mind.current.key = key - mind.current.teleop = null - if(istype(mind.current.loc, /obj/structure/morgue)) - var/obj/structure/morgue/M = mind.current.loc - M.update(1) - else if(istype(mind.current.loc, /obj/structure/closet/body_bag)) - var/obj/structure/closet/body_bag/B = mind.current.loc - B.update(1) - if(!admin_ghosted) - announce_ghost_joinleave(mind, 0, "They now occupy their body again.") - return 1 - -/mob/observer/dead/verb/toggle_medHUD() - set category = "Ghost" - set name = "Toggle MedicHUD" - set desc = "Toggles Medical HUD allowing you to see how everyone is doing" - - medHUD = !medHUD - plane_holder.set_vis(VIS_CH_HEALTH, medHUD) - plane_holder.set_vis(VIS_CH_STATUS_OOC, medHUD) - to_chat(src, "Medical HUD [medHUD ? "Enabled" : "Disabled"]") - -/mob/observer/dead/verb/toggle_secHUD() - set category = "Ghost" - set name = "Toggle Security HUD" - set desc = "Toggles Security HUD allowing you to see people's displayed ID's job, wanted status, etc" - - secHUD = !secHUD - plane_holder.set_vis(VIS_CH_ID, secHUD) - plane_holder.set_vis(VIS_CH_WANTED, secHUD) - plane_holder.set_vis(VIS_CH_IMPTRACK, secHUD) - plane_holder.set_vis(VIS_CH_IMPLOYAL, secHUD) - plane_holder.set_vis(VIS_CH_IMPCHEM, secHUD) - to_chat(src, "Security HUD [secHUD ? "Enabled" : "Disabled"]") - -/mob/observer/dead/verb/toggle_antagHUD() - set category = "Ghost" - set name = "Toggle AntagHUD" - set desc = "Toggles AntagHUD allowing you to see who is the antagonist" - - if(!config.antag_hud_allowed && !client.holder) - to_chat(src, "Admins have disabled this for this round.") - return - if(jobban_isbanned(src, "AntagHUD")) - 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") - if(response == "No") return - can_reenter_corpse = FALSE - set_respawn_timer(-1) // Foreeeever - if(!has_enabled_antagHUD && !client.holder) - has_enabled_antagHUD = TRUE - - antagHUD = !antagHUD - plane_holder.set_vis(VIS_CH_SPECIAL, antagHUD) - to_chat(src, "AntagHUD [antagHUD ? "Enabled" : "Disabled"]") - -/mob/observer/dead/proc/jumpable_areas() - var/list/areas = return_sorted_areas() - if(client?.holder) - return areas - - for(var/area/A as anything in areas) - if(A.z in using_map?.secret_levels) - areas -= A - return areas - -/mob/observer/dead/proc/jumpable_mobs() - var/list/mobs = getmobs() - if(client?.holder) - return mobs - - for(var/key in mobs) - var/mobz = get_z(mobs[key]) - if(mobz in using_map?.secret_levels) - mobs -= key - return mobs - -/mob/observer/dead/proc/dead_tele(var/area/A in jumpable_areas()) - set category = "Ghost" - set name = "Teleport" - set desc = "Teleport to a location" - - if(!istype(usr, /mob/observer/dead)) - 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() - if(!A) - return - - usr.forceMove(pick(get_area_turfs(A))) - usr.on_mob_jump() - -/mob/observer/dead/verb/follow(input in jumpable_mobs()) - 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() - if(!input) - return - - var/target = jumpable_mobs()[input] - if(!target) return - ManualFollow(target) - -/mob/observer/dead/forceMove(atom/destination) - if(client?.holder) - return ..() - - if(get_z(destination) in using_map?.secret_levels) - to_chat(src,SPAN_WARNING("Sorry, that z-level does not allow ghosts.")) - if(following) - stop_following() - return - - return ..() - -/mob/observer/dead/Move(atom/newloc, direct = 0, movetime) - if(client?.holder) - return ..() - - if(get_z(newloc) in using_map?.secret_levels) - to_chat(src,SPAN_WARNING("Sorry, that z-level does not allow ghosts.")) - if(following) - stop_following() - return - - return ..() - -// This is the ghost's follow verb with an argument -/mob/observer/dead/proc/ManualFollow(var/atom/movable/target) - if(!target) - return - - var/turf/targetloc = get_turf(target) - if(check_holy(targetloc)) - to_chat(usr, "You cannot follow a mob standing on holy grounds!") - return - if(get_z(target) in using_map?.secret_levels) - to_chat(src, SPAN_WARNING("Sorry, that target is in an area that ghosts aren't allowed to go.")) - return - if(target != src) - if(following && following == target) - return - following = target - to_chat(src, "Now following [target]") - if(ismob(target)) - forceMove(get_turf(target)) - var/mob/M = target - M.following_mobs += src - else - spawn(0) - while(target && following == target && client) - var/turf/T = get_turf(target) - if(!T) - break - // To stop the ghost flickering. - if(loc != T) - forceMove(T) - sleep(15) - - var/icon/I = icon(target.icon,target.icon_state,target.dir) - - var/orbitsize = (I.Width()+I.Height())*0.5 - orbitsize -= (orbitsize/world.icon_size)*(world.icon_size*0.25) - - var/rot_seg - - /* We don't have this pref yet - switch(ghost_orbit) - if(GHOST_ORBIT_TRIANGLE) - rot_seg = 3 - if(GHOST_ORBIT_SQUARE) - rot_seg = 4 - if(GHOST_ORBIT_PENTAGON) - rot_seg = 5 - if(GHOST_ORBIT_HEXAGON) - rot_seg = 6 - else //Circular - rot_seg = 36 //360/10 bby, smooth enough aproximation of a circle - */ - - orbit(target, orbitsize, FALSE, 20, rot_seg) - -/mob/observer/dead/orbit() - set_dir(2) //reset dir so the right directional sprites show up - return ..() - -/mob/observer/dead/stop_orbit() - . = ..() - //restart our floating animation after orbit is done. - pixel_y = 0 - pixel_x = 0 - transform = null - animate(src, pixel_y = 2, time = 10, loop = -1) - -/mob/observer/dead/proc/stop_following() - following = null - stop_orbit() - -/mob/proc/update_following() - . = get_turf(src) - for(var/mob/observer/dead/M in following_mobs) - if(!.) - M.stop_following() - - if(M.following != src) - following_mobs -= M - else - if(M.loc != .) - M.forceMove(.) - -/mob - var/list/following_mobs = list() - -/mob/Destroy() - for(var/mob/observer/dead/M in following_mobs) - M.stop_following() - following_mobs = null - return ..() - -/mob/observer/dead/Destroy() - if(ismob(following)) - var/mob/M = following - M.following_mobs -= src - stop_following() - return ..() - -/mob/Moved(atom/old_loc, direction, forced = FALSE) - . = ..() - update_following() - -/mob/Life() - // to catch teleports etc which directly set loc - update_following() - return ..() - -/mob/proc/check_holy(var/turf/T) - return 0 - -/mob/observer/dead/check_holy(var/turf/T) - if(check_rights(R_ADMIN|R_FUN|R_EVENT, 0, src)) - return 0 - - 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 - set category = "Ghost" - set name = "Jump to Mob" - set desc = "Teleport to a mob" - set popup_menu = FALSE - - 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() - if(!input) - return - - var/target = jumpable_mobs()[input] - if (!target)//Make sure we actually have a target - return - else - var/mob/M = target //Destination mob - var/turf/T = get_turf(M) //Turf of the destination mob - - if(T && isturf(T)) //Make sure the turf exists, then move the source to that destination. - forceMove(T) - stop_following() - else - to_chat(src, "This mob is not located in the game world.") - -/mob/observer/dead/memory() - set hidden = 1 - to_chat(src, "You are dead! You have no mind to store memory!") - -/mob/observer/dead/add_memory() - set hidden = 1 - to_chat(src, "You are dead! You have no mind to store memory!") - -/mob/observer/dead/Post_Incorpmove() - stop_following() - -/mob/observer/dead/verb/analyze_air() - set name = "Analyze Air" - set category = "Ghost" - - if(!istype(usr, /mob/observer/dead)) return - - // Shamelessly copied from the Gas Analyzers - if (!( istype(usr.loc, /turf) )) - return - - var/datum/gas_mixture/environment = usr.loc.return_air() - - var/pressure = environment.return_pressure() - var/total_moles = environment.total_moles - - to_chat(src, "Results:") - if(abs(pressure - ONE_ATMOSPHERE) < 10) - to_chat(src, "Pressure: [round(pressure,0.1)] kPa") - else - to_chat(src, "Pressure: [round(pressure,0.1)] kPa") - if(total_moles) - for(var/g in environment.gas) - to_chat(src, "[gas_data.name[g]]: [round((environment.gas[g] / total_moles) * 100)]% ([round(environment.gas[g], 0.01)] moles)") - to_chat(src, "Temperature: [round(environment.temperature-T0C,0.1)]°C ([round(environment.temperature,0.1)]K)") - to_chat(src, "Heat Capacity: [round(environment.heat_capacity(),0.1)]") - -/mob/observer/dead/verb/check_radiation() - set name = "Check Radiation" - set category = "Ghost" - - var/turf/t = get_turf(src) - if(t) - var/rads = SSradiation.get_rads_at_turf(t) - to_chat(src, "Radiation level: [rads ? rads : "0"] Bq.") - - -/mob/observer/dead/verb/become_mouse() - set name = "Become mouse" - set category = "Ghost" - - if(config.disable_player_mice) - to_chat(src, "Spawning as a mouse is currently disabled.") - return - - if(!MayRespawn(1)) - return - - var/turf/T = get_turf(src) - if(!T || (T.z in using_map.admin_levels)) - to_chat(src, "You may not spawn as a mouse on this Z-level.") - return - - var/timedifference = world.time - client.time_died_as_mouse - if(client.time_died_as_mouse && timedifference <= mouse_respawn_time * 600) - var/timedifference_text - timedifference_text = time2text(mouse_respawn_time * 600 - timedifference,"mm:ss") - 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!") - if(response != "Squeek!") return //Hit the wrong key...again. - - - //find a viable mouse candidate - var/mob/living/simple_mob/animal/passive/mouse/host - var/obj/machinery/atmospherics/unary/vent_pump/vent_found - var/list/found_vents = list() - for(var/obj/machinery/atmospherics/unary/vent_pump/v in machines) - if(!v.welded && v.z == T.z && v.network && v.network.normal_members.len > 20) - found_vents.Add(v) - if(found_vents.len) - vent_found = pick(found_vents) - host = new /mob/living/simple_mob/animal/passive/mouse(vent_found) - else - to_chat(src, "Unable to find any unwelded vents to spawn mice at.") - - if(host) - if(config.uneducated_mice) - host.universal_understand = 0 - announce_ghost_joinleave(src, 0, "They are now a mouse.") - host.ckey = src.ckey - host.add_ventcrawl(vent_found) - to_chat(host, "You are now a mouse. Try to avoid interaction with players, and do not give hints away that you are more than a simple rodent.") - -/mob/observer/dead/verb/view_manfiest() - set name = "Show Crew Manifest" - set category = "Ghost" - - var/dat - dat += "

Crew Manifest

" - dat += data_core.get_manifest() - - src << browse(dat, "window=manifest;size=370x420;can_close=1") - -//This is called when a ghost is drag clicked to something. -/mob/observer/dead/MouseDrop(atom/over) - if(!usr || !over) return - if (isobserver(usr) && usr.client && usr.client.holder && isliving(over)) - if (usr.client.holder.cmd_ghost_drag(src,over)) - return - - return ..() - -//Used for drawing on walls with blood puddles as a spooky ghost. -/mob/observer/dead/verb/bloody_doodle() - - set category = "Ghost" - set name = "Write in blood" - set desc = "If the round is sufficiently spooky, write a short message in blood on the floor or a wall. Remember, no IC in OOC or OOC in IC." - - if(!(config.cult_ghostwriter)) - to_chat(src, "That verb is not currently permitted.") - return - - if (!src.stat) - return - - if (usr != src) - return 0 //something is terribly wrong - - var/ghosts_can_write - if(ticker.mode.name == "cult") - if(cult.current_antagonists.len > config.cult_ghostwriter_req_cultists) - ghosts_can_write = 1 - - if(!ghosts_can_write && !check_rights(R_ADMIN|R_EVENT|R_FUN, 0)) //Let's allow for admins to write in blood for events and the such. - to_chat(src, "The veil is not thin enough for you to do that.") - return - - var/list/choices = list() - for(var/obj/effect/decal/cleanable/blood/B in view(1,src)) - if(B.amount > 0) - choices += B - - if(!choices.len) - to_chat(src, "There is no blood to use nearby.") - return - - var/obj/effect/decal/cleanable/blood/choice = input(src,"What blood would you like to use?") in null|choices - - var/direction = input(src,"Which way?","Tile selection") as anything in list("Here","North","South","East","West") - var/turf/simulated/T = src.loc - if (direction != "Here") - T = get_step(T,text2dir(direction)) - - if (!istype(T)) - to_chat(src, "You cannot doodle there.") - return - - if(!choice || choice.amount == 0 || !(src.Adjacent(choice))) - return - - var/doodle_color = (choice.basecolor) ? choice.basecolor : "#A10808" - - var/num_doodles = 0 - for (var/obj/effect/decal/cleanable/blood/writing/W in T) - num_doodles++ - if (num_doodles > 4) - to_chat(src, "There is no space to write on!") - return - - var/max_length = 50 - - var/message = sanitize(input("Write a message. It cannot be longer than [max_length] characters.","Blood writing", "")) - - if (message) - - if (length(message) > max_length) - message += "-" - to_chat(src, "You ran out of blood to write with!") - - var/obj/effect/decal/cleanable/blood/writing/W = new(T) - W.basecolor = doodle_color - W.update_icon() - W.message = message - W.add_hiddenprint(src) - W.visible_message("Invisible fingers crudely paint something in blood on [T]...") - -/mob/observer/dead/pointed(atom/A as mob|obj|turf in view()) - if(!..()) - return 0 - usr.visible_message("[src] points to [A]") - return 1 - -/mob/observer/dead/proc/manifest(mob/user) - is_manifest = TRUE - verbs |= /mob/observer/dead/proc/toggle_visibility - verbs |= /mob/observer/dead/proc/ghost_whisper - to_chat(src, "As you are now in the realm of the living, you can whisper to the living with the Spectral Whisper verb, inside the IC tab.") - if(plane != PLANE_WORLD) - user.visible_message( \ - "\The [user] drags ghost, [src], to our plane of reality!", \ - "You drag [src] to our plane of reality!" \ - ) - toggle_visibility(TRUE) - else - var/datum/gender/T = gender_datums[user.get_visible_gender()] - user.visible_message ( \ - "\The [user] just tried to smash [T.his] book into that ghost! It's not very effective.", \ - "You get the feeling that the ghost can't become any more visible." \ - ) - -/mob/observer/dead/proc/toggle_icon(var/icon) - if(!client) - return - - var/iconRemoved = 0 - for(var/image/I in client.images) - if(I.icon_state == icon) - iconRemoved = 1 - qdel(I) - - if(!iconRemoved) - var/image/J = image('icons/mob/mob.dmi', loc = src, icon_state = icon) - client.images += J - -/mob/observer/dead/proc/toggle_visibility(var/forced = 0) - set category = "Ghost" - set name = "Toggle Visibility" - set desc = "Allows you to turn (in)visible (almost) at will." - - var/toggled_invisible - if(!forced && plane == PLANE_GHOSTS && world.time < toggled_invisible + 600) - to_chat(src, "You must gather strength before you can turn visible again...") - return - - if(plane == PLANE_WORLD) - toggled_invisible = world.time - visible_message("It fades from sight...", "You are now invisible.") - else - to_chat(src, "You are now visible!") - - plane = (plane == PLANE_GHOSTS) ? PLANE_WORLD : PLANE_GHOSTS - invisibility = (plane == PLANE_WORLD) ? 0 : INVISIBILITY_OBSERVER - - // Give the ghost a cult icon which should be visible only to itself - toggle_icon("cult") - -/mob/observer/dead/verb/toggle_anonsay() - set category = "Ghost" - set name = "Toggle Anonymous Chat" - set desc = "Toggles showing your key in dead chat." - - src.anonsay = !src.anonsay - if(anonsay) - to_chat(src, "Your key won't be shown when you speak in dead chat.") - else - to_chat(src, "Your key will be publicly visible again.") - -/mob/observer/dead/canface() - return 1 - -/mob/observer/dead/proc/can_admin_interact() - return check_rights(R_ADMIN|R_EVENT, 0, src) - -/mob/observer/dead/verb/toggle_ghostsee() - set name = "Toggle Ghost Vision" - set desc = "Toggles your ability to see things only ghosts can see, like other ghosts" - set category = "Ghost" - ghostvision = !ghostvision - updateghostsight() - to_chat(src, "You [ghostvision ? "now" : "no longer"] have ghost vision.") - -/mob/observer/dead/verb/toggle_darkness() - set name = "Toggle Darkness" - set desc = "Toggles your ability to see lighting overlays, and the darkness they create." - set category = "Ghost" - seedarkness = !seedarkness - updateghostsight() - to_chat(src, "You [seedarkness ? "now" : "no longer"] see darkness.") - -/mob/observer/dead/proc/updateghostsight() - plane_holder.set_vis(VIS_FULLBRIGHT, !seedarkness) //Inversion, because "not seeing" the darkness is "seeing" the lighting plane master. - plane_holder.set_vis(VIS_GHOSTS, ghostvision) - -/mob/observer/dead/MayRespawn(var/feedback = 0) - if(!client) - return 0 - if(mind && mind.current && mind.current.stat != DEAD && can_reenter_corpse) - if(feedback) - to_chat(src, "Your non-dead body prevent you from respawning.") - return 0 - if(config.antag_hud_restricted && has_enabled_antagHUD == 1) - if(feedback) - to_chat(src, "antagHUD restrictions prevent you from respawning.") - return 0 - return 1 - -/atom/proc/extra_ghost_link() - return - -/mob/extra_ghost_link(var/atom/ghost) - if(client && eyeobj) - return "|eye" - -/mob/observer/dead/extra_ghost_link(var/atom/ghost) - if(mind && mind.current) - return "|body" - -/proc/ghost_follow_link(var/atom/target, var/atom/ghost) - if((!target) || (!ghost)) return - . = "follow" - . += target.extra_ghost_link(ghost) - -//Culted Ghosts - -/mob/observer/dead/proc/ghost_whisper() - set name = "Spectral Whisper" - set category = "IC" - - if(is_manifest) //Only able to whisper if it's hit with a tome. - var/list/options = list() - for(var/mob/living/Ms in view(src)) - options += Ms - var/mob/living/M = input(src, "Select who to whisper to:", "Whisper to?", null) as null|mob in options - if(!M) - return 0 - var/msg = sanitize(input(src, "Message:", "Spectral Whisper") as text|null) - if(msg) - log_say("(SPECWHISP to [key_name(M)]): [msg]", src) - to_chat(M, " You hear a strange, unidentifiable voice in your head... [msg]") - to_chat(src, " You said: '[msg]' to [M].") - else - return - return 1 - else - to_chat(src, "You have not been pulled past the veil!") - -/mob/observer/dead/verb/choose_ghost_sprite() - set category = "Ghost" - set name = "Choose Sprite" - - var/choice - var/previous_state - 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 - if(!choice) - return - - if(choice) - icon = 'icons/mob/ghost.dmi' - cut_overlays() - - if(icon_state && icon) - previous_state = icon_state - - icon_state = possible_ghost_sprites[choice] - finalized = alert("Look at your sprite. Is this what you wish to use?",,"No","Yes") - - ghost_sprite = possible_ghost_sprites[choice] - - if(finalized == "No") - icon_state = previous_state - -/mob/observer/dead/is_blind() - return FALSE - -/mob/observer/dead/is_deaf() - return FALSE - -/mob/observer/dead/verb/paialert() - set category = "Ghost" - set name = "Blank pAI alert" - set desc = "Flash an indicator light on available blank pAI devices for a smidgen of hope." - - if(usr.client.prefs?.be_special & BE_PAI) - var/count = 0 - for(var/obj/item/device/paicard/p in all_pai_cards) - var/obj/item/device/paicard/PP = p - if(PP.pai == null) - count++ - PP.icon = 'icons/obj/pda_vr.dmi' // VOREStation Edit - PP.add_overlay("pai-ghostalert") - spawn(54) - PP.cut_overlays() - to_chat(usr,"Flashing the displays of [count] unoccupied PAIs.") - else - to_chat(usr,"You have 'Be pAI' disabled in your character prefs, so we can't help you.") - -/mob/observer/dead/speech_bubble_appearance() - return "ghost" - -// Lets a ghost know someone's trying to bring them back, and for them to get into their body. -// Mostly the same as TG's sans the hud element, since we don't have TG huds. -/mob/observer/dead/proc/notify_revive(var/message, var/sound, flashwindow = TRUE, var/atom/source) - if((last_revive_notification + 2 MINUTES) > world.time) - return - last_revive_notification = world.time - - if(flashwindow) - window_flash(client) - if(message) - to_chat(src, "[message]") - if(source) - throw_alert("\ref[source]_notify_revive", /obj/screen/alert/notify_cloning, new_master = source) - to_chat(src, "(Click to re-enter)") - if(sound) - SEND_SOUND(src, sound(sound)) - -/mob/observer/dead/verb/respawn() - set name = "Respawn" - set category = "Ghost" - src.abandon_mob() +/mob/observer + name = "observer" + desc = "This shouldn't appear" + density = 0 + +/mob/observer/dead + name = "ghost" + desc = "It's a g-g-g-g-ghooooost!" //jinkies! + icon = 'icons/mob/ghost.dmi' + icon_state = "ghost" + stat = DEAD + canmove = 0 + blinded = 0 + anchored = 1 // don't get pushed around + + var/can_reenter_corpse + var/datum/hud/living/carbon/hud = null // hud + var/bootime = 0 + var/started_as_observer //This variable is set to 1 when you enter the game as an observer. + //If you died in the game and are a ghsot - this will remain as null. + //Note that this is not a reliable way to determine if admins started as observers, since they change mobs a lot. + var/has_enabled_antagHUD = 0 + var/medHUD = 0 + var/secHUD = 0 + var/antagHUD = 0 + universal_speak = 1 + var/atom/movable/following = null + var/admin_ghosted = 0 + var/anonsay = 0 + var/ghostvision = 1 //is the ghost able to see things humans can't? + incorporeal_move = 1 + + var/is_manifest = 0 //If set to 1, the ghost is able to whisper. Usually only set if a cultist drags them through the veil. + var/ghost_sprite = null + var/global/list/possible_ghost_sprites = list( + "Clear" = "blank", + "Green Blob" = "otherthing", + "Bland" = "ghost", + "Robed-B" = "ghost1", + "Robed-BAlt" = "ghost2", + "King" = "ghostking", + "Shade" = "shade", + "Hecate" = "ghost-narsie", + "Glowing Statue" = "armour", + "Artificer" = "artificer", + "Behemoth" = "behemoth", + "Harvester" = "harvester", + "Wraith" = "wraith", + "Viscerator" = "viscerator", + "Corgi" = "corgi", + "Tamaskan" = "tamaskan", + "Black Cat" = "blackcat", + "Lizard" = "lizard", + "Goat" = "goat", + "Space Bear" = "bear", + "Bats" = "bat", + "Chicken" = "chicken_white", + "Parrot"= "parrot_fly", + "Goose" = "goose", + "Penguin" = "penguin", + "Brown Crab" = "crab", + "Gray Crab" = "evilcrab", + "Trout" = "trout-swim", + "Salmon" = "salmon-swim", + "Pike" = "pike-swim", + "Koi" = "koi-swim", + "Carp" = "carp", + "Red Robes" = "robe_red", + "Faithless" = "faithless", + "Shadowform" = "forgotten", + "Dark Ethereal" = "bloodguardian", + "Holy Ethereal" = "lightguardian", + "Red Elemental" = "magicRed", + "Blue Elemental" = "magicBlue", + "Pink Elemental" = "magicPink", + "Orange Elemental" = "magicOrange", + "Green Elemental" = "magicGreen", + "Daemon" = "daemon", + "Guard Spider" = "guard", + "Hunter Spider" = "hunter", + "Nurse Spider" = "nurse", + "Rogue Drone" = "drone", + "ED-209" = "ed209", + "Beepsky" = "secbot" + ) + var/last_revive_notification = null // world.time of last notification, used to avoid spamming players from defibs or cloners. + var/cleanup_timer // Refernece to a timer that will delete this mob if no client returns + +/mob/observer/dead/New(mob/body) + + appearance = body + invisibility = INVISIBILITY_OBSERVER + layer = BELOW_MOB_LAYER + plane = PLANE_GHOSTS + alpha = 127 + + sight |= SEE_TURFS | SEE_MOBS | SEE_OBJS | SEE_SELF + see_invisible = SEE_INVISIBLE_OBSERVER + see_in_dark = world.view //I mean. I don't even know if byond has occlusion culling... but... + verbs += /mob/observer/dead/proc/dead_tele + + var/turf/T + if(ismob(body)) + T = get_turf(body) //Where is the body located? + attack_log = body.attack_log //preserve our attack logs by copying them to our ghost + gender = body.gender + if(body.mind && body.mind.name) + name = body.mind.name + else + if(body.real_name) + name = body.real_name + else + if(gender == MALE) + name = capitalize(pick(first_names_male)) + " " + capitalize(pick(last_names)) + else + name = capitalize(pick(first_names_female)) + " " + capitalize(pick(last_names)) + + mind = body.mind //we don't transfer the mind but we keep a reference to it. + + // Fix for naked ghosts. + // Unclear why this isn't being grabbed by appearance. + if(ishuman(body)) + var/mob/living/carbon/human/H = body + add_overlay(H.overlays_standing) + + if(!T) T = pick(latejoin) //Safety in case we cannot find the body's position + forceMove(T) + + if(!name) //To prevent nameless ghosts + name = capitalize(pick(first_names_male)) + " " + capitalize(pick(last_names)) + real_name = name + animate(src, pixel_y = 2, time = 10, loop = -1) + ..() + +/mob/observer/dead/Topic(href, href_list) + if (href_list["track"]) + var/mob/target = locate(href_list["track"]) in mob_list + if(target) + ManualFollow(target) + if(href_list["reenter"]) + reenter_corpse() + return + +/mob/observer/dead/attackby(obj/item/W, mob/user) + if(istype(W,/obj/item/weapon/book/tome)) + var/mob/observer/dead/M = src + M.manifest(user) + +/mob/observer/dead/CanPass(atom/movable/mover, turf/target) + return TRUE + +/mob/observer/dead/set_stat(var/new_stat) + if(new_stat != DEAD) + CRASH("It is best if observers stay dead, thank you.") + +/mob/observer/dead/examine_icon() + var/icon/I = get_cached_examine_icon(src) + if(!I) + I = getFlatIcon(src, defdir = SOUTH, no_anim = TRUE) + set_cached_examine_icon(src, I, 200 SECONDS) + return I + +/mob/observer/dead/examine(mob/user) + . = ..() + + if(is_admin(user)) + . += "\t>[ADMIN_FULLMONTY(src)]" + +/* +Transfer_mind is there to check if mob is being deleted/not going to have a body. +Works together with spawning an observer, noted above. +*/ + +/mob/observer/dead/Life() + ..() + if(!loc) return + if(!client) return 0 + + handle_regular_hud_updates() + handle_vision() + +/mob/proc/ghostize(var/can_reenter_corpse = 1) + if(key) + if(ishuman(src)) + var/mob/living/carbon/human/H = src + if(H.vr_holder && !can_reenter_corpse) + H.exit_vr() + return 0 + var/mob/observer/dead/ghost = new(src) //Transfer safety to observer spawning proc. + ghost.can_reenter_corpse = can_reenter_corpse + ghost.timeofdeath = src.timeofdeath //BS12 EDIT + ghost.key = key + if(istype(loc, /obj/structure/morgue)) + var/obj/structure/morgue/M = loc + M.update() + else if(istype(loc, /obj/structure/closet/body_bag)) + var/obj/structure/closet/body_bag/B = loc + B.update() + if(ghost.client) + ghost.client.time_died_as_mouse = ghost.timeofdeath + if(ghost.client && !ghost.client.holder && !config.antag_hud_allowed) // For new ghosts we remove the verb from even showing up if it's not allowed. + ghost.verbs -= /mob/observer/dead/verb/toggle_antagHUD // Poor guys, don't know what they are missing! + return ghost + +/* +This is the proc mobs get to turn into a ghost. Forked from ghostize due to compatibility issues. +*/ +/mob/living/verb/ghost() + set category = "OOC" + set name = "Ghost" + set desc = "Relinquish your life and enter the land of the dead." + + if(stat == DEAD && !forbid_seeing_deadchat) + announce_ghost_joinleave(ghostize(1)) + 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") + 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. + if(response != "Ghost") + return + resting = 1 + var/turf/location = get_turf(src) + var/special_role = check_special_role() + if(!istype(loc,/obj/machinery/cryopod)) + log_and_message_admins("has ghosted outside cryo[special_role ? " as [special_role]" : ""]. (JMP)",usr) + else if(special_role) + log_and_message_admins("has ghosted in cryo as [special_role]. (JMP)",usr) + var/mob/observer/dead/ghost = ghostize(0) // 0 parameter is so we can never re-enter our body, "Charlie, you can never come baaaack~" :3 + if(ghost) + ghost.timeofdeath = world.time // Because the living mob won't have a time of death and we want the respawn timer to work properly. + ghost.set_respawn_timer() + announce_ghost_joinleave(ghost) + +/mob/observer/dead/can_use_hands() return 0 +/mob/observer/dead/is_active() return 0 + +/mob/observer/dead/Stat() + ..() + if(statpanel("Status")) + if(emergency_shuttle) + var/eta_status = emergency_shuttle.get_status_panel_eta() + if(eta_status) + stat(null, eta_status) + +/mob/observer/dead/verb/reenter_corpse() + set category = "Ghost" + set name = "Re-enter Corpse" + if(!client) return + if(!(mind && mind.current && can_reenter_corpse)) + to_chat(src, "You have no body.") + return + if(mind.current.key && copytext(mind.current.key,1,2)!="@") //makes sure we don't accidentally kick any clients + to_chat(usr, "Another consciousness is in your body... it is resisting you.") + return + //VOREStation Add + if(prevent_respawns.Find(mind.name)) + to_chat(usr, "You already quit this round as this character, sorry!") + return + //VOREStation Add End + if(mind.current.ajourn && mind.current.stat != DEAD) //check if the corpse is astral-journeying (it's client ghosted using a cultist rune). + var/found_rune + for(var/obj/effect/rune/R in mind.current.loc) //whilst corpse is alive, we can only reenter the body if it's on the rune + if(R && R.word1 == cultwords["hell"] && R.word2 == cultwords["travel"] && R.word3 == cultwords["self"]) // Found an astral journey rune. + found_rune = 1 + break + if(!found_rune) + to_chat(usr, "The astral cord that ties your body and your spirit has been severed. You are likely to wander the realm beyond until your body is finally dead and thus reunited with you.") + return + mind.current.ajourn=0 + mind.current.key = key + mind.current.teleop = null + if(istype(mind.current.loc, /obj/structure/morgue)) + var/obj/structure/morgue/M = mind.current.loc + M.update(1) + else if(istype(mind.current.loc, /obj/structure/closet/body_bag)) + var/obj/structure/closet/body_bag/B = mind.current.loc + B.update(1) + if(!admin_ghosted) + announce_ghost_joinleave(mind, 0, "They now occupy their body again.") + return 1 + +/mob/observer/dead/verb/toggle_medHUD() + set category = "Ghost" + set name = "Toggle MedicHUD" + set desc = "Toggles Medical HUD allowing you to see how everyone is doing" + + medHUD = !medHUD + plane_holder.set_vis(VIS_CH_HEALTH, medHUD) + plane_holder.set_vis(VIS_CH_STATUS_OOC, medHUD) + to_chat(src, "Medical HUD [medHUD ? "Enabled" : "Disabled"]") + +/mob/observer/dead/verb/toggle_secHUD() + set category = "Ghost" + set name = "Toggle Security HUD" + set desc = "Toggles Security HUD allowing you to see people's displayed ID's job, wanted status, etc" + + secHUD = !secHUD + plane_holder.set_vis(VIS_CH_ID, secHUD) + plane_holder.set_vis(VIS_CH_WANTED, secHUD) + plane_holder.set_vis(VIS_CH_IMPTRACK, secHUD) + plane_holder.set_vis(VIS_CH_IMPLOYAL, secHUD) + plane_holder.set_vis(VIS_CH_IMPCHEM, secHUD) + to_chat(src, "Security HUD [secHUD ? "Enabled" : "Disabled"]") + +/mob/observer/dead/verb/toggle_antagHUD() + set category = "Ghost" + set name = "Toggle AntagHUD" + set desc = "Toggles AntagHUD allowing you to see who is the antagonist" + + if(!config.antag_hud_allowed && !client.holder) + to_chat(src, "Admins have disabled this for this round.") + return + if(jobban_isbanned(src, "AntagHUD")) + 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") + if(response == "No") return + can_reenter_corpse = FALSE + set_respawn_timer(-1) // Foreeeever + if(!has_enabled_antagHUD && !client.holder) + has_enabled_antagHUD = TRUE + + antagHUD = !antagHUD + plane_holder.set_vis(VIS_CH_SPECIAL, antagHUD) + to_chat(src, "AntagHUD [antagHUD ? "Enabled" : "Disabled"]") + +/mob/observer/dead/proc/jumpable_areas() + var/list/areas = return_sorted_areas() + if(client?.holder) + return areas + + for(var/area/A as anything in areas) + if(A.z in using_map?.secret_levels) + areas -= A + return areas + +/mob/observer/dead/proc/jumpable_mobs() + var/list/mobs = getmobs() + if(client?.holder) + return mobs + + for(var/key in mobs) + var/mobz = get_z(mobs[key]) + if(mobz in using_map?.secret_levels) + mobs -= key + return mobs + +/mob/observer/dead/proc/dead_tele(var/area/A in jumpable_areas()) + set category = "Ghost" + set name = "Teleport" + set desc = "Teleport to a location" + + if(!istype(usr, /mob/observer/dead)) + 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() + if(!A) + return + + usr.forceMove(pick(get_area_turfs(A))) + usr.on_mob_jump() + +/mob/observer/dead/verb/follow(input in jumpable_mobs()) + 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() + if(!input) + return + + var/target = jumpable_mobs()[input] + if(!target) return + ManualFollow(target) + +/mob/observer/dead/forceMove(atom/destination) + if(client?.holder) + return ..() + + if(get_z(destination) in using_map?.secret_levels) + to_chat(src,SPAN_WARNING("Sorry, that z-level does not allow ghosts.")) + if(following) + stop_following() + return + + return ..() + +/mob/observer/dead/Move(atom/newloc, direct = 0, movetime) + if(client?.holder) + return ..() + + if(get_z(newloc) in using_map?.secret_levels) + to_chat(src,SPAN_WARNING("Sorry, that z-level does not allow ghosts.")) + if(following) + stop_following() + return + + return ..() + +// This is the ghost's follow verb with an argument +/mob/observer/dead/proc/ManualFollow(var/atom/movable/target) + if(!target) + return + + var/turf/targetloc = get_turf(target) + if(check_holy(targetloc)) + to_chat(usr, "You cannot follow a mob standing on holy grounds!") + return + if(get_z(target) in using_map?.secret_levels) + to_chat(src, SPAN_WARNING("Sorry, that target is in an area that ghosts aren't allowed to go.")) + return + if(target != src) + if(following && following == target) + return + following = target + to_chat(src, "Now following [target]") + if(ismob(target)) + forceMove(get_turf(target)) + var/mob/M = target + M.following_mobs += src + else + spawn(0) + while(target && following == target && client) + var/turf/T = get_turf(target) + if(!T) + break + // To stop the ghost flickering. + if(loc != T) + forceMove(T) + sleep(15) + + var/icon/I = icon(target.icon,target.icon_state,target.dir) + + var/orbitsize = (I.Width()+I.Height())*0.5 + orbitsize -= (orbitsize/world.icon_size)*(world.icon_size*0.25) + + var/rot_seg + + /* We don't have this pref yet + switch(ghost_orbit) + if(GHOST_ORBIT_TRIANGLE) + rot_seg = 3 + if(GHOST_ORBIT_SQUARE) + rot_seg = 4 + if(GHOST_ORBIT_PENTAGON) + rot_seg = 5 + if(GHOST_ORBIT_HEXAGON) + rot_seg = 6 + else //Circular + rot_seg = 36 //360/10 bby, smooth enough aproximation of a circle + */ + + orbit(target, orbitsize, FALSE, 20, rot_seg) + +/mob/observer/dead/orbit() + set_dir(2) //reset dir so the right directional sprites show up + return ..() + +/mob/observer/dead/stop_orbit() + . = ..() + //restart our floating animation after orbit is done. + pixel_y = 0 + pixel_x = 0 + transform = null + animate(src, pixel_y = 2, time = 10, loop = -1) + +/mob/observer/dead/proc/stop_following() + following = null + stop_orbit() + +/mob/proc/update_following() + . = get_turf(src) + for(var/mob/observer/dead/M in following_mobs) + if(!.) + M.stop_following() + + if(M.following != src) + following_mobs -= M + else + if(M.loc != .) + M.forceMove(.) + +/mob + var/list/following_mobs = list() + +/mob/Destroy() + for(var/mob/observer/dead/M in following_mobs) + M.stop_following() + following_mobs = null + return ..() + +/mob/observer/dead/Destroy() + if(ismob(following)) + var/mob/M = following + M.following_mobs -= src + stop_following() + return ..() + +/mob/Moved(atom/old_loc, direction, forced = FALSE) + . = ..() + update_following() + +/mob/Life() + // to catch teleports etc which directly set loc + update_following() + return ..() + +/mob/proc/check_holy(var/turf/T) + return 0 + +/mob/observer/dead/check_holy(var/turf/T) + if(check_rights(R_ADMIN|R_FUN|R_EVENT, 0, src)) + return 0 + + 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 + set category = "Ghost" + set name = "Jump to Mob" + set desc = "Teleport to a mob" + set popup_menu = FALSE + + 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() + if(!input) + return + + var/target = jumpable_mobs()[input] + if (!target)//Make sure we actually have a target + return + else + var/mob/M = target //Destination mob + var/turf/T = get_turf(M) //Turf of the destination mob + + if(T && isturf(T)) //Make sure the turf exists, then move the source to that destination. + forceMove(T) + stop_following() + else + to_chat(src, "This mob is not located in the game world.") + +/mob/observer/dead/memory() + set hidden = 1 + to_chat(src, "You are dead! You have no mind to store memory!") + +/mob/observer/dead/add_memory() + set hidden = 1 + to_chat(src, "You are dead! You have no mind to store memory!") + +/mob/observer/dead/Post_Incorpmove() + stop_following() + +/mob/observer/dead/verb/analyze_air() + set name = "Analyze Air" + set category = "Ghost" + + if(!istype(usr, /mob/observer/dead)) return + + // Shamelessly copied from the Gas Analyzers + if (!( istype(usr.loc, /turf) )) + return + + var/datum/gas_mixture/environment = usr.loc.return_air() + + var/pressure = environment.return_pressure() + var/total_moles = environment.total_moles + + to_chat(src, "Results:") + if(abs(pressure - ONE_ATMOSPHERE) < 10) + to_chat(src, "Pressure: [round(pressure,0.1)] kPa") + else + to_chat(src, "Pressure: [round(pressure,0.1)] kPa") + if(total_moles) + for(var/g in environment.gas) + to_chat(src, "[gas_data.name[g]]: [round((environment.gas[g] / total_moles) * 100)]% ([round(environment.gas[g], 0.01)] moles)") + to_chat(src, "Temperature: [round(environment.temperature-T0C,0.1)]°C ([round(environment.temperature,0.1)]K)") + to_chat(src, "Heat Capacity: [round(environment.heat_capacity(),0.1)]") + +/mob/observer/dead/verb/check_radiation() + set name = "Check Radiation" + set category = "Ghost" + + var/turf/t = get_turf(src) + if(t) + var/rads = SSradiation.get_rads_at_turf(t) + to_chat(src, "Radiation level: [rads ? rads : "0"] Bq.") + + +/mob/observer/dead/verb/become_mouse() + set name = "Become mouse" + set category = "Ghost" + + if(config.disable_player_mice) + to_chat(src, "Spawning as a mouse is currently disabled.") + return + + if(!MayRespawn(1)) + return + + var/turf/T = get_turf(src) + if(!T || (T.z in using_map.admin_levels)) + to_chat(src, "You may not spawn as a mouse on this Z-level.") + return + + var/timedifference = world.time - client.time_died_as_mouse + if(client.time_died_as_mouse && timedifference <= mouse_respawn_time * 600) + var/timedifference_text + timedifference_text = time2text(mouse_respawn_time * 600 - timedifference,"mm:ss") + 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!") + if(response != "Squeek!") return //Hit the wrong key...again. + + + //find a viable mouse candidate + var/mob/living/simple_mob/animal/passive/mouse/host + var/obj/machinery/atmospherics/unary/vent_pump/vent_found + var/list/found_vents = list() + for(var/obj/machinery/atmospherics/unary/vent_pump/v in machines) + if(!v.welded && v.z == T.z && v.network && v.network.normal_members.len > 20) + found_vents.Add(v) + if(found_vents.len) + vent_found = pick(found_vents) + host = new /mob/living/simple_mob/animal/passive/mouse(vent_found) + else + to_chat(src, "Unable to find any unwelded vents to spawn mice at.") + + if(host) + if(config.uneducated_mice) + host.universal_understand = 0 + announce_ghost_joinleave(src, 0, "They are now a mouse.") + host.ckey = src.ckey + host.add_ventcrawl(vent_found) + to_chat(host, "You are now a mouse. Try to avoid interaction with players, and do not give hints away that you are more than a simple rodent.") + +/mob/observer/dead/verb/view_manfiest() + set name = "Show Crew Manifest" + set category = "Ghost" + + var/dat + dat += "

Crew Manifest

" + dat += data_core.get_manifest() + + src << browse(dat, "window=manifest;size=370x420;can_close=1") + +//This is called when a ghost is drag clicked to something. +/mob/observer/dead/MouseDrop(atom/over) + if(!usr || !over) return + if (isobserver(usr) && usr.client && usr.client.holder && isliving(over)) + if (usr.client.holder.cmd_ghost_drag(src,over)) + return + + return ..() + +//Used for drawing on walls with blood puddles as a spooky ghost. +/mob/observer/dead/verb/bloody_doodle() + + set category = "Ghost" + set name = "Write in blood" + set desc = "If the round is sufficiently spooky, write a short message in blood on the floor or a wall. Remember, no IC in OOC or OOC in IC." + + if(!(config.cult_ghostwriter)) + to_chat(src, "That verb is not currently permitted.") + return + + if (!src.stat) + return + + if (usr != src) + return 0 //something is terribly wrong + + var/ghosts_can_write + if(ticker.mode.name == "cult") + if(cult.current_antagonists.len > config.cult_ghostwriter_req_cultists) + ghosts_can_write = 1 + + if(!ghosts_can_write && !check_rights(R_ADMIN|R_EVENT|R_FUN, 0)) //Let's allow for admins to write in blood for events and the such. + to_chat(src, "The veil is not thin enough for you to do that.") + return + + var/list/choices = list() + for(var/obj/effect/decal/cleanable/blood/B in view(1,src)) + if(B.amount > 0) + choices += B + + if(!choices.len) + to_chat(src, "There is no blood to use nearby.") + return + + var/obj/effect/decal/cleanable/blood/choice = input(src,"What blood would you like to use?") in null|choices + + var/direction = input(src,"Which way?","Tile selection") as anything in list("Here","North","South","East","West") + var/turf/simulated/T = src.loc + if (direction != "Here") + T = get_step(T,text2dir(direction)) + + if (!istype(T)) + to_chat(src, "You cannot doodle there.") + return + + if(!choice || choice.amount == 0 || !(src.Adjacent(choice))) + return + + var/doodle_color = (choice.basecolor) ? choice.basecolor : "#A10808" + + var/num_doodles = 0 + for (var/obj/effect/decal/cleanable/blood/writing/W in T) + num_doodles++ + if (num_doodles > 4) + to_chat(src, "There is no space to write on!") + return + + var/max_length = 50 + + var/message = sanitize(input("Write a message. It cannot be longer than [max_length] characters.","Blood writing", "")) + + if (message) + + if (length(message) > max_length) + message += "-" + to_chat(src, "You ran out of blood to write with!") + + var/obj/effect/decal/cleanable/blood/writing/W = new(T) + W.basecolor = doodle_color + W.update_icon() + W.message = message + W.add_hiddenprint(src) + W.visible_message("Invisible fingers crudely paint something in blood on [T]...") + +/mob/observer/dead/pointed(atom/A as mob|obj|turf in view()) + if(!..()) + return 0 + usr.visible_message("[src] points to [A]") + return 1 + +/mob/observer/dead/proc/manifest(mob/user) + is_manifest = TRUE + verbs |= /mob/observer/dead/proc/toggle_visibility + verbs |= /mob/observer/dead/proc/ghost_whisper + to_chat(src, "As you are now in the realm of the living, you can whisper to the living with the Spectral Whisper verb, inside the IC tab.") + if(plane != PLANE_WORLD) + user.visible_message( \ + "\The [user] drags ghost, [src], to our plane of reality!", \ + "You drag [src] to our plane of reality!" \ + ) + toggle_visibility(TRUE) + else + var/datum/gender/T = gender_datums[user.get_visible_gender()] + user.visible_message ( \ + "\The [user] just tried to smash [T.his] book into that ghost! It's not very effective.", \ + "You get the feeling that the ghost can't become any more visible." \ + ) + +/mob/observer/dead/proc/toggle_icon(var/icon) + if(!client) + return + + var/iconRemoved = 0 + for(var/image/I in client.images) + if(I.icon_state == icon) + iconRemoved = 1 + qdel(I) + + if(!iconRemoved) + var/image/J = image('icons/mob/mob.dmi', loc = src, icon_state = icon) + client.images += J + +/mob/observer/dead/proc/toggle_visibility(var/forced = 0) + set category = "Ghost" + set name = "Toggle Visibility" + set desc = "Allows you to turn (in)visible (almost) at will." + + var/toggled_invisible + if(!forced && plane == PLANE_GHOSTS && world.time < toggled_invisible + 600) + to_chat(src, "You must gather strength before you can turn visible again...") + return + + if(plane == PLANE_WORLD) + toggled_invisible = world.time + visible_message("It fades from sight...", "You are now invisible.") + else + to_chat(src, "You are now visible!") + + plane = (plane == PLANE_GHOSTS) ? PLANE_WORLD : PLANE_GHOSTS + invisibility = (plane == PLANE_WORLD) ? 0 : INVISIBILITY_OBSERVER + + // Give the ghost a cult icon which should be visible only to itself + toggle_icon("cult") + +/mob/observer/dead/verb/toggle_anonsay() + set category = "Ghost" + set name = "Toggle Anonymous Chat" + set desc = "Toggles showing your key in dead chat." + + src.anonsay = !src.anonsay + if(anonsay) + to_chat(src, "Your key won't be shown when you speak in dead chat.") + else + to_chat(src, "Your key will be publicly visible again.") + +/mob/observer/dead/canface() + return 1 + +/mob/observer/dead/proc/can_admin_interact() + return check_rights(R_ADMIN|R_EVENT, 0, src) + +/mob/observer/dead/verb/toggle_ghostsee() + set name = "Toggle Ghost Vision" + set desc = "Toggles your ability to see things only ghosts can see, like other ghosts" + set category = "Ghost" + ghostvision = !ghostvision + updateghostsight() + to_chat(src, "You [ghostvision ? "now" : "no longer"] have ghost vision.") + +/mob/observer/dead/verb/toggle_darkness() + set name = "Toggle Darkness" + set desc = "Toggles your ability to see lighting overlays, and the darkness they create." + set category = "Ghost" + seedarkness = !seedarkness + updateghostsight() + to_chat(src, "You [seedarkness ? "now" : "no longer"] see darkness.") + +/mob/observer/dead/proc/updateghostsight() + plane_holder.set_vis(VIS_FULLBRIGHT, !seedarkness) //Inversion, because "not seeing" the darkness is "seeing" the lighting plane master. + plane_holder.set_vis(VIS_GHOSTS, ghostvision) + +/mob/observer/dead/MayRespawn(var/feedback = 0) + if(!client) + return 0 + if(mind && mind.current && mind.current.stat != DEAD && can_reenter_corpse) + if(feedback) + to_chat(src, "Your non-dead body prevent you from respawning.") + return 0 + if(config.antag_hud_restricted && has_enabled_antagHUD == 1) + if(feedback) + to_chat(src, "antagHUD restrictions prevent you from respawning.") + return 0 + return 1 + +/atom/proc/extra_ghost_link() + return + +/mob/extra_ghost_link(var/atom/ghost) + if(client && eyeobj) + return "|eye" + +/mob/observer/dead/extra_ghost_link(var/atom/ghost) + if(mind && mind.current) + return "|body" + +/proc/ghost_follow_link(var/atom/target, var/atom/ghost) + if((!target) || (!ghost)) return + . = "follow" + . += target.extra_ghost_link(ghost) + +//Culted Ghosts + +/mob/observer/dead/proc/ghost_whisper() + set name = "Spectral Whisper" + set category = "IC" + + if(is_manifest) //Only able to whisper if it's hit with a tome. + var/list/options = list() + for(var/mob/living/Ms in view(src)) + options += Ms + var/mob/living/M = input(src, "Select who to whisper to:", "Whisper to?", null) as null|mob in options + if(!M) + return 0 + var/msg = sanitize(input(src, "Message:", "Spectral Whisper") as text|null) + if(msg) + log_say("(SPECWHISP to [key_name(M)]): [msg]", src) + to_chat(M, " You hear a strange, unidentifiable voice in your head... [msg]") + to_chat(src, " You said: '[msg]' to [M].") + else + return + return 1 + else + to_chat(src, "You have not been pulled past the veil!") + +/mob/observer/dead/verb/choose_ghost_sprite() + set category = "Ghost" + set name = "Choose Sprite" + + var/choice + var/previous_state + 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 + if(!choice) + return + + if(choice) + icon = 'icons/mob/ghost.dmi' + cut_overlays() + + if(icon_state && icon) + 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") + + ghost_sprite = possible_ghost_sprites[choice] + + if(finalized == "No") + icon_state = previous_state + +/mob/observer/dead/is_blind() + return FALSE + +/mob/observer/dead/is_deaf() + return FALSE + +/mob/observer/dead/verb/paialert() + set category = "Ghost" + set name = "Blank pAI alert" + set desc = "Flash an indicator light on available blank pAI devices for a smidgen of hope." + + if(usr.client.prefs?.be_special & BE_PAI) + var/count = 0 + for(var/obj/item/device/paicard/p in all_pai_cards) + var/obj/item/device/paicard/PP = p + if(PP.pai == null) + count++ + PP.icon = 'icons/obj/pda_vr.dmi' // VOREStation Edit + PP.add_overlay("pai-ghostalert") + spawn(54) + PP.cut_overlays() + to_chat(usr,"Flashing the displays of [count] unoccupied PAIs.") + else + to_chat(usr,"You have 'Be pAI' disabled in your character prefs, so we can't help you.") + +/mob/observer/dead/speech_bubble_appearance() + return "ghost" + +// Lets a ghost know someone's trying to bring them back, and for them to get into their body. +// Mostly the same as TG's sans the hud element, since we don't have TG huds. +/mob/observer/dead/proc/notify_revive(var/message, var/sound, flashwindow = TRUE, var/atom/source) + if((last_revive_notification + 2 MINUTES) > world.time) + return + last_revive_notification = world.time + + if(flashwindow) + window_flash(client) + if(message) + to_chat(src, "[message]") + if(source) + throw_alert("\ref[source]_notify_revive", /obj/screen/alert/notify_cloning, new_master = source) + to_chat(src, "(Click to re-enter)") + if(sound) + SEND_SOUND(src, sound(sound)) + +/mob/observer/dead/verb/respawn() + set name = "Respawn" + set category = "Ghost" + src.abandon_mob() diff --git a/code/modules/mob/living/bot/mulebot.dm b/code/modules/mob/living/bot/mulebot.dm index d36dda3cd24..ea4f8343ae9 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("No destination beacons available.") + alert(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("No destination beacons available.") + alert(usr, "No destination beacons available.") if(new_dest) resetTarget() target = get_turf(beaconlist[new_dest]) diff --git a/code/modules/mob/living/carbon/alien/larva/progression.dm b/code/modules/mob/living/carbon/alien/larva/progression.dm index 4e9c15552f2..09f1330466e 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.",,"Hunter","Sentinel","Drone") + var/alien_caste = alert(src, "Please choose which alien caste you shall belong to.","Alien Choice","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/human/species/station/station_special_abilities_vr.dm b/code/modules/mob/living/carbon/human/species/station/station_special_abilities_vr.dm index f100a5fe3c3..e4942458028 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 @@ -721,13 +721,13 @@ if(!T_ext) //Picking something here is critical. return if(T_ext.vital) - if(alert("Are you sure you wish to severely damage their [T_ext]? It will likely kill [T]...",,"Yes", "No") != "Yes") + if(alert(usr, "Are you sure you wish to severely damage their [T_ext]? It will likely kill [T]...","Shred Limb","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("Are you sure you wish to severely damage their [T_int]? It will likely kill [T]...",,"Yes", "No") != "Yes") + if(alert(usr, "Are you sure you wish to severely damage their [T_int]? It will likely kill [T]...","Shred Limb","Yes", "No") != "Yes") return //If they reconsider, don't continue. //And a belly, if they want diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index a4789aa7250..b165f6c1494 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("Are you sure you want to call the shuttle?", "Confirm Shuttle Call", "Yes", "No") + var/confirm = alert(usr, "Are you sure you want to call the shuttle?", "Confirm Shuttle Call", "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("Are you sure you want to recall the shuttle?", "Confirm Shuttle Recall", "Yes", "No") + var/confirm = alert(usr, "Are you sure you want to recall the shuttle?", "Confirm Shuttle Recall", "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("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?",,"Crew Member","Unique","My Character") + 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") 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("No suitable records found. Aborting.") + alert(usr, "No suitable records found. Aborting.") if("My Character") //Loaded character slot if(!client || !client.prefs) return diff --git a/code/modules/mob/living/silicon/ai/latejoin.dm b/code/modules/mob/living/silicon/ai/latejoin.dm index e953c095971..7fa82e8ae33 100644 --- a/code/modules/mob/living/silicon/ai/latejoin.dm +++ b/code/modules/mob/living/silicon/ai/latejoin.dm @@ -20,7 +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("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?", + 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") return diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm index 6ade1a65216..57e25d32d73 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("Look at your sprite. Is this what you wish to use?",,"No","Yes") + finalized = alert(usr, "Look at your sprite. Is this what you wish to use?","Choose Chassis","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]?",,"Add Access","Remove Access", "Cancel")) + switch(alert(user, "Do you wish to add access to [src] or remove access from [src]?","Access Modify","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,7 +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("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?", + 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") return 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 cfb7b2dd810..0c998b7b542 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("Do you wish to take control of \the [src]?", "Platform Control", "No", "Yes") + var/confirm = alert(usr, "Do you wish to take control of \the [src]?", "Platform Control", "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 1c1321a715d..58e47f15db7 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("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.") + 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.") 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/modular_computers/file_system/programs/generic/file_browser.dm b/code/modules/modular_computers/file_system/programs/generic/file_browser.dm index 13a137993e1..784b6ac039a 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("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 && (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")) 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 61f3b43da8b..988e7b5a844 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("Would you like to save your changes first?",,"Yes","No") == "Yes") + if(alert(usr, "Would you like to save your changes first?","Save Changes","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("Would you like to save your changes first?",,"Yes","No") == "Yes") + if(alert(usr, "Would you like to save your changes first?","Save Changes","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/paperwork/adminpaper.dm b/code/modules/paperwork/adminpaper.dm index 143635c0013..b10b88f4104 100644 --- a/code/modules/paperwork/adminpaper.dm +++ b/code/modules/paperwork/adminpaper.dm @@ -118,7 +118,7 @@ return if(href_list["confirm"]) - switch(alert("Are you sure you want to send the fax as is?",, "Yes", "No")) + switch(alert(usr, "Are you sure you want to send the fax as is?","Send Fax", "Yes", "No")) if("Yes") if(headerOn) info = header + info diff --git a/code/modules/random_map/drop/droppod.dm b/code/modules/random_map/drop/droppod.dm index 454eb1cc042..cf465154a51 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("Do you wish the mob to have a player?",,"No","Yes") == "No") + if(alert(usr, "Do you wish the mob to have a player?","Assign Player?","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("Are you SURE you wish to deploy this drop pod? It will cause a sizable explosion and gib anyone underneath it.",,"No","Yes") == "No") + 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(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 18cc90d08e7..666b419656f 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("Do you wish to supply a custom loot list?",,"No","Yes") + var/choice = alert(usr, "Do you wish to supply a custom loot list?","Supply Drop","No","Yes") if(choice == "Yes") chosen_loot_types = list() - choice = alert("Do you wish to add mobs?",,"No","Yes") + choice = alert(usr, "Do you wish to add mobs?","Supply Drop","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("Do you wish to add structures or machines?",,"No","Yes") + choice = alert(usr, "Do you wish to add structures or machines?","Supply Drop","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("Do you wish to add any non-weapon items?",,"No","Yes") + choice = alert(usr, "Do you wish to add any non-weapon items?","Supply Drop","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("Do you wish to add weapons?",,"No","Yes") + choice = alert(usr, "Do you wish to add weapons?","Supply Drop","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("Do you wish to add ABSOLUTELY ANYTHING ELSE? (you really shouldn't need to)",,"No","Yes") + choice = alert(usr, "Do you wish to add ABSOLUTELY ANYTHING ELSE? (you really shouldn't need to)","Supply Drop","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("Do you wish to specify a loot type?",,"No","Yes") + choice = alert(usr, "Do you wish to specify a loot type?","Supply Drop","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("Are you SURE you wish to deploy this supply drop? It will cause a sizable explosion and gib anyone underneath it.",,"No","Yes") + 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") 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 f94bcd45894..db6a2d153b7 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("Do you wish to customise the map?",,"Yes","No") == "Yes") + if(alert(usr, "Do you wish to customise the map?","Customize","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 e165877041f..a2d941cca8f 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("Are you sure you want to disconnect [AC]?", "Confirm", "Yes", "No") + var/choice = alert(usr, "Are you sure you want to disconnect [AC]?", "Confirm", "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("Are you sure you want to disconnect [AC]?", "Confirm", "Yes", "No") + var/confirm = alert(usr, "Are you sure you want to disconnect [AC]?", "Confirm", "Yes", "No") if(confirm == "Yes" && Adjacent(user)) visible_message("[user] disconnects \the hose from \the [src].") diff --git a/code/modules/recycling/sortingmachinery.dm b/code/modules/recycling/sortingmachinery.dm index 05f7f28a0d8..36c71882fb9 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("What would you like to alter?",,"Title","Description", "Cancel")) + switch(alert(usr, "What would you like to alter?","Select Alteration","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("What would you like to alter?",,"Title","Description", "Cancel")) + switch(alert(usr, "What would you like to alter?","Select Alteration","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 6d7d0fb8bf2..e5b2a05bb4f 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("Proceeding will destroy loaded item. Continue?", "Destructive analyzer confirmation", "Yes", "No") == "No" || !linked_destroy) + if(alert(usr, "Proceeding will destroy loaded item. Continue?", "Destructive analyzer confirmation", "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("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 = 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") if(choice == "Continue") busy_msg = "Updating Database..." qdel(files) diff --git a/code/modules/research/server.dm b/code/modules/research/server.dm index 700e1d90407..b0101e846da 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("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 = 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") 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("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 = 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") if(choice == "Continue") for(var/datum/design/D in target.files.known_designs) if(D.id == params["design"]) diff --git a/code/modules/resleeving/infomorph.dm b/code/modules/resleeving/infomorph.dm index f9bc21804a4..c149dc7805c 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]?",,"Add Access","Remove Access", "Cancel")) + switch(alert(user, "Do you wish to add access to [src] or remove access from [src]?","Modify Access","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,7 +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("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?", + 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") return diff --git a/code/modules/shuttles/shuttles_web.dm b/code/modules/shuttles/shuttles_web.dm index 1112a384fe4..6eca24d7c61 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("The shuttle is currently docked! Please undock before continuing.","Error","Cancel","Force Launch") + var/choice = alert(usr, "The shuttle is currently docked! Please undock before continuing.","Error","Cancel","Force Launch") if(choice == "Cancel") return 0 - choice = alert("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 = 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") if(choice == "Cancel") return 0 diff --git a/code/modules/tgui/modules/agentcard.dm b/code/modules/tgui/modules/agentcard.dm index 7d35a9bc4a3..15a0a6d49b4 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("This will factory reset the card, including access and owner. Continue?", "Factory Reset", "No", "Yes") == "Yes" && tgui_status(usr, state) == STATUS_INTERACTIVE) + 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) 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 7166a3db617..572f354dfaf 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("Are you sure you wish to recall the shuttle?", "Confirm", "Yes", "No") + var/response = alert(usr, "Are you sure you wish to recall the shuttle?", "Confirm", "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("Are you sure you wish to delete this message?", "Confirm", "Yes", "No") + var/response = alert(usr, "Are you sure you wish to delete this message?", "Confirm", "Yes", "No") if(response == "Yes") if(current_viewing_message) if(l != global_message_listener) diff --git a/code/modules/virus2/admin.dm b/code/modules/virus2/admin.dm index 080674bd446..b322f8775a5 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("Which spread type?", "Spread Type", "Contact", "Airborne", "Blood") + var/S = alert(usr, "Which spread type?", "Spread Type", "Contact", "Airborne", "Blood") if(!S) return spreadtype = S if("speed") @@ -193,7 +193,7 @@ species |= infectee.species.get_bodytype() if("go") if(!antigens.len) - var/a = alert("This disease has no antigens; it will be impossible to permanently immunise anyone without them.\ + 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") if(a == "Yes") return var/datum/disease2/disease/D = new diff --git a/code/modules/vore/eating/silicon_vr.dm b/code/modules/vore/eating/silicon_vr.dm index cdac79c3760..48ed2a4faee 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("You can only contain one person. [hologram.bellied] is in you.", "Already Full", "Drop Mob", "Cancel") + var/choice = alert(usr, "You can only contain one person. [hologram.bellied] is in you.", "Already Full", "Drop Mob", "Cancel") if(choice == "Drop Mob") hologram.drop_prey() return diff --git a/code/modules/vore/eating/vorepanel_vr.dm b/code/modules/vore/eating/vorepanel_vr.dm index a54987f6155..aeb5520c1e9 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("These control how your belly responds to someone using 'resist' while inside you. The percent chance to trigger each is listed below, \ + 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, \ @@ -305,17 +305,17 @@ if("saveprefs") if(!host.save_vore_prefs()) - alert("ERROR: Virgo-specific preferences failed to save!","Error") + alert(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("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 = 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") if(alert != "Reload") return FALSE if(!host.apply_vore_prefs()) - alert("ERROR: Virgo-specific preferences failed to apply!","Error") + alert(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("Entered flavor/taste text too long. [FLAVOR_MAX] character limit.","Error!") + alert(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("Entered perfume/smell text too long. [FLAVOR_MAX] character limit.","Error!") + alert(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("What do you want to do to them?","Query","Examine","Help Out","Devour") + intent = alert(usr, "What do you want to do to them?","Query","Examine","Help Out","Devour") else if(istype(target, /obj/item)) - intent = alert("What do you want to do to that?","Query","Examine","Use Hand") + intent = alert(usr, "What do you want to do to that?","Query","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("Eject all, Move all?","Query","Eject all","Cancel","Move all") + intent = alert(usr, "Eject all, Move all?","Query","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("No belly selected to modify.") + alert(usr, "No belly selected to modify.") return FALSE var/attr = params["attribute"] @@ -685,7 +685,7 @@ if(new_desc) new_desc = readd_quotes(new_desc) if(length(new_desc) > BELLIES_DESC_MAX) - alert("Entered belly desc too long. [BELLIES_DESC_MAX] character limit.","Error") + alert(usr, "Entered belly desc too long. [BELLIES_DESC_MAX] character limit.","Error") return FALSE host.vore_selected.desc = new_desc . = TRUE @@ -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("Entered verb length invalid (must be longer than [BELLIES_NAME_MIN], no longer than [BELLIES_NAME_MAX]).","Error") + alert(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("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 + 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 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("Are you sure you want to delete your [lowertext(host.vore_selected.name)]?","Confirmation","Delete","Cancel") + var/alert = alert(usr, "Are you sure you want to delete your [lowertext(host.vore_selected.name)]?","Confirmation","Delete","Cancel") if(!(alert == "Delete")) return FALSE diff --git a/code/modules/xenoarcheaology/tools/artifact_harvester.dm b/code/modules/xenoarcheaology/tools/artifact_harvester.dm index a53d3b12526..bb6db8b8b88 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("This action will dump all charge, safety gear is recommended before proceeding","Warning","Continue","Cancel")) + if(alert(usr, "This action will dump all charge, safety gear is recommended before proceeding","Warning","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 26645416d4c..1455ef87374 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("What do you want to do with the nanopaste?","Radiometric Scanner","Scan nanopaste","Fix seal integrity") + var/choice = alert(usr, "What do you want to do with the nanopaste?","Radiometric Scanner","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("What do you want to do with the container?","Radiometric Scanner","Add coolant","Empty coolant","Scan container") + var/choice = alert(usr, "What do you want to do with the container?","Radiometric Scanner","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/interface/interface.dm b/interface/interface.dm index e1fc8988ef3..48892303114 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("This will open the forum in your browser. Are you sure?",,"Yes","No")=="No") + if(alert(usr, "This will open the forum in your browser. Are you sure?","Visit Website","Yes","No")=="No") return src << link(config.forumurl) else @@ -34,7 +34,7 @@ set hidden = 1 if(config.rulesurl) - if(alert("This will open the rules in your browser. Are you sure?",,"Yes","No")=="No") + if(alert(usr, "This will open the rules in your browser. Are you sure?","Visit Website","Yes","No")=="No") return src << link(config.rulesurl) else @@ -47,7 +47,7 @@ set hidden = 1 if(config.mapurl) - if(alert("This will open the map in your browser. Are you sure?",,"Yes","No")=="No") + if(alert(usr, "This will open the map in your browser. Are you sure?","Visit Website","Yes","No")=="No") return src << link(config.mapurl) else @@ -60,7 +60,7 @@ set hidden = 1 if(config.githuburl) - if(alert("This will open the GitHub in your browser. Are you sure?",,"Yes","No")=="No") + if(alert(usr, "This will open the GitHub in your browser. Are you sure?","Visit Website","Yes","No")=="No") return src << link(config.githuburl) else diff --git a/maps/tether/tether_things.dm b/maps/tether/tether_things.dm index ad9df65509b..f5cdceb181e 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("Do you want to depart via the tram? Your character will leave the round.","Departure","Yes","No") + var/choice = alert(usr, "Do you want to depart via the tram? Your character will leave the round.","Departure","Yes","No") if(user && Adjacent(user) && choice == "Yes") var/mob/observer/dead/newghost = user.ghostize() newghost.timeofdeath = world.time