From f4cfd04485faad04078cf6bb62562f64e0cdf40f Mon Sep 17 00:00:00 2001 From: ikarrus Date: Thu, 14 Aug 2014 00:03:43 -0600 Subject: [PATCH] Minor Announcements Head of Staff announcements (ie the ones made via request consoles) are now "Minor Announcements". While head announcements are unchanged, other in-game notifications have been expanded to use their format, including when the Captain joins the game, and early shuttly launch notifications. They're basically meant to be big and noticable, but not as annoying and spammy as Priority Announcements. I wanted to include a sound for them, but I've been unable to find one I was satisfied with. --- code/defines/procs/priority_announce.dm | 12 +++++++++++- code/game/jobs/job/captain.dm | 2 +- code/game/machinery/computer/shuttle.dm | 10 +++++----- code/game/machinery/requests_console.dm | 9 +++------ 4 files changed, 20 insertions(+), 13 deletions(-) diff --git a/code/defines/procs/priority_announce.dm b/code/defines/procs/priority_announce.dm index 12690ea4a41..7d1083ee43e 100644 --- a/code/defines/procs/priority_announce.dm +++ b/code/defines/procs/priority_announce.dm @@ -26,4 +26,14 @@ for(var/mob/M in player_list) if(!istype(M,/mob/new_player)) M << announcement - M << sound(sound) \ No newline at end of file + M << sound(sound) + +/proc/minor_announce(var/department, var/message, var/submit_to_news) + if(!department || !message) + return + + for(var/mob/M in player_list) + if(!istype(M,/mob/new_player)) + M << "

[department] Announcement: [message]
" + if(submit_to_news) + news_network.SubmitArticle(message, department, "Station Announcements", null) \ No newline at end of file diff --git a/code/game/jobs/job/captain.dm b/code/game/jobs/job/captain.dm index 545c622860e..4016e8fb192 100644 --- a/code/game/jobs/job/captain.dm +++ b/code/game/jobs/job/captain.dm @@ -43,7 +43,7 @@ Captain L.imp_in = H L.implanted = 1 - world << "Captain [H.real_name] on deck!" + minor_announce("Staffing", "Captain [H.real_name] on deck!") /datum/job/captain/get_access() return get_all_accesses() diff --git a/code/game/machinery/computer/shuttle.dm b/code/game/machinery/computer/shuttle.dm index f997ea86021..65a02bcf7b3 100644 --- a/code/game/machinery/computer/shuttle.dm +++ b/code/game/machinery/computer/shuttle.dm @@ -36,11 +36,11 @@ if (src.auth_need - src.authorized.len > 0) message_admins("[key_name(user.client)](?) has authorized early shuttle launch in ([x],[y],[z] - JMP)",0,1) log_game("[user.ckey]([user]) has authorized early shuttle launch in ([x],[y],[z])") - priority_announce("[src.auth_need - src.authorized.len] more authorization(s) needed until shuttle is launched early", null, null, "Priority") + minor_announce("Evacuation", "[src.auth_need - src.authorized.len] more authorization(s) needed until shuttle is launched early") else message_admins("[key_name(user.client)](?) has launched the emergency shuttle in ([x],[y],[z] - JMP)",0,1) log_game("[user.ckey]([user]) has launched the emergency shuttle in ([x],[y],[z])") - priority_announce("The emergency shuttle will launch in 10 seconds", null, null, "Priority") + minor_announce("Evacuation", "The emergency shuttle will launch in 10 seconds") emergency_shuttle.online = 1 emergency_shuttle.settimeleft(10) //src.authorized = null @@ -49,10 +49,10 @@ if("Repeal") src.authorized -= W:registered_name - priority_announce("[src.auth_need - src.authorized.len] authorizations needed until shuttle is launched early", null, null, "Priority") + minor_announce("Evacuation", "[src.auth_need - src.authorized.len] authorizations needed until shuttle is launched early") if("Abort") - priority_announce("All authorizations to launch the shuttle early have been revoked.", null, null, "Priority") + minor_announce("Evacuation", "All authorizations to launch the shuttle early have been revoked.") src.authorized.len = 0 src.authorized = list( ) @@ -64,7 +64,7 @@ if("Launch") message_admins("[key_name(user.client)](?) has emagged the emergency shuttle in ([x],[y],[z] - JMP)",0,1) log_game("[user.ckey]([user]) has emagged the emergency shuttle in ([x],[y],[z])") - priority_announce("System Error: The emergency shuttle will launch in 10 seconds", null, null, "Priority") + minor_announce("Evacuation", "System Error: The emergency shuttle will launch in 10 seconds") emergency_shuttle.settimeleft( 10 ) emagged = 1 if("Cancel") diff --git a/code/game/machinery/requests_console.dm b/code/game/machinery/requests_console.dm index 807fbe30d1f..1ff2382a913 100644 --- a/code/game/machinery/requests_console.dm +++ b/code/game/machinery/requests_console.dm @@ -280,10 +280,7 @@ var/list/obj/machinery/requests_console/allConsoles = list() if(href_list["sendAnnouncement"]) if(!announcementConsole) return - for(var/mob/M in player_list) - if(!istype(M,/mob/new_player)) - M << "[department] announcement: [message]" - news_network.SubmitArticle(message, department, "Station Announcements", null) + minor_announce(department, message, 1) announceAuth = 0 message = "" screen = 0 @@ -371,7 +368,7 @@ var/list/obj/machinery/requests_console/allConsoles = list() updateUsrDialog() return - + /obj/machinery/requests_console/proc/createmessage(source, title, message, priority, paper) var/linkedsender var/unlinkedsender @@ -403,7 +400,7 @@ var/list/obj/machinery/requests_console/allConsoles = list() if(src.newmessagepriority < 3) src.newmessagepriority = 3 src.update_icon() - if(1) + if(1) playsound(src.loc, 'sound/machines/twobeep.ogg', 50, 1) for (var/mob/O in hearers(7, src.loc)) O.show_message("\icon[src] *The Requests Console yells: '[title]'")