diff --git a/baystation12.dme b/baystation12.dme index 4b86c0bcd8c..62e10d20980 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -169,7 +169,6 @@ #include "code\defines\procs\admin.dm" #include "code\defines\procs\announce.dm" #include "code\defines\procs\AStar.dm" -#include "code\defines\procs\command_alert.dm" #include "code\defines\procs\dbcore.dm" #include "code\defines\procs\hud.dm" #include "code\defines\procs\radio.dm" diff --git a/code/defines/procs/announce.dm b/code/defines/procs/announce.dm index cc58307c9d4..34896cb96b6 100644 --- a/code/defines/procs/announce.dm +++ b/code/defines/procs/announce.dm @@ -31,17 +31,19 @@ title = "Security Announcement" announcement_type = "Security Announcement" -/datum/announcement/proc/Announce(var/message as text, var/new_title = "") +/datum/announcement/proc/Announce(var/message as text, var/new_title = "", var/new_sound = null, var/do_newscast = newscast) if(!message) return var/tmp/message_title = new_title ? new_title : title + var/tmp/message_sound = new_sound ? sound(new_sound) : sound message = html_encode(message) message_title = html_encode(message_title) Message(message, message_title) - NewsCast(message, message_title) - Sound() + if(do_newscast) + NewsCast(message, message_title) + Sound(message_sound) Log(message, message_title) datum/announcement/proc/Message(message as text, message_title as text) @@ -90,27 +92,27 @@ datum/announcement/proc/NewsCast(message as text, message_title as text) news.can_be_redacted = 0 announce_newscaster_news(news) -datum/announcement/proc/PlaySound() - if(!sound) +datum/announcement/proc/PlaySound(var/message_sound) + if(!message_sound) return for(var/mob/M in player_list) if(!istype(M,/mob/new_player) && !isdeaf(M)) - M << sound + M << message_sound -datum/announcement/proc/Sound() - PlaySound() +datum/announcement/proc/Sound(var/message_sound) + PlaySound(message_sound) -datum/announcement/priority/Sound() +datum/announcement/priority/Sound(var/message_sound) if(sound) world << sound -datum/announcement/priority/command/Sound() - PlaySound() +datum/announcement/priority/command/Sound(var/message_sound) + PlaySound(message_sound) datum/announcement/proc/Log(message as text, message_title as text) if(log) - log_say("[key_name(usr)] has made a(n) [announcement_type]: [message_title] - [message] - [announcer]") - message_admins("[key_name_admin(usr)] has made a(n) [announcement_type].", 1) + log_say("[key_name(usr)] has made \a [announcement_type]: [message_title] - [message] - [announcer]") + message_admins("[key_name_admin(usr)] has made \a [announcement_type].", 1) /proc/GetNameAndAssignmentFromId(var/obj/item/weapon/card/id/I) // Format currently matches that of newscaster feeds: Registered Name (Assigned Rank) diff --git a/code/defines/procs/command_alert.dm b/code/defines/procs/command_alert.dm deleted file mode 100644 index 6545307fa1a..00000000000 --- a/code/defines/procs/command_alert.dm +++ /dev/null @@ -1,11 +0,0 @@ -/proc/command_alert(var/text, var/title = "") - var/command - command += "

[command_name()] Update

" - if (title && length(title) > 0) - command += "

[html_encode(title)]

" - - command += "
[html_encode(text)]
" - command += "
" - for(var/mob/M in player_list) - if(!istype(M,/mob/new_player)) - M << command diff --git a/code/game/gamemodes/events.dm b/code/game/gamemodes/events.dm index 51bcc39a37c..2fa881b5b66 100644 --- a/code/game/gamemodes/events.dm +++ b/code/game/gamemodes/events.dm @@ -178,9 +178,7 @@ H.viruses += D break spawn(rand(1500, 3000)) //Delayed announcements to keep the crew on their toes. - command_alert("Confirmed outbreak of level 7 viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert") - for(var/mob/M in player_list) - M << sound('sound/AI/outbreak7.ogg') + command_announcement.Announce("Confirmed outbreak of level 7 viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", new_sound = 'sound/AI/outbreak7.ogg') /proc/alien_infestation(var/spawncount = 1) // -- TLE //command_alert("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert") @@ -207,9 +205,7 @@ spawncount-- spawn(rand(5000, 6000)) //Delayed announcements to keep the crew on their toes. - command_alert("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert") - for(var/mob/M in player_list) - M << sound('sound/AI/aliens.ogg') + command_announcement.Announce("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert", new_sound = 'sound/AI/aliens.ogg') /proc/high_radiation_event() @@ -245,9 +241,7 @@ continue M.apply_effect((rand(15,75)),IRRADIATE,0) sleep(100) - command_alert("High levels of radiation detected near the station. Please report to the Med-bay if you feel strange.", "Anomaly Alert") - for(var/mob/M in player_list) - M << sound('sound/AI/radiation.ogg') + command_announcement.Announce("High levels of radiation detected near the station. Please report to the Med-bay if you feel strange.", "Anomaly Alert", new_sound = 'sound/AI/radiation.ogg') @@ -286,7 +280,7 @@ temp_timer.releasetime = 1 sleep(150) - command_alert("Gr3y.T1d3 virus detected in [station_name()] imprisonment subroutines. Recommend station AI involvement.", "Security Alert") + command_announcement.Announce("Gr3y.T1d3 virus detected in [station_name()] imprisonment subroutines. Recommend station AI involvement.", "Security Alert") else world.log << "ERROR: Could not initate grey-tide. Unable find prison or brig area." @@ -296,13 +290,11 @@ new /mob/living/simple_animal/hostile/carp(C.loc) //sleep(100) spawn(rand(300, 600)) //Delayed announcements to keep the crew on their toes. - command_alert("Unknown biological entities have been detected near [station_name()], please stand-by.", "Lifesign Alert") - for(var/mob/M in player_list) - M << sound('sound/AI/commandreport.ogg') + command_announcement.Announce("Unknown biological entities have been detected near [station_name()], please stand-by.", "Lifesign Alert", new_sound = 'sound/AI/commandreport.ogg') /proc/lightsout(isEvent = 0, lightsoutAmount = 1,lightsoutRange = 25) //leave lightsoutAmount as 0 to break ALL lights if(isEvent) - command_alert("An Electrical storm has been detected in your area, please repair potential electronic overloads.","Electrical Storm Alert") + command_announcement.Announce("An Electrical storm has been detected in your area, please repair potential electronic overloads.","Electrical Storm Alert") if(lightsoutAmount) var/list/epicentreList = list() diff --git a/code/game/gamemodes/events/clang.dm b/code/game/gamemodes/events/clang.dm index c74da4010e9..8e7bd03a7dc 100644 --- a/code/game/gamemodes/events/clang.dm +++ b/code/game/gamemodes/events/clang.dm @@ -86,4 +86,4 @@ In my current plan for it, 'solid' will be defined as anything with density == 1 for(var/obj/effect/immovablerod/imm in world) return sleep(50) - command_alert("What the fuck was that?!", "General Alert") \ No newline at end of file + command_announcement.Announce("What the fuck was that?!", "General Alert") diff --git a/code/game/gamemodes/events/miniblob.dm b/code/game/gamemodes/events/miniblob.dm index 663dff0f2ed..127e877e96b 100644 --- a/code/game/gamemodes/events/miniblob.dm +++ b/code/game/gamemodes/events/miniblob.dm @@ -12,10 +12,7 @@ spawn(3000) blobevent = 0 spawn(rand(1000, 2000)) //Delayed announcements to keep the crew on their toes. - command_alert("Confirmed outbreak of level 5 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert") - for(var/mob/M in player_list) - if(!istype(M,/mob/new_player)) - M << sound('sound/AI/outbreak5.ogg') + command_announcement.Announce("Confirmed outbreak of level 5 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", new_sound = 'sound/AI/outbreak5.ogg') /proc/dotheblobbaby() if (blobevent) diff --git a/code/game/gamemodes/events/power_failure.dm b/code/game/gamemodes/events/power_failure.dm index 802b2f7ca9c..87dd5f335c0 100644 --- a/code/game/gamemodes/events/power_failure.dm +++ b/code/game/gamemodes/events/power_failure.dm @@ -1,12 +1,10 @@ /proc/power_failure(var/announce = 1) if(announce) - command_alert("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, the station's power will be shut off for an indeterminate duration.", "Critical Power Failure") - for(var/mob/M in player_list) - M << sound('sound/AI/poweroff.ogg') - + command_announcement.Announce("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, the station's power will be shut off for an indeterminate duration.", "Critical Power Failure", new_sound = 'sound/AI/poweroff.ogg') + var/list/skipped_areas = list(/area/turret_protected/ai) - + for(var/obj/machinery/power/smes/S in world) var/area/current_area = get_area(S) if(current_area.type in skipped_areas || S.z != 1) @@ -20,18 +18,16 @@ S.updateicon() S.power_change() - + for(var/obj/machinery/power/apc/C in world) if(C.cell && C.z == 1) C.cell.charge = 0 /proc/power_restore(var/announce = 1) var/list/skipped_areas = list(/area/turret_protected/ai) - + if(announce) - command_alert("Power has been restored to [station_name()]. We apologize for the inconvenience.", "Power Systems Nominal") - for(var/mob/M in player_list) - M << sound('sound/AI/poweron.ogg') + command_announcement.Announce("Power has been restored to [station_name()]. We apologize for the inconvenience.", "Power Systems Nominal", new_sound = 'sound/AI/poweron.ogg') for(var/obj/machinery/power/apc/C in world) if(C.cell && C.z == 1) C.cell.charge = C.cell.maxcharge @@ -48,9 +44,7 @@ /proc/power_restore_quick(var/announce = 1) if(announce) - command_alert("All SMESs on [station_name()] have been recharged. We apologize for the inconvenience.", "Power Systems Nominal") - for(var/mob/M in player_list) - M << sound('sound/AI/poweron.ogg') + command_announcement.Announce("All SMESs on [station_name()] have been recharged. We apologize for the inconvenience.", "Power Systems Nominal", new_sound = 'sound/AI/poweron.ogg') for(var/obj/machinery/power/smes/S in world) if(S.z != 1) continue diff --git a/code/game/gamemodes/events/wormholes.dm b/code/game/gamemodes/events/wormholes.dm index 1ef19e24ac7..311f6e56250 100644 --- a/code/game/gamemodes/events/wormholes.dm +++ b/code/game/gamemodes/events/wormholes.dm @@ -7,10 +7,7 @@ if(pick_turfs.len) //All ready. Announce that bad juju is afoot. - command_alert("Space-time anomalies detected on the station. There is no additional data.", "Anomaly Alert") - for(var/mob/M in player_list) - if(!istype(M,/mob/new_player)) - M << sound('sound/AI/spanomalies.ogg') + command_announcement.Announce("Space-time anomalies detected on the station. There is no additional data.", "Anomaly Alert", new_sound = 'sound/AI/spanomalies.ogg') //prob(20) can be approximated to 1 wormhole every 5 turfs! //admittedly less random but totally worth it >_< diff --git a/code/game/gamemodes/malfunction/malfunction.dm b/code/game/gamemodes/malfunction/malfunction.dm index 2fb432d119a..238fe6b12de 100644 --- a/code/game/gamemodes/malfunction/malfunction.dm +++ b/code/game/gamemodes/malfunction/malfunction.dm @@ -165,16 +165,12 @@ if (alert(usr, "Are you sure you wish to initiate the takeover? The station hostile runtime detection software is bound to alert everyone. You have hacked [ticker.mode:apcs] APCs.", "Takeover:", "Yes", "No") != "Yes") return - command_alert("Hostile runtimes detected in all station systems, please deactivate your AI to prevent possible damage to its morality core.", "Anomaly Alert") + command_announcement.Announce("Hostile runtimes detected in all station systems, please deactivate your AI to prevent possible damage to its morality core.", "Anomaly Alert", new_sound = 'sound/AI/aimalf.ogg') set_security_level("delta") ticker.mode:malf_mode_declared = 1 for(var/datum/mind/AI_mind in ticker.mode:malf_ai) AI_mind.current.verbs -= /datum/game_mode/malfunction/proc/takeover - for(var/mob/M in player_list) - if(!istype(M,/mob/new_player)) - M << sound('sound/AI/aimalf.ogg') - /datum/game_mode/malfunction/proc/ai_win() set category = "Malfunction" diff --git a/code/game/gamemodes/mutiny/mutiny.dm b/code/game/gamemodes/mutiny/mutiny.dm index c6ba655ced1..43b68f91dcb 100644 --- a/code/game/gamemodes/mutiny/mutiny.dm +++ b/code/game/gamemodes/mutiny/mutiny.dm @@ -27,7 +27,7 @@ datum/game_mode/mutiny proc/reveal_directives() spawn(rand(1 MINUTE, 3 MINUTES)) - command_alert("Incoming emergency directive: Captain's office fax machine, [station_name()].","Emergency Transmission") + command_announcement.Announce("Incoming emergency directive: Captain's office fax machine, [station_name()].","Emergency Transmission") spawn(rand(3 MINUTES, 5 MINUTES)) send_pda_message() spawn(rand(3 MINUTES, 5 MINUTES)) @@ -67,7 +67,7 @@ datum/game_mode/mutiny "classified security operations", "science-defying raw elemental chaos" ) - command_alert("The presence of [pick(reasons)] in the region is tying up all available local emergency resources; emergency response teams cannot be called at this time.","Emergency Transmission") + command_announcement.Announce("The presence of [pick(reasons)] in the region is tying up all available local emergency resources; emergency response teams cannot be called at this time.","Emergency Transmission") // Returns an array in case we want to expand on this later. proc/get_head_loyalist_candidates() diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 2e087971bce..cfa61ba0622 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -1824,11 +1824,11 @@ if(gravity_is_on) log_admin("[key_name(usr)] toggled gravity on.", 1) message_admins("\blue [key_name_admin(usr)] toggled gravity on.", 1) - command_alert("Gravity generators are again functioning within normal parameters. Sorry for any inconvenience.") + command_announcement.Announce("Gravity generators are again functioning within normal parameters. Sorry for any inconvenience.") else log_admin("[key_name(usr)] toggled gravity off.", 1) message_admins("\blue [key_name_admin(usr)] toggled gravity off.", 1) - command_alert("Feedback surge detected in mass-distributions systems. Artifical gravity has been disabled whilst the system reinitializes. Further failures may result in a gravitational collapse and formation of blackholes. Have a nice day.") + command_announcement.Announce("Feedback surge detected in mass-distributions systems. Artifical gravity has been disabled whilst the system reinitializes. Further failures may result in a gravitational collapse and formation of blackholes. Have a nice day.") if("wave") feedback_inc("admin_secrets_fun_used",1) feedback_add_details("admin_secrets_fun_used","Meteor") @@ -2178,8 +2178,7 @@ if("gravanomalies") feedback_inc("admin_secrets_fun_used",1) feedback_add_details("admin_secrets_fun_used","GA") - command_alert("Gravitational anomalies detected on the station. There is no additional data.", "Anomaly Alert") - world << sound('sound/AI/granomalies.ogg') + command_announcement.Announce("Gravitational anomalies detected on the station. There is no additional data.", "Anomaly Alert", 'sound/AI/granomalies.ogg') var/turf/T = pick(blobstart) var/obj/effect/bhole/bh = new /obj/effect/bhole( T.loc, 30 ) spawn(rand(100, 600)) @@ -2372,8 +2371,7 @@ if(W.z == 1 && !istype(get_area(W), /area/bridge) && !istype(get_area(W), /area/crew_quarters) && !istype(get_area(W), /area/security/prison)) W.req_access = list() message_admins("[key_name_admin(usr)] activated Egalitarian Station mode") - command_alert("Centcomm airlock control override activated. Please take this time to get acquainted with your coworkers.") - world << sound('sound/AI/commandreport.ogg') + command_announcement.Announce("Centcomm airlock control override activated. Please take this time to get acquainted with your coworkers.", new_sound = 'sound/AI/commandreport.ogg') if("dorf") feedback_inc("admin_secrets_fun_used",1) feedback_add_details("admin_secrets_fun_used","DF") @@ -2388,8 +2386,7 @@ message_admins("[key_name_admin(usr)] triggered an ion storm") var/show_log = alert(usr, "Show ion message?", "Message", "Yes", "No") if(show_log == "Yes") - command_alert("Ion storm detected near the station. Please check all AI-controlled equipment for errors.", "Anomaly Alert") - world << sound('sound/AI/ionstorm.ogg') + command_announcement.Announce("Ion storm detected near the station. Please check all AI-controlled equipment for errors.", "Anomaly Alert", new_sound = 'sound/AI/ionstorm.ogg') if("spacevines") feedback_inc("admin_secrets_fun_used",1) feedback_add_details("admin_secrets_fun_used","K") diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index a0e9fd9878c..e883f5fd43c 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -205,7 +205,6 @@ proc/cmd_admin_mute(mob/M as mob, mute_type, automute = 0) M << "You have been [muteunmute] from [mute_string]." feedback_add_details("admin_verb","MUTE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - /client/proc/cmd_admin_add_random_ai_law() set category = "Fun" set name = "Add Random AI Law" @@ -219,8 +218,7 @@ proc/cmd_admin_mute(mob/M as mob, mute_type, automute = 0) var/show_log = alert(src, "Show ion message?", "Message", "Yes", "No") if(show_log == "Yes") - command_alert("Ion storm detected near the station. Please check all AI-controlled equipment for errors.", "Anomaly Alert") - world << sound('sound/AI/ionstorm.ogg') + command_announcement.Announce("Ion storm detected near the station. Please check all AI-controlled equipment for errors.", "Anomaly Alert", new_sound = 'sound/AI/ionstorm.ogg') IonStorm(0) feedback_add_details("admin_verb","ION") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! @@ -535,8 +533,7 @@ Traitors and the like can also be revived with the previous role mostly intact. var/show_log = alert(src, "Show ion message?", "Message", "Yes", "No") if(show_log == "Yes") - command_alert("Ion storm detected near the station. Please check all AI-controlled equipment for errors.", "Anomaly Alert") - world << sound('sound/AI/ionstorm.ogg') + command_announcement.Announce("Ion storm detected near the station. Please check all AI-controlled equipment for errors.", "Anomaly Alert", new_sound = 'sound/AI/ionstorm.ogg') feedback_add_details("admin_verb","IONC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/cmd_admin_rejuvenate(mob/living/M as mob in mob_list) @@ -582,11 +579,11 @@ Traitors and the like can also be revived with the previous role mostly intact. switch(alert("Should this be announced to the general population?",,"Yes","No")) if("Yes") - command_alert(input, customname); + command_announcement.Announce(input, customname, new_sound = 'sound/AI/commandreport.ogg'); if("No") world << "\red New NanoTrasen Update available at all communication consoles." + world << sound('sound/AI/commandreport.ogg') - world << sound('sound/AI/commandreport.ogg') log_admin("[key_name(src)] has created a command report: [input]") message_admins("[key_name_admin(src)] has created a command report", 1) feedback_add_details("admin_verb","CCR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! diff --git a/code/modules/awaymissions/bluespaceartillery.dm b/code/modules/awaymissions/bluespaceartillery.dm index 21df3f1fd3d..f36a2e21fa1 100644 --- a/code/modules/awaymissions/bluespaceartillery.dm +++ b/code/modules/awaymissions/bluespaceartillery.dm @@ -42,7 +42,7 @@ if (usr.stat || usr.restrained()) return if(src.reload < 180) return if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon))) - command_alert("Bluespace artillery fire detected. Brace for impact.") + command_announcement.Announce("Bluespace artillery fire detected. Brace for impact.") message_admins("[key_name_admin(usr)] has launched an artillery strike.", 1) var/list/L = list() for(var/turf/T in get_area_turfs(thearea.type)) diff --git a/code/modules/events/alien_infestation.dm b/code/modules/events/alien_infestation.dm index f3f95289750..d89f527e226 100644 --- a/code/modules/events/alien_infestation.dm +++ b/code/modules/events/alien_infestation.dm @@ -15,8 +15,7 @@ /datum/event/alien_infestation/announce() if(successSpawn) - command_alert("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert") - world << sound('sound/AI/aliens.ogg') + command_announcement.Announce("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert", new_sound = 'sound/AI/aliens.ogg') /datum/event/alien_infestation/start() diff --git a/code/modules/events/blob.dm b/code/modules/events/blob.dm index f1136975f99..0b1b1dbbfd6 100644 --- a/code/modules/events/blob.dm +++ b/code/modules/events/blob.dm @@ -6,8 +6,7 @@ /datum/event/blob/announce() - command_alert("Confirmed outbreak of level 7 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert") - world << sound('sound/AI/outbreak7.ogg') + command_announcement.Announce("Confirmed outbreak of level 7 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", new_sound = 'sound/AI/outbreak7.ogg') /datum/event/blob/start() diff --git a/code/modules/events/borers.dm b/code/modules/events/borers.dm index 75e1f8b577c..20cd555a1be 100644 --- a/code/modules/events/borers.dm +++ b/code/modules/events/borers.dm @@ -15,8 +15,7 @@ /datum/event/borer_infestation/announce() if(successSpawn) - command_alert("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert") - world << sound('sound/AI/aliens.ogg') + command_announcement.Announce("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert", new_sound = 'sound/AI/aliens.ogg') /datum/event/borer_infestation/start() var/list/vents = list() diff --git a/code/modules/events/brand_intelligence.dm b/code/modules/events/brand_intelligence.dm index 09adb39440d..24e35aa1e20 100644 --- a/code/modules/events/brand_intelligence.dm +++ b/code/modules/events/brand_intelligence.dm @@ -9,7 +9,7 @@ /datum/event/brand_intelligence/announce() - command_alert("Rampant brand intelligence has been detected aboard [station_name()], please stand-by.", "Machine Learning Alert") + command_announcement.Announce("Rampant brand intelligence has been detected aboard [station_name()], please stand-by.", "Machine Learning Alert") /datum/event/brand_intelligence/start() diff --git a/code/modules/events/carp_migration.dm b/code/modules/events/carp_migration.dm index e90e20c9f88..2feeecbb1a5 100644 --- a/code/modules/events/carp_migration.dm +++ b/code/modules/events/carp_migration.dm @@ -9,7 +9,7 @@ endWhen = rand(600,1200) /datum/event/carp_migration/announce() - command_alert("Unknown biological entities have been detected near [station_name()], please stand-by.", "Lifesign Alert") + command_announcement.Announce("Unknown biological entities have been detected near [station_name()], please stand-by.", "Lifesign Alert") /datum/event/carp_migration/start() for(var/obj/effect/landmark/C in landmarks_list) diff --git a/code/modules/events/comms_blackout.dm b/code/modules/events/comms_blackout.dm index 0a1d5c351c7..3e224a1f5cf 100644 --- a/code/modules/events/comms_blackout.dm +++ b/code/modules/events/comms_blackout.dm @@ -2,7 +2,7 @@ /proc/communications_blackout(var/silent = 1) if(!silent) - command_alert("Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT") + command_announcement.Announce("Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT", new_sound = 'sound/misc/interference.ogg') else // AIs will always know if there's a comm blackout, rogue AIs could then lie about comm blackouts in the future while they shutdown comms for(var/mob/living/silicon/ai/A in player_list) A << "
" diff --git a/code/modules/events/communications_blackout.dm b/code/modules/events/communications_blackout.dm index 194d45e90de..181f66d9c0e 100644 --- a/code/modules/events/communications_blackout.dm +++ b/code/modules/events/communications_blackout.dm @@ -12,7 +12,7 @@ A << "
" if(prob(30)) //most of the time, we don't want an announcement, so as to allow AIs to fake blackouts. - command_alert(alert) + command_announcement.Announce(alert, new_sound = 'sound/misc/interference.ogg') /datum/event/communications_blackout/start() diff --git a/code/modules/events/disease_outbreak.dm b/code/modules/events/disease_outbreak.dm index 37ec6422592..076b5f3104f 100644 --- a/code/modules/events/disease_outbreak.dm +++ b/code/modules/events/disease_outbreak.dm @@ -4,8 +4,7 @@ /datum/event/disease_outbreak/announce() - command_alert("Confirmed outbreak of level 7 viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert") - world << sound('sound/AI/outbreak7.ogg') + command_announcement.Announce("Confirmed outbreak of level 7 viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", new_sound = 'sound/AI/outbreak7.ogg') /datum/event/disease_outbreak/setup() announceWhen = rand(15, 30) diff --git a/code/modules/events/electrical_storm.dm b/code/modules/events/electrical_storm.dm index dacaa09c47a..4a53cc696de 100644 --- a/code/modules/events/electrical_storm.dm +++ b/code/modules/events/electrical_storm.dm @@ -4,7 +4,7 @@ /datum/event/electrical_storm/announce() - command_alert("An electrical storm has been detected in your area, please repair potential electronic overloads.", "Electrical Storm Alert") + command_announcement.Announce("An electrical storm has been detected in your area, please repair potential electronic overloads.", "Electrical Storm Alert") /datum/event/electrical_storm/start() diff --git a/code/modules/events/grid_check.dm b/code/modules/events/grid_check.dm index 71d78d96e4a..c485827efbc 100644 --- a/code/modules/events/grid_check.dm +++ b/code/modules/events/grid_check.dm @@ -8,9 +8,7 @@ power_failure(0) /datum/event/grid_check/announce() - command_alert("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, the station's power will be shut off for an indeterminate duration.", "Automated Grid Check") - for(var/mob/M in player_list) - M << sound('sound/AI/poweroff.ogg') + command_announcement.Announce("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, the station's power will be shut off for an indeterminate duration.", "Automated Grid Check", new_sound = 'sound/AI/poweroff.ogg') /datum/event/grid_check/end() power_restore() diff --git a/code/modules/events/infestation.dm b/code/modules/events/infestation.dm index 96a2fcc263c..d587c512691 100644 --- a/code/modules/events/infestation.dm +++ b/code/modules/events/infestation.dm @@ -102,7 +102,7 @@ /datum/event/infestation/announce() - command_alert("Bioscans indicate that [vermstring] have been breeding in [locstring]. Clear them out, before this starts to affect productivity.", "Vermin infestation") + command_announcement.Announce("Bioscans indicate that [vermstring] have been breeding in [locstring]. Clear them out, before this starts to affect productivity.", "Vermin infestation") #undef LOC_KITCHEN #undef LOC_ATMOS diff --git a/code/modules/events/ion_storm.dm b/code/modules/events/ion_storm.dm index 95c4060028a..f5adaf4808d 100644 --- a/code/modules/events/ion_storm.dm +++ b/code/modules/events/ion_storm.dm @@ -94,7 +94,7 @@ /datum/event/ionstorm/end() spawn(rand(5000,8000)) if(prob(50)) - command_alert("It has come to our attention that the station passed through an ion storm. Please monitor all electronic equipment for malfunctions.", "Anomaly Alert") + command_announcement.Announce("It has come to our attention that the station passed through an ion storm. Please monitor all electronic equipment for malfunctions.", "Anomaly Alert") /* /proc/IonStorm(botEmagChance = 10) diff --git a/code/modules/events/meteors.dm b/code/modules/events/meteors.dm index 0f74d65b7d9..791f44ab349 100644 --- a/code/modules/events/meteors.dm +++ b/code/modules/events/meteors.dm @@ -9,15 +9,14 @@ endWhen = rand(10,25) * 3 /datum/event/meteor_wave/announce() - command_alert("Meteors have been detected on collision course with the station.", "Meteor Alert") - world << sound('sound/AI/meteors.ogg') + command_announcement.Announce("Meteors have been detected on collision course with the station.", "Meteor Alert", new_sound = 'sound/AI/meteors.ogg') /datum/event/meteor_wave/tick() if(IsMultiple(activeFor, 3)) spawn_meteors(rand(2,5)) /datum/event/meteor_wave/end() - command_alert("The station has cleared the meteor storm.", "Meteor Alert") + command_announcement.Announce("The station has cleared the meteor storm.", "Meteor Alert") // /datum/event/meteor_shower @@ -30,7 +29,7 @@ waves = rand(1,4) /datum/event/meteor_shower/announce() - command_alert("The station is now in a meteor shower.", "Meteor Alert") + command_announcement.Announce("The station is now in a meteor shower.", "Meteor Alert") //meteor showers are lighter and more common, /datum/event/meteor_shower/tick() @@ -44,4 +43,4 @@ endWhen = next_meteor + 1 /datum/event/meteor_shower/end() - command_alert("The station has cleared the meteor shower", "Meteor Alert") + command_announcement.Announce("The station has cleared the meteor shower", "Meteor Alert") diff --git a/code/modules/events/prison_break.dm b/code/modules/events/prison_break.dm index 37a457076a6..8306d5d9af0 100644 --- a/code/modules/events/prison_break.dm +++ b/code/modules/events/prison_break.dm @@ -16,7 +16,7 @@ /datum/event/prison_break/announce() if(prisonAreas && prisonAreas.len > 0) - command_alert("[pick("Gr3y.T1d3 virus","Malignant trojan")] detected in [station_name()] imprisonment subroutines. Recommend station AI involvement.", "Security Alert") + command_announcement.Announce("[pick("Gr3y.T1d3 virus","Malignant trojan")] detected in [station_name()] imprisonment subroutines. Recommend station AI involvement.", "Security Alert") else world.log << "ERROR: Could not initate grey-tide. Unable find prison or brig area." kill() diff --git a/code/modules/events/radiation_storm.dm b/code/modules/events/radiation_storm.dm index 91bf29e00af..6a6c0f7320e 100644 --- a/code/modules/events/radiation_storm.dm +++ b/code/modules/events/radiation_storm.dm @@ -8,15 +8,14 @@ /datum/event/radiation_storm/start() spawn() - world << sound('sound/AI/radiation.ogg') - command_alert("High levels of radiation detected near the station. Please evacuate into one of the shielded maintenance tunnels.", "Anomaly Alert") + command_announcement.Announce("High levels of radiation detected near the station. Please evacuate into one of the shielded maintenance tunnels.", "Anomaly Alert", new_sound = 'sound/AI/radiation.ogg') make_maint_all_access() sleep(600) - command_alert("The station has entered the radiation belt. Please remain in a sheltered area until we have passed the radiation belt.", "Anomaly Alert") + command_announcement.Announce("The station has entered the radiation belt. Please remain in a sheltered area until we have passed the radiation belt.", "Anomaly Alert") for(var/i = 0, i < 10, i++) for(var/mob/living/carbon/human/H in living_mob_list) @@ -50,7 +49,7 @@ sleep(100) - command_alert("The station has passed the radiation belt. Please report to medbay if you experience any unusual symptoms. Maintenance will lose all access again shortly.", "Anomaly Alert") + command_announcement.Announce("The station has passed the radiation belt. Please report to medbay if you experience any unusual symptoms. Maintenance will lose all access again shortly.", "Anomaly Alert") sleep(600) // Want to give them time to get out of maintenance. diff --git a/code/modules/events/rogue_drones.dm b/code/modules/events/rogue_drones.dm index f9b4778c43f..df40de5d4d5 100644 --- a/code/modules/events/rogue_drones.dm +++ b/code/modules/events/rogue_drones.dm @@ -30,7 +30,7 @@ msg = "Contact has been lost with a combat drone wing operating out of the NMV Icarus. If any are sighted in the area, approach with caution." else msg = "Unidentified hackers have targetted a combat drone wing deployed from the NMV Icarus. If any are sighted in the area, approach with caution." - command_alert(msg, "Rogue drone alert") + command_announcement.Announce(msg, "Rogue drone alert") /datum/event/rogue_drone/tick() return @@ -48,6 +48,6 @@ num_recovered++ if(num_recovered > drones_list.len * 0.75) - command_alert("Icarus drone control reports the malfunctioning wing has been recovered safely.", "Rogue drone alert") + command_announcement.Announce("Icarus drone control reports the malfunctioning wing has been recovered safely.", "Rogue drone alert") else - command_alert("Icarus drone control registers disappointment at the loss of the drones, but the survivors have been recovered.", "Rogue drone alert") + command_announcement.Announce("Icarus drone control registers disappointment at the loss of the drones, but the survivors have been recovered.", "Rogue drone alert") diff --git a/code/modules/events/spider_infestation.dm b/code/modules/events/spider_infestation.dm index be896869917..a5b87954c19 100644 --- a/code/modules/events/spider_infestation.dm +++ b/code/modules/events/spider_infestation.dm @@ -13,8 +13,7 @@ sent_spiders_to_station = 0 /datum/event/spider_infestation/announce() - command_alert("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert") - world << sound('sound/AI/aliens.ogg') + command_announcement.Announce("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert", new_sound = 'sound/AI/aliens.ogg') /datum/event/spider_infestation/start() diff --git a/code/modules/events/viral_infection.dm b/code/modules/events/viral_infection.dm index b7add26ef28..1be584b8e32 100644 --- a/code/modules/events/viral_infection.dm +++ b/code/modules/events/viral_infection.dm @@ -8,8 +8,7 @@ datum/event/viral_infection/setup() severity = rand(1, 3) datum/event/viral_infection/announce() - command_alert("Confirmed outbreak of level five biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert") - world << sound('sound/AI/outbreak5.ogg') + command_announcement.Announce("Confirmed outbreak of level five biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", new_sound = 'sound/AI/outbreak5.ogg') datum/event/viral_infection/start() var/list/candidates = list() //list of candidate keys diff --git a/code/modules/events/wallrot.dm b/code/modules/events/wallrot.dm index 13da0842b02..3911b4f1fa5 100644 --- a/code/modules/events/wallrot.dm +++ b/code/modules/events/wallrot.dm @@ -10,7 +10,7 @@ datum/event/wallrot/setup() severity = rand(5, 10) datum/event/wallrot/announce() - command_alert("Harmful fungi detected on station. Station structures may be contaminated.", "Biohazard Alert") + command_announcement.Announce("Harmful fungi detected on station. Station structures may be contaminated.", "Biohazard Alert") datum/event/wallrot/start() spawn() diff --git a/code/modules/shuttles/shuttles_multi.dm b/code/modules/shuttles/shuttles_multi.dm index 83c50710221..4c3b7bdf37e 100644 --- a/code/modules/shuttles/shuttles_multi.dm +++ b/code/modules/shuttles/shuttles_multi.dm @@ -33,14 +33,14 @@ if(cloaked || isnull(departure_message)) return - command_alert(departure_message,(announcer ? announcer : "Central Command")) + command_announcement.Announce(departure_message,(announcer ? announcer : "Central Command")) /datum/shuttle/multi_shuttle/proc/announce_arrival() if(cloaked || isnull(arrival_message)) return - command_alert(arrival_message,(announcer ? announcer : "Central Command")) + command_announcement.Announce(arrival_message,(announcer ? announcer : "Central Command")) /obj/machinery/computer/shuttle_control/multi @@ -85,7 +85,7 @@ var/datum/shuttle/multi_shuttle/MS = shuttle_controller.shuttles[shuttle_tag] if(!istype(MS)) return - + //world << "multi_shuttle: last_departed=[MS.last_departed], origin=[MS.origin], interim=[MS.interim], travel_time=[MS.move_time]" if (MS.moving_status != SHUTTLE_IDLE) @@ -103,7 +103,7 @@ //TODO: Actually end the mission. MS.return_warning = 1 return - + MS.long_jump(MS.last_departed,MS.origin,MS.interim,MS.move_time) MS.last_departed = MS.origin MS.at_origin = 1 @@ -128,7 +128,7 @@ MS.last_departed = MS.origin MS.at_origin = 0 - + MS.long_jump(MS.last_departed, MS.destinations[choice], MS.interim, MS.move_time) MS.last_departed = MS.destinations[choice] return