diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm index f59774142bd..40cc0edbbd5 100644 --- a/code/__HELPERS/mobs.dm +++ b/code/__HELPERS/mobs.dm @@ -254,9 +254,9 @@ proc/add_logs(mob/user, mob/target, what_done, var/object=null, var/addition=nul if(!user) return if(ismob(user)) - user.attack_log += text("\[[time_stamp()]\] Has [what_done] [key_name(target)][object ? " with [object]" : " "][addition]") + user.create_attack_log("Has [what_done] [key_name(target)][object ? " with [object]" : " "][addition]") if(ismob(target)) - target.attack_log += text("\[[time_stamp()]\] Has been [what_done] by [key_name(user)][object ? " with [object]" : " "][addition]") + target.create_attack_log("Has been [what_done] by [key_name(user)][object ? " with [object]" : " "][addition]") if(admin) log_attack("[key_name(user)] [what_done] [key_name(target)][object ? " with [object]" : " "][addition]") if(istype(target) && (target.key)) diff --git a/code/_globalvars/lists/objects.dm b/code/_globalvars/lists/objects.dm index 600dac2f273..5a929ebeb30 100644 --- a/code/_globalvars/lists/objects.dm +++ b/code/_globalvars/lists/objects.dm @@ -33,4 +33,5 @@ var/global/list/shuttle_caller_list = list() //list of all communication cons var/global/list/tracked_implants = list() //list of all current implants that are tracked to work out what sort of trek everyone is on. Sadly not on lavaworld not implemented... var/global/list/pinpointer_list = list() //list of all pinpointers. Used to change stuff they are pointing to all at once. var/global/list/abductor_equipment = list() //list of all abductor equipment -var/global/list/global_intercoms = list() //list of all intercomms, across all z-levels \ No newline at end of file +var/global/list/global_intercoms = list() //list of all intercomms, across all z-levels +var/global/list/global_radios = list() //list of all radios, across all z-levels \ No newline at end of file diff --git a/code/datums/spell.dm b/code/datums/spell.dm index 332d96779e6..a7bf2b7c0ba 100644 --- a/code/datums/spell.dm +++ b/code/datums/spell.dm @@ -162,7 +162,8 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin /obj/effect/proc_holder/spell/proc/perform(list/targets, recharge = 1, mob/user = usr) //if recharge is started is important for the trigger spells before_cast(targets) invocation() - user.attack_log += text("\[[time_stamp()]\] [user.real_name] ([user.ckey]) cast the spell [name].") + if(user && user.ckey) + user.create_attack_log("[user.real_name] ([user.ckey]) cast the spell [name].") spawn(0) if(charge_type == "recharge" && recharge) start_recharge() diff --git a/code/defines/procs/announce.dm b/code/defines/procs/announce.dm index 6c9387644b0..ab447e0fc6b 100644 --- a/code/defines/procs/announce.dm +++ b/code/defines/procs/announce.dm @@ -1,7 +1,8 @@ /var/datum/announcement/minor/minor_announcement = new() /var/datum/announcement/priority/priority_announcement = new(do_log = 0) -/var/datum/announcement/priority/command/command_announcement = new(do_log = 0, do_newscast = 1) -/var/datum/announcement/priority/enemy/communications_announcement = new(do_log = 0, do_newscast = 1) +/var/datum/announcement/priority/command/command_announcement = new(do_log = 0, do_newscast = 0) +/var/datum/announcement/priority/command/event/event_announcement = new(do_log = 0, do_newscast = 0) +/var/datum/announcement/priority/enemy/communications_announcement = new(do_log = 0, do_newscast = 0) /datum/announcement @@ -12,7 +13,8 @@ var/newscast = 0 var/channel_name = "Station Announcements" var/announcement_type = "Announcement" - var/disable_newscasts = 1 // Bay also adds announcements to their newscaster system - set this to 0 to also use that system + var/admin_announcement = 0 // Admin announcements are received regardless of being in range of a radio, unless you're in the lobby to prevent metagaming + var/language = "Galactic Common" /datum/announcement/New(var/do_log = 0, var/new_sound = null, var/do_newscast = 0) sound = new_sound @@ -31,11 +33,17 @@ /datum/announcement/priority/command/New(var/do_log = 1, var/new_sound = sound('sound/misc/notice2.ogg'), var/do_newscast = 0) ..(do_log, new_sound, do_newscast) + admin_announcement = 1 title = "[command_name()] Update" announcement_type = "[command_name()] Update" + +/datum/announcement/priority/command/event/New(var/do_log = 1, var/new_sound = sound('sound/misc/notice2.ogg'), var/do_newscast = 0) + ..(do_log, new_sound, do_newscast) + admin_announcement = 0 /datum/announcement/priority/enemy/New(var/do_log = 1, var/new_sound = sound('sound/AI/intercept2.ogg'), var/do_newscast = 0) ..(do_log, new_sound, do_newscast) + admin_announcement = 1 title = "[command_name()] Update" announcement_type = "Enemy Communications" @@ -44,72 +52,122 @@ title = "Security Announcement" announcement_type = "Security Announcement" -/datum/announcement/proc/Announce(var/message as text, var/new_title = "", var/new_sound = null, var/do_newscast = newscast, var/msg_sanitized = 0, var/from) +/datum/announcement/proc/Announce(var/message as text, var/new_title = "", var/new_sound = null, var/do_newscast = newscast, var/msg_sanitized = 0, var/from, var/msg_language) if(!message) return + var/tmp/message_title = new_title ? new_title : title var/tmp/message_sound = new_sound ? sound(new_sound) : sound if(!msg_sanitized) message = trim_strip_html_properly(message, allow_lines = 1) message_title = html_encode(message_title) - - Message(message, message_title, from) + + var/message_announcer = null + if(announcer) + message_announcer = html_encode(announcer) + + var/datum/language/message_language = all_languages[msg_language ? msg_language : language] + + var/list/combined_receivers = Get_Receivers(message_language) + var/list/receivers = combined_receivers[1] + var/list/garbled_receivers = combined_receivers[2] + + var/formatted_message = Format_Message(message, message_title, message_announcer, from) + var/garbled_formatted_message = Format_Message(message_language.scramble(message), message_language.scramble(message_title), message_language.scramble(message_announcer), message_language.scramble(from)) + + Message(formatted_message, garbled_formatted_message, receivers, garbled_receivers) + if(do_newscast) NewsCast(message, message_title) - Sound(message_sound) + + Sound(message_sound, combined_receivers[1] + combined_receivers[2]) Log(message, message_title) + +/datum/announcement/proc/Get_Receivers(var/datum/language/message_language) + var/list/receivers = list() + var/list/garbled_receivers = list() + + if(admin_announcement) + for(var/mob/M in player_list) + if(!isnewplayer(M) && M.client) + receivers |= M + else + for(var/obj/item/device/radio/R in global_radios) + receivers |= R.send_announcement() + for(var/mob/M in receivers) + if(!istype(M) || !M.client || M.stat || !M.can_hear()) + receivers -= M + continue + if(!M.say_understands(null, message_language)) + receivers -= M + garbled_receivers |= M + for(var/mob/M in dead_mob_list) + if(M.client && M.stat == DEAD) + receivers |= M -/datum/announcement/proc/Message(message as text, message_title as text) - for(var/mob/M in player_list) - if(M.can_hear()) - to_chat(M, "

[title]

") - to_chat(M, "[message]") - if(announcer) - to_chat(M, " -[html_encode(announcer)]") + return list(receivers, garbled_receivers) -/datum/announcement/minor/Message(message as text, message_title as text) - to_chat(world, "[message_title]") - to_chat(world, "[message]") +/datum/announcement/proc/Message(message, garbled_message, receivers, garbled_receivers) + for(var/mob/M in receivers) + to_chat(M, message) + for(var/mob/M in garbled_receivers) + to_chat(M, garbled_message) + +/datum/announcement/proc/Format_Message(message, message_title, message_announcer, from) + var/formatted_message + formatted_message += "

[message_title]

" + formatted_message += "
[message]" + if(message_announcer) + formatted_message += "
-[message_announcer]" + + return formatted_message -/datum/announcement/priority/Message(message as text, message_title as text) - to_chat(world, "

[message_title]

") - to_chat(world, "[message]") - if(announcer) - to_chat(world, " -[html_encode(announcer)]") - to_chat(world, "
") +/datum/announcement/minor/Format_Message(message, message_title, message_announcer, from) + var/formatted_message + formatted_message += "[message_title]" + formatted_message += "
[message]" + + return formatted_message -/datum/announcement/priority/command/Message(message as text, message_title as text) - var/command - command += "

[command_name()] Update

" +/datum/announcement/priority/Format_Message(message, message_title, message_announcer, from) + var/formatted_message + formatted_message += "

[message_title]

" + formatted_message += "
[message]" + if(message_announcer) + formatted_message += "
-[message_announcer]" + formatted_message += "
" + + return formatted_message + +/datum/announcement/priority/command/Format_Message(message, message_title, message_announcer, from) + var/formatted_message + formatted_message += "

[title]

" if(message_title) - command += "

[message_title]

" + formatted_message += "

[message_title]

" + formatted_message += "
[message]
" + formatted_message += "
" + + return formatted_message - command += "
[message]
" - command += "
" - for(var/mob/M in player_list) - if(M.can_hear()) - to_chat(M, command) - -/datum/announcement/priority/enemy/Message(message as text, message_title as text, from as text) - var/command - command += "

[from]

" +/datum/announcement/priority/enemy/Format_Message(message, message_title, message_announcer, from) + var/formatted_message + formatted_message += "

[from]

" if(message_title) - command += "

[message_title]

" + formatted_message += "

[message_title]

" + formatted_message += "
[message]
" + formatted_message += "
" - command += "
[message]
" - command += "
" - for(var/mob/M in player_list) - if(M.can_hear()) - to_chat(M, command) + return formatted_message -/datum/announcement/priority/security/Message(message as text, message_title as text) - to_chat(world, "[message_title]") - to_chat(world, "[message]") +/datum/announcement/priority/security/Format_Message(message, message_title, message_announcer, from) + var/formatted_message + formatted_message += "[message_title]" + formatted_message += "
[message]" + + return formatted_message /datum/announcement/proc/NewsCast(message as text, message_title as text) - if(disable_newscasts) - return if(!newscast) return @@ -121,28 +179,17 @@ news.can_be_redacted = 0 announce_newscaster_news(news) -/datum/announcement/proc/PlaySound(var/message_sound) +/datum/announcement/proc/Sound(var/message_sound, var/receivers) if(!message_sound) return - for(var/mob/M in player_list) - if(M.can_hear()) - M << message_sound - -/datum/announcement/proc/Sound(var/message_sound) - PlaySound(message_sound) - -/datum/announcement/priority/Sound(var/message_sound) - if(sound) - world << sound - -/datum/announcement/priority/command/Sound(var/message_sound) - PlaySound(message_sound) + for(var/mob/M in receivers) + M << message_sound /datum/announcement/proc/Log(message as text, message_title as text) if(log) 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) - return I.assignment ? "[I.registered_name] ([I.assignment])" : I.registered_name \ No newline at end of file + return I.assignment ? "[I.registered_name] ([I.assignment])" : I.registered_name diff --git a/code/game/gamemodes/blob/blob.dm b/code/game/gamemodes/blob/blob.dm index 74a9ac9b217..16f98927e17 100644 --- a/code/game/gamemodes/blob/blob.dm +++ b/code/game/gamemodes/blob/blob.dm @@ -192,7 +192,7 @@ var/list/blob_nodes = list() declared = 1 if(1) - command_announcement.Announce("Confirmed outbreak of level 5 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", 'sound/AI/outbreak5.ogg') + event_announcement.Announce("Confirmed outbreak of level 5 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", 'sound/AI/outbreak5.ogg') if(2) send_intercept(2) diff --git a/code/game/gamemodes/blob/blob_report.dm b/code/game/gamemodes/blob/blob_report.dm index 198c0264dd1..9d24e4992df 100644 --- a/code/game/gamemodes/blob/blob_report.dm +++ b/code/game/gamemodes/blob/blob_report.dm @@ -49,7 +49,7 @@ playsound(comm.loc, "sound/goonstation/machines/printer_dotmatrix.ogg", 50, 1) intercept.name = "Classified Central Command Update" intercept.info = intercepttext - command_announcement.Announce("A report has been downloaded and printed out at all communications consoles.", "Incoming Classified Message", 'sound/AI/commandreport.ogg') + event_announcement.Announce("A report has been downloaded and printed out at all communications consoles.", "Incoming Classified Message", 'sound/AI/commandreport.ogg') return diff --git a/code/game/gamemodes/cult/cult.dm b/code/game/gamemodes/cult/cult.dm index 1bff905116f..3af75d1f14d 100644 --- a/code/game/gamemodes/cult/cult.dm +++ b/code/game/gamemodes/cult/cult.dm @@ -175,7 +175,7 @@ var/global/list/all_cults = list() cult_mind.current.faction |= "cult" var/datum/action/innate/cultcomm/C = new() C.Grant(cult_mind.current) - cult_mind.current.attack_log += "\[[time_stamp()]\] Has been converted to the cult!" + cult_mind.current.create_attack_log("Has been converted to the cult!") if(jobban_isbanned(cult_mind.current, ROLE_CULTIST)) replace_jobbaned_player(cult_mind.current, ROLE_CULTIST) update_cult_icons_added(cult_mind) diff --git a/code/game/gamemodes/malfunction/Malf_Modules.dm b/code/game/gamemodes/malfunction/Malf_Modules.dm index 9842757dc8c..a41f86020d5 100644 --- a/code/game/gamemodes/malfunction/Malf_Modules.dm +++ b/code/game/gamemodes/malfunction/Malf_Modules.dm @@ -30,7 +30,7 @@ set name = "Doomsday Device" to_chat(src, "Nuclear device armed.") - 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') + event_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") nuking = 1 var/obj/machinery/doomsday_device/DOOM = new /obj/machinery/doomsday_device(src) diff --git a/code/game/gamemodes/miniantags/abduction/abduction.dm b/code/game/gamemodes/miniantags/abduction/abduction.dm index dd0abda7e31..db86c482f03 100644 --- a/code/game/gamemodes/miniantags/abduction/abduction.dm +++ b/code/game/gamemodes/miniantags/abduction/abduction.dm @@ -346,7 +346,7 @@ if(abductor_mind in abductors) ticker.mode.abductors -= abductor_mind abductor_mind.special_role = null - abductor_mind.current.attack_log += "\[[time_stamp()]\] No longer abductor" + abductor_mind.current.create_attack_log("No longer abductor") if(issilicon(abductor_mind.current)) to_chat(abductor_mind.current, "You have been turned into a robot! You are no longer an abductor.") else diff --git a/code/game/gamemodes/miniantags/borer/borer.dm b/code/game/gamemodes/miniantags/borer/borer.dm index a074773932b..56c52797c0d 100644 --- a/code/game/gamemodes/miniantags/borer/borer.dm +++ b/code/game/gamemodes/miniantags/borer/borer.dm @@ -313,7 +313,7 @@ to_chat(src, "You plunge your probosci deep into the cortex of the host brain, interfacing directly with their nervous system.") to_chat(host, "You feel a strange shifting sensation behind your eyes as an alien consciousness displaces yours.") var/borer_key = src.key - host.attack_log += text("\[[time_stamp()]\] [key_name(src)] has assumed control of [key_name(host)]") + host.create_attack_log("[key_name(src)] has assumed control of [key_name(host)]") msg_admin_attack("[key_name_admin(src)] has assumed control of [key_name_admin(host)]") // host -> brain var/h2b_id = host.computer_id @@ -457,7 +457,7 @@ if(host_brain) - host.attack_log += text("\[[time_stamp()]\] [host_brain.name] ([host_brain.ckey]) has taken control back from [src.name] ([host.ckey])") + host.create_attack_log("[host_brain.name] ([host_brain.ckey]) has taken control back from [src.name] ([host.ckey])") msg_admin_attack("[host_brain.name] ([host_brain.ckey]) has taken control back from [src.name] ([host.ckey]) (JMP)") // host -> self var/h2s_id = host.computer_id diff --git a/code/game/gamemodes/nations/nations.dm b/code/game/gamemodes/nations/nations.dm index 74038879fd7..15f5493543e 100644 --- a/code/game/gamemodes/nations/nations.dm +++ b/code/game/gamemodes/nations/nations.dm @@ -23,7 +23,7 @@ datum/game_mode/nations return ..() /datum/game_mode/nations/proc/send_intercept() - command_announcement.Announce("Due to recent and COMPLETELY UNFOUNDED allegations of massive fraud and insider trading \ + event_announcement.Announce("Due to recent and COMPLETELY UNFOUNDED allegations of massive fraud and insider trading \ affecting trillions of investors, the Nanotrasen Corporation has decided to liquidate all \ assets of the Centcom Division in order to pay the massive legal fees that will be incurred \ during the following centuries long court process. Therefore, all current employment contracts \ diff --git a/code/game/gamemodes/nuclear/nuclear.dm b/code/game/gamemodes/nuclear/nuclear.dm index e10bab49d78..676d48fff8e 100644 --- a/code/game/gamemodes/nuclear/nuclear.dm +++ b/code/game/gamemodes/nuclear/nuclear.dm @@ -64,7 +64,7 @@ proc/issyndicate(mob/living/M as mob) operative_mind.special_role = null for(var/datum/objective/nuclear/O in operative_mind.objectives) operative_mind.objectives -= O - operative_mind.current.attack_log += "\[[time_stamp()]\] No longer nuclear operative" + operative_mind.current.create_attack_log("No longer nuclear operative") if(issilicon(operative_mind.current)) to_chat(operative_mind.current, "You have been turned into a robot! You are no longer a Syndicate operative.") else diff --git a/code/game/gamemodes/nuclear/nuclear_challenge.dm b/code/game/gamemodes/nuclear/nuclear_challenge.dm index 790c6a18e34..089e91cdbec 100644 --- a/code/game/gamemodes/nuclear/nuclear_challenge.dm +++ b/code/game/gamemodes/nuclear/nuclear_challenge.dm @@ -35,7 +35,7 @@ return var/war_declaration = "[user.real_name] has declared his intent to utterly destroy [station_name()] with a nuclear device, and dares the crew to try and stop them." - command_announcement.Announce(war_declaration, "Declaration of War", 'sound/effects/siren.ogg') + event_announcement.Announce(war_declaration, "Declaration of War", 'sound/effects/siren.ogg') to_chat(user, "You've attracted the attention of powerful forces within the syndicate. A bonus bundle of telecrystals has been granted to your team. Great things await you if you complete the mission.") for(var/obj/machinery/computer/shuttle/syndicate/S in machines) diff --git a/code/game/gamemodes/revolution/revolution.dm b/code/game/gamemodes/revolution/revolution.dm index 461fe0e4ca7..1a42ae58d61 100644 --- a/code/game/gamemodes/revolution/revolution.dm +++ b/code/game/gamemodes/revolution/revolution.dm @@ -245,7 +245,7 @@ carbon_mob.flash_eyes(1, 1) rev_mind.current.Stun(5) to_chat(rev_mind.current, " You are now a revolutionary! Help your cause. Do not harm your fellow freedom fighters. You can identify your comrades by the red \"R\" icons, and your leaders by the blue \"R\" icons. Help them kill the heads to win the revolution!") - rev_mind.current.attack_log += "\[[time_stamp()]\] Has been converted to the revolution!" + rev_mind.current.create_attack_log("Has been converted to the revolution!") rev_mind.special_role = SPECIAL_ROLE_REV update_rev_icons_added(rev_mind) if(jobban_isbanned(rev_mind.current, ROLE_REV)) @@ -263,7 +263,7 @@ if((rev_mind in revolutionaries) || remove_head) revolutionaries -= rev_mind rev_mind.special_role = null - rev_mind.current.attack_log += "\[[time_stamp()]\] Has renounced the revolution!" + rev_mind.current.create_attack_log("Has renounced the revolution!") if(beingborged) to_chat(rev_mind.current, "The frame's firmware detects and deletes your neural reprogramming! You remember nothing[remove_head ? "." : " but the name of the one who flashed you."]") diff --git a/code/game/gamemodes/shadowling/shadowling.dm b/code/game/gamemodes/shadowling/shadowling.dm index 9a38af1abd3..548bf1cf6ad 100644 --- a/code/game/gamemodes/shadowling/shadowling.dm +++ b/code/game/gamemodes/shadowling/shadowling.dm @@ -148,7 +148,7 @@ Made by Xhuis shadowling_thralls += new_thrall_mind new_thrall_mind.special_role = SPECIAL_ROLE_SHADOWLING_THRALL update_shadow_icons_added(new_thrall_mind) - new_thrall_mind.current.attack_log += "\[[time_stamp()]\] Became a thrall" + new_thrall_mind.current.create_attack_log("Became a thrall") new_thrall_mind.current.add_language("Shadowling Hivemind") new_thrall_mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/lesser_glare(null)) new_thrall_mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/lesser_shadow_walk(null)) @@ -168,7 +168,7 @@ Made by Xhuis if(!istype(thrall_mind) || !(thrall_mind in shadowling_thralls) || !isliving(thrall_mind.current)) return 0 //If there is no mind, the mind isn't a thrall, or the mind's mob isn't alive, return shadowling_thralls.Remove(thrall_mind) - thrall_mind.current.attack_log += "\[[time_stamp()]\] Dethralled" + thrall_mind.current.create_attack_log("Dethralled") thrall_mind.special_role = null update_shadow_icons_removed(thrall_mind) for(var/obj/effect/proc_holder/spell/S in thrall_mind.spell_list) @@ -213,7 +213,7 @@ Made by Xhuis if(!istype(ling_mind) || !(ling_mind in shadows)) return 0 update_shadow_icons_removed(ling_mind) shadows.Remove(ling_mind) - ling_mind.current.attack_log += "\[[time_stamp()]\] Deshadowlinged" + ling_mind.current.create_attack_log("Deshadowlinged") ling_mind.special_role = null for(var/obj/effect/proc_holder/spell/S in ling_mind.spell_list) ling_mind.RemoveSpell(S) diff --git a/code/game/gamemodes/shadowling/shadowling_abilities.dm b/code/game/gamemodes/shadowling/shadowling_abilities.dm index b9525ee282e..8c67e8a807d 100644 --- a/code/game/gamemodes/shadowling/shadowling_abilities.dm +++ b/code/game/gamemodes/shadowling/shadowling_abilities.dm @@ -752,7 +752,7 @@ var/more_minutes = 9000 var/timer = shuttle_master.emergency.timeLeft() timer += more_minutes - command_announcement.Announce("Major system failure aboard the emergency shuttle. This will extend its arrival time by approximately 15 minutes..", "System Failure", 'sound/misc/notice1.ogg') + event_announcement.Announce("Major system failure aboard the emergency shuttle. This will extend its arrival time by approximately 15 minutes..", "System Failure", 'sound/misc/notice1.ogg') shuttle_master.emergency.setTimer(timer) usr.mind.spell_list.Remove(src) //Can only be used once! qdel(src) diff --git a/code/game/gamemodes/traitor/traitor.dm b/code/game/gamemodes/traitor/traitor.dm index 60a90b70638..371aef6c6a0 100644 --- a/code/game/gamemodes/traitor/traitor.dm +++ b/code/game/gamemodes/traitor/traitor.dm @@ -350,7 +350,7 @@ if(traitor_mind in traitors) ticker.mode.traitors -= traitor_mind traitor_mind.special_role = null - traitor_mind.current.attack_log += "\[[time_stamp()]\] De-traitored" + traitor_mind.current.create_attack_log("De-traitored") if(issilicon(traitor_mind.current)) to_chat(traitor_mind.current, "You have been turned into a robot! You are no longer a traitor.") else diff --git a/code/game/gamemodes/vampire/vampire.dm b/code/game/gamemodes/vampire/vampire.dm index b9e07827474..f37f846104a 100644 --- a/code/game/gamemodes/vampire/vampire.dm +++ b/code/game/gamemodes/vampire/vampire.dm @@ -275,8 +275,8 @@ You are weak to holy things and starlight. Don't go into space and avoid the Cha var/blood = 0 var/old_bloodtotal = 0 //used to see if we increased our blood total var/old_bloodusable = 0 //used to see if we increased our blood usable - owner.attack_log += text("\[[time_stamp()]\] Bit [H] ([H.ckey]) in the neck and draining their blood") - H.attack_log += text("\[[time_stamp()]\] Has been bit in the neck by [owner] ([owner.ckey])") + owner.create_attack_log("Bit [H] ([H.ckey]) in the neck and draining their blood") + H.create_attack_log("Has been bit in the neck by [owner] ([owner.ckey])") log_attack("[owner] ([owner.ckey]) bit [H] ([H.ckey]) in the neck") owner.visible_message("[owner] grabs [H]'s neck harshly and sinks in their fangs!", "You sink your fangs into [H] and begin to drain their blood.", "You hear a soft puncture and a wet sucking noise.") if(!iscarbon(owner)) @@ -335,7 +335,7 @@ You are weak to holy things and starlight. Don't go into space and avoid the Cha if(vampire_mind in vampires) ticker.mode.vampires -= vampire_mind vampire_mind.special_role = null - vampire_mind.current.attack_log += "\[[time_stamp()]\] De-vampired" + vampire_mind.current.create_attack_log("De-vampired") if(vampire_mind.vampire) vampire_mind.vampire.remove_vampire_powers() qdel(vampire_mind.vampire) diff --git a/code/game/gamemodes/wizard/soulstone.dm b/code/game/gamemodes/wizard/soulstone.dm index 29eae864fb8..cddea783625 100644 --- a/code/game/gamemodes/wizard/soulstone.dm +++ b/code/game/gamemodes/wizard/soulstone.dm @@ -26,8 +26,8 @@ to_chat(user, "A mysterious force prevents you from trapping this being's soul.") return ..() - M.attack_log += text("\[[time_stamp()]\] Has had their soul captured with [src.name] by [key_name(user)]") - user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to capture the soul of [key_name(M)]") + M.create_attack_log("Has had their soul captured with [src.name] by [key_name(user)]") + user.create_attack_log("Used the [src.name] to capture the soul of [key_name(M)]") log_attack("[key_name(user)] used the [src.name] to capture the soul of [key_name(M)]") @@ -38,7 +38,7 @@ /*attack(mob/living/simple_animal/shade/M as mob, mob/user as mob)//APPARENTLY THEY NEED THEIR OWN SPECIAL SNOWFLAKE CODE IN THE LIVING ANIMAL DEFINES if(!istype(M, /mob/living/simple_animal/shade))//If target is not a shade return ..() - user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to capture the soul of [M.name] ([M.ckey])") + user.create_attack_log("Used the [src.name] to capture the soul of [M.name] ([M.ckey])") transfer_soul("SHADE", M, user) return*/ diff --git a/code/game/gamemodes/wizard/spellbook.dm b/code/game/gamemodes/wizard/spellbook.dm index 4c06f84d7cd..0f280b6b4a2 100644 --- a/code/game/gamemodes/wizard/spellbook.dm +++ b/code/game/gamemodes/wizard/spellbook.dm @@ -699,7 +699,7 @@ else user.mind.AddSpell(S) to_chat(user, "you rapidly read through the arcane book. Suddenly you realize you understand [spellname]!") - user.attack_log += text("\[[time_stamp()]\] [user.real_name] ([user.ckey]) learned the spell [spellname] ([S]).") + user.create_attack_log("[user.real_name] ([user.ckey]) learned the spell [spellname] ([S]).") onlearned(user) diff --git a/code/game/gamemodes/wizard/wizard.dm b/code/game/gamemodes/wizard/wizard.dm index 141a19a6d90..c00e0436473 100644 --- a/code/game/gamemodes/wizard/wizard.dm +++ b/code/game/gamemodes/wizard/wizard.dm @@ -59,7 +59,7 @@ if(wizard_mind in wizards) ticker.mode.wizards -= wizard_mind wizard_mind.special_role = null - wizard_mind.current.attack_log += "\[[time_stamp()]\] De-wizarded" + wizard_mind.current.create_attack_log("De-wizarded") wizard_mind.current.spellremove(wizard_mind.current) wizard_mind.current.faction = list("Station") if(issilicon(wizard_mind.current)) diff --git a/code/game/jobs/job/supervisor.dm b/code/game/jobs/job/supervisor.dm index c3499a35fa7..090fc6681a0 100644 --- a/code/game/jobs/job/supervisor.dm +++ b/code/game/jobs/job/supervisor.dm @@ -1,4 +1,4 @@ -var/datum/announcement/minor/captain_announcement = new(do_newscast = 1) +var/datum/announcement/minor/captain_announcement = new(do_newscast = 0) /datum/job/captain title = "Captain" flag = CAPTAIN diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index 86a8b2d2bcf..8b838ceade5 100644 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -39,7 +39,7 @@ /obj/machinery/computer/communications/New() shuttle_caller_list += src ..() - crew_announcement.newscast = 1 + crew_announcement.newscast = 0 /obj/machinery/computer/communications/proc/is_authenticated(var/mob/user, var/message = 1) if(authenticated == COMM_AUTHENTICATION_MAX) @@ -292,12 +292,12 @@ to_chat(usr, "Docking request accepted!") trade_dock_timelimit = world.time + 1200 trade_dockrequest_timelimit = 0 - command_announcement.Announce("Docking request for trading ship approved, please dock at port bay 4.", "Docking Request") + event_announcement.Announce("Docking request for trading ship approved, please dock at port bay 4.", "Docking Request") if("DenyDocking") to_chat(usr, "Docking requeset denied!") trade_dock_timelimit = 0 trade_dockrequest_timelimit = 0 - command_announcement.Announce("Docking request for trading ship denied.", "Docking request") + event_announcement.Announce("Docking request for trading ship denied.", "Docking request") nanomanager.update_uis(src) return 1 diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 5f751556d0d..114bada5e19 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -476,7 +476,7 @@ About the new airlock wires panel: else if(duration) //electrify door for the given duration seconds if(usr) shockedby += text("\[[time_stamp()]\] - [usr](ckey:[usr.ckey])") - usr.attack_log += text("\[[time_stamp()]\] Electrified the [name] at [x] [y] [z]") + usr.create_attack_log("Electrified the [name] at [x] [y] [z]") else shockedby += text("\[[time_stamp()]\] - EMP)") message = "The door is now electrified [duration == -1 ? "permanently" : "for [duration] second\s"]." @@ -736,7 +736,7 @@ About the new airlock wires panel: electrify(0) else if(activate) //electrify door for 30 seconds shockedby += text("\[[time_stamp()]\][usr](ckey:[usr.ckey])") - usr.attack_log += text("\[[time_stamp()]\] Electrified the [name] at [x] [y] [z]") + usr.create_attack_log("Electrified the [name] at [x] [y] [z]") to_chat(usr, "The door is now electrified for thirty seconds.") electrify(30) if("electrify_permanently") @@ -747,7 +747,7 @@ About the new airlock wires panel: electrify(0) else if(activate) shockedby += text("\[[time_stamp()]\][usr](ckey:[usr.ckey])") - usr.attack_log += text("\[[time_stamp()]\] Electrified the [name] at [x] [y] [z]") + usr.create_attack_log("Electrified the [name] at [x] [y] [z]") to_chat(usr, "The door is now electrified.") electrify(-1) if("open") diff --git a/code/game/machinery/slotmachine.dm b/code/game/machinery/slotmachine.dm index 1c6dcf6322e..7775744ba45 100644 --- a/code/game/machinery/slotmachine.dm +++ b/code/game/machinery/slotmachine.dm @@ -59,13 +59,13 @@ spawn(25) if(roll == 1) visible_message("[src] says, 'JACKPOT! [usr.name] has won a MILLION CREDITS!'") - command_announcement.Announce("Congratulations to [usr.name] on winning the Jackpot of ONE MILLION CREDITS!", "Jackpot Winner") + event_announcement.Announce("Congratulations to [usr.name] on winning the Jackpot of ONE MILLION CREDITS!", "Jackpot Winner") result = "JACKPOT! You win one million credits!" resultlvl = "highlight" win_money(1000000, 'sound/goonstation/misc/airraid_loop.ogg') else if(roll > 1 && roll <= 5) visible_message("[src] says, 'Big Winner! [usr.name] has won a hundred thousand credits!'") - command_announcement.Announce("Congratulations to [usr.name] on winning a hundred thousand credits!", "Big Winner") + event_announcement.Announce("Congratulations to [usr.name] on winning a hundred thousand credits!", "Big Winner") result = "Big Winner! You win a hundred thousand credits!" resultlvl = "good" win_money(100000, 'sound/goonstation/misc/klaxon.ogg') diff --git a/code/game/machinery/turrets.dm b/code/game/machinery/turrets.dm index 362f69c2a4c..b8a8eddb79d 100644 --- a/code/game/machinery/turrets.dm +++ b/code/game/machinery/turrets.dm @@ -330,7 +330,7 @@ if(!(stat & BROKEN)) visible_message("[M] [M.attacktext] [src]!") add_logs(src, M, "attacked", admin=0, print_attack_log = 0) - //src.attack_log += text("\[[time_stamp()]\] was attacked by [M.name] ([M.ckey])") + //src.create_attack_log("was attacked by [M.name] ([M.ckey])") src.health -= M.melee_damage_upper if(src.health <= 0) src.die() diff --git a/code/game/mecha/equipment/weapons/weapons.dm b/code/game/mecha/equipment/weapons/weapons.dm index fedb792c37d..f9ad5b48f85 100644 --- a/code/game/mecha/equipment/weapons/weapons.dm +++ b/code/game/mecha/equipment/weapons/weapons.dm @@ -111,15 +111,15 @@ if(ismob(A)) var/mob/M = A if(istype(firer, /mob)) - M.attack_log += "\[[time_stamp()]\] [firer]/[firer.ckey] shot [M]/[M.ckey] with a [src]" - firer.attack_log += "\[[time_stamp()]\] [firer]/[firer.ckey] shot [M]/[M.ckey] with a [src]" + M.create_attack_log("[firer]/[firer.ckey] shot [M]/[M.ckey] with a [src]") + firer.create_attack_log("[firer]/[firer.ckey] shot [M]/[M.ckey] with a [src]") log_attack("[firer] ([firer.ckey]) shot [M] ([M.ckey]) with a [src]") if(!iscarbon(firer)) M.LAssailant = null else M.LAssailant = firer else - M.attack_log += "\[[time_stamp()]\] UNKNOWN SUBJECT (No longer exists) shot [M]/[M.ckey] with a [src]" + M.create_attack_log("UNKNOWN SUBJECT (No longer exists) shot [M]/[M.ckey] with a [src]") log_attack("UNKNOWN shot [M] ([M.ckey]) with a [src]") if(life <= 0) qdel(src) diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index cd3d62d44ff..b5fcb46b39c 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -512,13 +512,13 @@ take_damage(damage) check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST)) visible_message("[user] [user.attacktext] [src]!") - user.attack_log += text("\[[time_stamp()]\] attacked [src.name]") + user.create_attack_log("attacked [src.name]") else log_append_to_last("Armor saved.") playsound(loc, 'sound/weapons/slash.ogg', 50, 1, -1) occupant_message("\blue The [user]'s attack is stopped by the armor.") visible_message("\blue The [user] rebounds off [name]'s armor!") - user.attack_log += text("\[[time_stamp()]\] attacked [name]") + user.create_attack_log("attacked [name]") return /obj/mecha/hitby(atom/movable/A as mob|obj) //wrapper diff --git a/code/game/objects/items/devices/laserpointer.dm b/code/game/objects/items/devices/laserpointer.dm index 172cee5ad94..deb677b23dd 100644 --- a/code/game/objects/items/devices/laserpointer.dm +++ b/code/game/objects/items/devices/laserpointer.dm @@ -128,8 +128,8 @@ to_chat(S, "Your sensors were overloaded by a laser!") outmsg = "You overload [S] by shining [src] at their sensors." - S.attack_log += text("\[[time_stamp()]\] Has had a laser pointer shone in their eyes by [user.name] ([user.ckey])") - user.attack_log += text("\[[time_stamp()]\] Shone a laser pointer in the eyes of [S.name] ([S.ckey])") + S.create_attack_log("Has had a laser pointer shone in their eyes by [user.name] ([user.ckey])") + user.create_attack_log("Shone a laser pointer in the eyes of [S.name] ([S.ckey])") log_attack("[user.name] ([user.ckey]) Shone a laser pointer in the eyes of [S.name] ([S.ckey])") else outmsg = "You fail to overload [S] by shining [src] at their sensors." @@ -142,7 +142,7 @@ outmsg = "You hit the lens of [C] with [src], temporarily disabling the camera!" log_admin("\[[time_stamp()]\] [user.name] ([user.ckey]) EMPd a camera with a laser pointer") - user.attack_log += text("\[[time_stamp()]\] [user.name] ([user.ckey]) EMPd a camera with a laser pointer") + user.create_attack_log("[user.name] ([user.ckey]) EMPd a camera with a laser pointer") else outmsg = "You missed the lens of [C] with [src]." diff --git a/code/game/objects/items/devices/radio/headset.dm b/code/game/objects/items/devices/radio/headset.dm index ecb1c38d9d7..30e02824cd1 100644 --- a/code/game/objects/items/devices/radio/headset.dm +++ b/code/game/objects/items/devices/radio/headset.dm @@ -63,18 +63,16 @@ return RADIO_CONNECTION_FAIL return ..() - -/obj/item/device/radio/headset/receive_range(freq, level, aiOverride = 0) - if(aiOverride) - return ..(freq, level) + +/obj/item/device/radio/headset/is_listening() if(ishuman(loc)) var/mob/living/carbon/human/H = loc if(H.l_ear == src || H.r_ear == src) - return ..(freq, level) - else if(isanimal(loc)) - // frankly, all the ones with inventory are small enough to not warrant snowflaking the slot check somehow - return ..(freq, level) - return -1 + return ..() + else if(isanimal(loc) || isAI(loc)) + return ..() + + return FALSE /obj/item/device/radio/headset/alt name = "bowman headset" @@ -304,10 +302,10 @@ var/myAi = null // Atlantis: Reference back to the AI which has this radio. var/disabledAi = 0 // Atlantis: Used to manually disable AI's integrated radio via intellicard menu. -/obj/item/device/radio/headset/heads/ai_integrated/receive_range(freq, level) +/obj/item/device/radio/headset/heads/ai_integrated/is_listening() if(disabledAi) - return -1 //Transciever Disabled. - return ..(freq, level, 1) + return FALSE + return ..() /obj/item/device/radio/headset/attackby(obj/item/weapon/W as obj, mob/user as mob) user.set_machine(src) diff --git a/code/game/objects/items/devices/radio/intercom.dm b/code/game/objects/items/devices/radio/intercom.dm index 502a5da02b3..12b12c14406 100644 --- a/code/game/objects/items/devices/radio/intercom.dm +++ b/code/game/objects/items/devices/radio/intercom.dm @@ -120,15 +120,13 @@ attack_self(user) /obj/item/device/radio/intercom/receive_range(freq, level) - if(!on) + if(!is_listening()) return -1 if(!(0 in level)) var/turf/position = get_turf(src) // TODO: Integrate radio with the space manager if(isnull(position) || !(position.z in level)) return -1 - if(!src.listening) - return -1 if(freq in ANTAG_FREQS) if(!(src.syndie)) return -1//Prevents broadcast of messages over devices lacking the encryption diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index f4f95559ad9..e144c5d3c50 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -71,6 +71,7 @@ var/global/list/default_medbay_channels = list( initialize() internal_channels = default_internal_channels.Copy() + global_radios |= src /obj/item/device/radio/Destroy() qdel(wires) @@ -80,6 +81,7 @@ var/global/list/default_medbay_channels = list( for(var/ch_name in channels) radio_controller.remove_object(src, radiochannels[ch_name]) patch_link = null + global_radios -= src return ..() @@ -532,19 +534,15 @@ var/global/list/default_medbay_channels = list( // what the range is in which mobs will hear the radio // returns: -1 if can't receive, range otherwise - if(!wires || wires.IsIndexCut(WIRE_RECEIVE)) - return -1 - if(!listening) + if(!is_listening()) return -1 if(!(0 in level)) var/turf/position = get_turf(src) if(!position || !(position.z in level)) return -1 if(freq in ANTAG_FREQS) - if(!(src.syndie))//Checks to see if it's allowed on that frequency, based on the encryption keys + if(!(syndie))//Checks to see if it's allowed on that frequency, based on the encryption keys return -1 - if(!on) - return -1 if(!freq) //recieved on main frequency if(!listening) return -1 @@ -561,11 +559,26 @@ var/global/list/default_medbay_channels = list( return canhear_range /obj/item/device/radio/proc/send_hear(freq, level) - var/range = receive_range(freq, level) if(range > -1) return get_mobs_in_view(canhear_range, src) + +/obj/item/device/radio/proc/is_listening() + var/is_listening = TRUE + if(!on) + is_listening = FALSE + if(!wires || wires.IsIndexCut(WIRE_RECEIVE)) + is_listening = FALSE + if(!listening) + is_listening = FALSE + return is_listening + +/obj/item/device/radio/proc/send_announcement() + if(is_listening()) + return get_mobs_in_view(canhear_range, src) + + return null /obj/item/device/radio/examine(mob/user, var/distance = -1) . = ..(user, distance) diff --git a/code/game/objects/items/weapons/dna_injector.dm b/code/game/objects/items/weapons/dna_injector.dm index 45aabc2c073..edf3c737787 100644 --- a/code/game/objects/items/weapons/dna_injector.dm +++ b/code/game/objects/items/weapons/dna_injector.dm @@ -115,8 +115,8 @@ if(!user.IsAdvancedToolUser()) return 0 - M.attack_log += text("\[[time_stamp()]\] Has been injected with [name] by [user.name] ([user.ckey])") - user.attack_log += text("\[[time_stamp()]\] Used the [name] to inject [M.name] ([M.ckey])") + M.create_attack_log("Has been injected with [name] by [user.name] ([user.ckey])") + user.create_attack_log("Used the [name] to inject [M.name] ([M.ckey])") log_attack("[user.name] ([user.ckey]) used the [name] to inject [M.name] ([M.ckey])") if(!iscarbon(user)) diff --git a/code/game/objects/items/weapons/storage/belt.dm b/code/game/objects/items/weapons/storage/belt.dm index 05abef3956c..fe29ba5c23a 100644 --- a/code/game/objects/items/weapons/storage/belt.dm +++ b/code/game/objects/items/weapons/storage/belt.dm @@ -566,7 +566,7 @@ to_chat(user, "Planting explosives...") user.visible_message("[user.name] is fiddling with their toolbelt.") if(ismob(target)) - user.attack_log += "\[[time_stamp()]\] [user.real_name] tried planting [name] on [target:real_name] ([target:ckey])" + user.create_attack_log(" [user.real_name] tried planting [name] on [target:real_name] ([target:ckey])") log_attack(" [user.real_name] ([user.ckey]) tried planting [name] on [target:real_name] ([target:ckey])") user.visible_message("\red [user.name] is trying to strap a belt to [target.name]!") @@ -578,7 +578,7 @@ var/location if(isturf(target)) location = target if(ismob(target)) - target:attack_log += "\[[time_stamp()]\] Had the [name] planted on them by [user.real_name] ([user.ckey])" + target:create_attack_log(" Had the [name] planted on them by [user.real_name] ([user.ckey])") user.visible_message("\red [user.name] finished planting an explosive on [target.name]!") target.overlays += image('icons/obj/assemblies.dmi', "plastic-explosive2") to_chat(user, "You sacrifice your belt for the sake of justice. Timer counting down from 15.") diff --git a/code/game/objects/items/weapons/storage/bible.dm b/code/game/objects/items/weapons/storage/bible.dm index 5a21ff0dc81..21731113466 100644 --- a/code/game/objects/items/weapons/storage/bible.dm +++ b/code/game/objects/items/weapons/storage/bible.dm @@ -44,8 +44,8 @@ chaplain = 1 - M.attack_log += text("\[[time_stamp()]\] Has been attacked with [src.name] by [user.name] ([user.ckey])") - user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to attack [M.name] ([M.ckey])") + M.create_attack_log("Has been attacked with [src.name] by [user.name] ([user.ckey])") + user.create_attack_log("Used the [src.name] to attack [M.name] ([M.ckey])") log_attack("[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])") if(!iscarbon(user)) diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm index 2a22ffd563c..69a4520ea5d 100644 --- a/code/game/objects/structures/morgue.dm +++ b/code/game/objects/structures/morgue.dm @@ -382,8 +382,8 @@ if(M.stat!=2) M.emote("scream") if(istype(user)) - M.attack_log += "\[[time_stamp()]\] Has been cremated by [user.name] ([user.ckey])" - user.attack_log +="\[[time_stamp()]\] Cremated [M.name] ([M.ckey])" + M.create_attack_log("Has been cremated by [user.name] ([user.ckey])") + user.create_attack_log("Cremated [M.name] ([M.ckey])") log_attack("[user.name] ([user.ckey]) cremated [M.name] ([M.ckey])") M.death(1) if(!M || !isnull(M.gcDestroyed)) diff --git a/code/game/response_team.dm b/code/game/response_team.dm index a4ca220e5dd..6cf81f70180 100644 --- a/code/game/response_team.dm +++ b/code/game/response_team.dm @@ -331,17 +331,17 @@ var/ert_request_answered = 0 M.equip_to_slot_or_del(pda, slot_wear_pda) /datum/response_team/proc/cannot_send_team() - command_announcement.Announce("[station_name()], we are unfortunately unable to send you an Emergency Response Team at this time.", "ERT Unavailable") + event_announcement.Announce("[station_name()], we are unfortunately unable to send you an Emergency Response Team at this time.", "ERT Unavailable") /datum/response_team/proc/announce_team() - command_announcement.Announce("Attention, [station_name()]. We are sending a team of highly trained assistants to aid(?) you. Standby.", "ERT En-Route") + event_announcement.Announce("Attention, [station_name()]. We are sending a team of highly trained assistants to aid(?) you. Standby.", "ERT En-Route") // -- AMBER TEAM -- /datum/response_team/amber /datum/response_team/amber/announce_team() - command_announcement.Announce("Attention, [station_name()]. We are sending a code AMBER light Emergency Response Team. Standby.", "ERT En-Route") + event_announcement.Announce("Attention, [station_name()]. We are sending a code AMBER light Emergency Response Team. Standby.", "ERT En-Route") /datum/response_team/amber/equip_officer(var/officer_type, var/mob/living/carbon/human/M) ..() @@ -413,7 +413,7 @@ var/ert_request_answered = 0 /datum/response_team/red /datum/response_team/red/announce_team() - command_announcement.Announce("Attention, [station_name()]. We are sending a code RED Emergency Response Team. Standby.", "ERT En-Route") + event_announcement.Announce("Attention, [station_name()]. We are sending a code RED Emergency Response Team. Standby.", "ERT En-Route") /datum/response_team/red/equip_officer(var/officer_type, var/mob/living/carbon/human/M) ..() @@ -498,7 +498,7 @@ var/ert_request_answered = 0 /datum/response_team/gamma /datum/response_team/gamma/announce_team() - command_announcement.Announce("Attention, [station_name()]. We are sending a code GAMMA elite Emergency Response Team. Standby.", "ERT En-Route") + event_announcement.Announce("Attention, [station_name()]. We are sending a code GAMMA elite Emergency Response Team. Standby.", "ERT En-Route") /datum/response_team/gamma/equip_officer(var/officer_type, var/mob/living/carbon/human/M) ..() diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index bef30d63e55..bb8014037d0 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -2305,11 +2305,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_announcement.Announce("Gravity generators are again functioning within normal parameters. Sorry for any inconvenience.") + event_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_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.") + event_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("power") feedback_inc("admin_secrets_fun_used",1) @@ -2581,7 +2581,7 @@ if(is_station_level(W.z) && !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_announcement.Announce("Centcomm airlock control override activated. Please take this time to get acquainted with your coworkers.", new_sound = 'sound/AI/commandreport.ogg') + event_announcement.Announce("Centcomm airlock control override activated. Please take this time to get acquainted with your coworkers.", new_sound = 'sound/AI/commandreport.ogg') if("onlyone") feedback_inc("admin_secrets_fun_used",1) feedback_add_details("admin_secrets_fun_used","OO") diff --git a/code/modules/awaymissions/bluespaceartillery.dm b/code/modules/awaymissions/bluespaceartillery.dm index 6b6eb863b45..1da3d3bfc55 100644 --- a/code/modules/awaymissions/bluespaceartillery.dm +++ b/code/modules/awaymissions/bluespaceartillery.dm @@ -58,7 +58,7 @@ if(reload_cooldown > delta) return 1 - command_announcement.Announce("Bluespace artillery fire detected. Brace for impact.") + event_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(targetarea.type)) diff --git a/code/modules/computer3/computers/communications.dm b/code/modules/computer3/computers/communications.dm index a4fad8a16cb..bff075c4791 100644 --- a/code/modules/computer3/computers/communications.dm +++ b/code/modules/computer3/computers/communications.dm @@ -47,7 +47,7 @@ New() ..() - crew_announcement.newscast = 1 + crew_announcement.newscast = 0 Reset() ..() diff --git a/code/modules/events/alien_infestation.dm b/code/modules/events/alien_infestation.dm index 3bc26b52799..5ce9d28be35 100644 --- a/code/modules/events/alien_infestation.dm +++ b/code/modules/events/alien_infestation.dm @@ -10,7 +10,7 @@ /datum/event/alien_infestation/announce() if(successSpawn) - 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') + event_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() var/list/vents = list() diff --git a/code/modules/events/anomaly.dm b/code/modules/events/anomaly.dm index a1f951f5747..0349d09d0b8 100644 --- a/code/modules/events/anomaly.dm +++ b/code/modules/events/anomaly.dm @@ -15,7 +15,7 @@ setup(safety_loop) /datum/event/anomaly/announce() - command_announcement.Announce("Localized hyper-energetic flux wave detected on long range scanners. Expected location of impact: [impact_area.name].", "Anomaly Alert") + event_announcement.Announce("Localized hyper-energetic flux wave detected on long range scanners. Expected location of impact: [impact_area.name].", "Anomaly Alert") /datum/event/anomaly/start() var/turf/T = pick(get_area_turfs(impact_area)) diff --git a/code/modules/events/anomaly_bluespace.dm b/code/modules/events/anomaly_bluespace.dm index 65b005c2538..e5327d92b16 100644 --- a/code/modules/events/anomaly_bluespace.dm +++ b/code/modules/events/anomaly_bluespace.dm @@ -4,7 +4,7 @@ endWhen = 160 /datum/event/anomaly/anomaly_bluespace/announce() - command_announcement.Announce("Unstable bluespace anomaly detected on long range scanners. Expected location: [impact_area.name].", "Anomaly Alert") + event_announcement.Announce("Unstable bluespace anomaly detected on long range scanners. Expected location: [impact_area.name].", "Anomaly Alert") /datum/event/anomaly/anomaly_bluespace/start() var/turf/T = pick(get_area_turfs(impact_area)) @@ -33,7 +33,7 @@ var/turf/TO = get_turf(chosen) // the turf of origin we're travelling TO playsound(TO, 'sound/effects/phasein.ogg', 100, 1) - command_announcement.Announce("Massive bluespace translocation detected.", "Anomaly Alert") + event_announcement.Announce("Massive bluespace translocation detected.", "Anomaly Alert") var/list/flashers = list() for(var/mob/living/carbon/C in viewers(TO, null)) diff --git a/code/modules/events/anomaly_flux.dm b/code/modules/events/anomaly_flux.dm index b7a14ab9327..e5cebbff40d 100644 --- a/code/modules/events/anomaly_flux.dm +++ b/code/modules/events/anomaly_flux.dm @@ -4,7 +4,7 @@ endWhen = 180 /datum/event/anomaly/anomaly_flux/announce() - command_announcement.Announce("Localized hyper-energetic flux wave detected on long range scanners. Expected location: [impact_area.name].", "Anomaly Alert") + event_announcement.Announce("Localized hyper-energetic flux wave detected on long range scanners. Expected location: [impact_area.name].", "Anomaly Alert") /datum/event/anomaly/anomaly_flux/start() var/turf/T = pick(get_area_turfs(impact_area)) diff --git a/code/modules/events/anomaly_grav.dm b/code/modules/events/anomaly_grav.dm index 0c9f3776f82..19fe7a41525 100644 --- a/code/modules/events/anomaly_grav.dm +++ b/code/modules/events/anomaly_grav.dm @@ -4,7 +4,7 @@ endWhen = 70 /datum/event/anomaly/anomaly_grav/announce() - command_announcement.Announce("Gravitational anomaly detected on long range scanners. Expected location: [impact_area.name].", "Anomaly Alert") + event_announcement.Announce("Gravitational anomaly detected on long range scanners. Expected location: [impact_area.name].", "Anomaly Alert") /datum/event/anomaly/anomaly_grav/start() var/turf/T = pick(get_area_turfs(impact_area)) diff --git a/code/modules/events/anomaly_pyro.dm b/code/modules/events/anomaly_pyro.dm index b1cf81b23c3..3c2e6025952 100644 --- a/code/modules/events/anomaly_pyro.dm +++ b/code/modules/events/anomaly_pyro.dm @@ -4,7 +4,7 @@ endWhen = 110 /datum/event/anomaly/anomaly_pyro/announce() - command_announcement.Announce("Atmospheric anomaly detected on long range scanners. Expected location: [impact_area.name].", "Anomaly Alert") + event_announcement.Announce("Atmospheric anomaly detected on long range scanners. Expected location: [impact_area.name].", "Anomaly Alert") /datum/event/anomaly/anomaly_pyro/start() var/turf/T = pick(get_area_turfs(impact_area)) diff --git a/code/modules/events/anomaly_vortex.dm b/code/modules/events/anomaly_vortex.dm index c950444978e..662669509cb 100644 --- a/code/modules/events/anomaly_vortex.dm +++ b/code/modules/events/anomaly_vortex.dm @@ -4,7 +4,7 @@ endWhen = 80 /datum/event/anomaly/anomaly_vortex/announce() - command_announcement.Announce("Localized high-intensity vortex anomaly detected on long range scanners. Expected location: [impact_area.name]", "Anomaly Alert") + event_announcement.Announce("Localized high-intensity vortex anomaly detected on long range scanners. Expected location: [impact_area.name]", "Anomaly Alert") /datum/event/anomaly/anomaly_vortex/start() var/turf/T = pick(get_area_turfs(impact_area)) diff --git a/code/modules/events/blob.dm b/code/modules/events/blob.dm index 3fc9d3f1bdc..0bb69c693bb 100644 --- a/code/modules/events/blob.dm +++ b/code/modules/events/blob.dm @@ -4,7 +4,7 @@ var/obj/effect/blob/core/Blob /datum/event/blob/announce() - command_announcement.Announce("Confirmed outbreak of level 5 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", 'sound/AI/outbreak5.ogg') + event_announcement.Announce("Confirmed outbreak of level 5 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", 'sound/AI/outbreak5.ogg') /datum/event/blob/start() var/turf/T = pick(blobstart) diff --git a/code/modules/events/brand_intelligence.dm b/code/modules/events/brand_intelligence.dm index d640bca8641..8245f24b291 100644 --- a/code/modules/events/brand_intelligence.dm +++ b/code/modules/events/brand_intelligence.dm @@ -14,7 +14,7 @@ "You don't want to buy anything? Yeah, well I didn't want to buy your mom either.") /datum/event/brand_intelligence/announce() - command_announcement.Announce("Rampant brand intelligence has been detected aboard [station_name()], please stand-by. The origin is believed to be \a [originMachine.name].", "Machine Learning Alert") + event_announcement.Announce("Rampant brand intelligence has been detected aboard [station_name()], please stand-by. The origin is believed to be \a [originMachine.name].", "Machine Learning Alert") /datum/event/brand_intelligence/start() for(var/obj/machinery/vending/V in machines) diff --git a/code/modules/events/cargobonus.dm b/code/modules/events/cargobonus.dm index 75276615a40..c51c7ff41a8 100644 --- a/code/modules/events/cargobonus.dm +++ b/code/modules/events/cargobonus.dm @@ -2,7 +2,7 @@ announceWhen = 5 /datum/event/cargo_bonus/announce() - command_announcement.Announce("Congratulations! [station_name()] was chosen for a supply limit increase. Please contact the local cargo department for details!", "Supply Alert") + event_announcement.Announce("Congratulations! [station_name()] was chosen for a supply limit increase. Please contact the local cargo department for details!", "Supply Alert") /datum/event/cargo_bonus/start() supply_controller.points += rand(100,500) \ No newline at end of file diff --git a/code/modules/events/carp_migration.dm b/code/modules/events/carp_migration.dm index 13b5c884131..abab5c39254 100644 --- a/code/modules/events/carp_migration.dm +++ b/code/modules/events/carp_migration.dm @@ -14,7 +14,7 @@ announcement = "Massive migration of unknown biological entities has been detected near [station_name()], please stand-by." else announcement = "Unknown biological [spawned_carp.len == 1 ? "entity has" : "entities have"] been detected near [station_name()], please stand-by." - command_announcement.Announce(announcement, "Lifesign Alert") + event_announcement.Announce(announcement, "Lifesign Alert") /datum/event/carp_migration/start() if(severity == EVENT_LEVEL_MAJOR) diff --git a/code/modules/events/communications_blackout.dm b/code/modules/events/communications_blackout.dm index 6ada1a25c0f..1b499027150 100644 --- a/code/modules/events/communications_blackout.dm +++ b/code/modules/events/communications_blackout.dm @@ -12,7 +12,7 @@ to_chat(A, "
") if(prob(30)) //most of the time, we don't want an announcement, so as to allow AIs to fake blackouts. - command_announcement.Announce(alert) + event_announcement.Announce(alert) /datum/event/communications_blackout/start() for(var/obj/machinery/telecomms/T in telecomms_list) @@ -20,7 +20,7 @@ /proc/communications_blackout(var/silent = 1) if(!silent) - command_announcement.Announce("Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT", new_sound = 'sound/misc/interference.ogg') + event_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) to_chat(A, "
") diff --git a/code/modules/events/disease_outbreak.dm b/code/modules/events/disease_outbreak.dm index e8483ccc4ca..069ef9865af 100644 --- a/code/modules/events/disease_outbreak.dm +++ b/code/modules/events/disease_outbreak.dm @@ -7,7 +7,7 @@ announceWhen = rand(15, 30) /datum/event/disease_outbreak/announce() - command_announcement.Announce("Confirmed outbreak of level 7 major viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", new_sound = 'sound/AI/outbreak7.ogg') + event_announcement.Announce("Confirmed outbreak of level 7 major viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", new_sound = 'sound/AI/outbreak7.ogg') /datum/event/disease_outbreak/start() if(!virus_type) diff --git a/code/modules/events/electrical_storm.dm b/code/modules/events/electrical_storm.dm index c0ef182571b..94ef81ceee5 100644 --- a/code/modules/events/electrical_storm.dm +++ b/code/modules/events/electrical_storm.dm @@ -3,7 +3,7 @@ var/lightsoutRange = 25 /datum/event/electrical_storm/announce() - command_announcement.Announce("An electrical storm has been detected in your area, please repair potential electronic overloads.", "Electrical Storm Alert") + event_announcement.Announce("An electrical storm has been detected in your area, please repair potential electronic overloads.", "Electrical Storm Alert") /datum/event/electrical_storm/start() var/list/epicentreList = list() diff --git a/code/modules/events/grid_check.dm b/code/modules/events/grid_check.dm index 5a892efb691..db9dd4c6955 100644 --- a/code/modules/events/grid_check.dm +++ b/code/modules/events/grid_check.dm @@ -8,14 +8,14 @@ power_failure(0) /datum/event/grid_check/announce() - 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') + event_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() /proc/power_failure(var/announce = 1) if(announce) - 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') + event_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) var/list/skipped_areas_apc = list(/area/engine/engineering) @@ -45,7 +45,7 @@ var/list/skipped_areas_apc = list(/area/engine/engineering) if(announce) - command_announcement.Announce("Power has been restored to [station_name()]. We apologize for the inconvenience.", "Power Systems Nominal", new_sound = 'sound/AI/poweron.ogg') + event_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 apcs) var/area/current_area = get_area(C) if(current_area.type in skipped_areas_apc || !is_station_level(C.z)) @@ -64,7 +64,7 @@ /proc/power_restore_quick(var/announce = 1) if(announce) - 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') + event_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 machines) if(!is_station_level(S.z)) continue diff --git a/code/modules/events/immovable_rod.dm b/code/modules/events/immovable_rod.dm index 3012b0f9535..b1a5a0f054a 100644 --- a/code/modules/events/immovable_rod.dm +++ b/code/modules/events/immovable_rod.dm @@ -11,7 +11,7 @@ In my current plan for it, 'solid' will be defined as anything with density == 1 announceWhen = 5 /datum/event/immovable_rod/announce() - command_announcement.Announce("What the fuck was that?!", "General Alert") + event_announcement.Announce("What the fuck was that?!", "General Alert") /datum/event/immovable_rod/start() var/startside = pick(cardinal) diff --git a/code/modules/events/infestation.dm b/code/modules/events/infestation.dm index ee2aa2de868..8e4a5834ba2 100644 --- a/code/modules/events/infestation.dm +++ b/code/modules/events/infestation.dm @@ -97,7 +97,7 @@ /datum/event/infestation/announce() - command_announcement.Announce("Bioscans indicate that [vermstring] have been breeding in [locstring]. Clear them out, before this starts to affect productivity.", "Lifesign Alert") + event_announcement.Announce("Bioscans indicate that [vermstring] have been breeding in [locstring]. Clear them out, before this starts to affect productivity.", "Lifesign Alert") #undef LOC_KITCHEN #undef LOC_ATMOS diff --git a/code/modules/events/ion_storm.dm b/code/modules/events/ion_storm.dm index 20a53a4413f..4979b0889ed 100644 --- a/code/modules/events/ion_storm.dm +++ b/code/modules/events/ion_storm.dm @@ -17,7 +17,7 @@ /datum/event/ion_storm/announce() if(announceEvent == ION_ANNOUNCE || (announceEvent == ION_RANDOM && prob(ionAnnounceChance))) - command_announcement.Announce("Ion storm detected near the station. Please check all AI-controlled equipment for errors.", "Anomaly Alert", 'sound/AI/ionstorm.ogg') + event_announcement.Announce("Ion storm detected near the station. Please check all AI-controlled equipment for errors.", "Anomaly Alert", 'sound/AI/ionstorm.ogg') /datum/event/ion_storm/start() diff --git a/code/modules/events/mass_hallucination.dm b/code/modules/events/mass_hallucination.dm index a3f302cff9f..500350a037c 100644 --- a/code/modules/events/mass_hallucination.dm +++ b/code/modules/events/mass_hallucination.dm @@ -9,4 +9,4 @@ H.AdjustHallucinate(rand(50, 100)) /datum/event/mass_hallucination/announce() - command_announcement.Announce("It seems that station [station_name()] is passing through a minor radiation field, this may cause some hallucination, but no further damage") + event_announcement.Announce("It seems that station [station_name()] is passing through a minor radiation field, this may cause some hallucination, but no further damage") diff --git a/code/modules/events/meaty_gore.dm b/code/modules/events/meaty_gore.dm index 729f5182344..b9cb43deb99 100644 --- a/code/modules/events/meaty_gore.dm +++ b/code/modules/events/meaty_gore.dm @@ -1,5 +1,5 @@ /datum/event/meteor_wave/gore/announce() - command_announcement.Announce("Unknown biological debris have been detected near [station_name()], please stand-by.", "Debris Alert") + event_announcement.Announce("Unknown biological debris have been detected near [station_name()], please stand-by.", "Debris Alert") /datum/event/meteor_wave/gore/setup() waves = 3 @@ -14,4 +14,4 @@ /datum/event/meteor_wave/gore/end() - command_announcement.Announce("The station has cleared the debris.", "Debris Alert") + event_announcement.Announce("The station has cleared the debris.", "Debris Alert") diff --git a/code/modules/events/meaty_ops.dm b/code/modules/events/meaty_ops.dm index 19263c75f82..d92e79edea9 100644 --- a/code/modules/events/meaty_ops.dm +++ b/code/modules/events/meaty_ops.dm @@ -1,6 +1,6 @@ /datum/event/meteor_wave/goreop/announce() var/meteor_declaration = "MeteorOps have declared their intent to utterly destroy [station_name()] with their own bodies, and dares the crew to try and stop them." - command_announcement.Announce(meteor_declaration, "Declaration of 'War'", 'sound/effects/siren.ogg') + event_announcement.Announce(meteor_declaration, "Declaration of 'War'", 'sound/effects/siren.ogg') /datum/event/meteor_wave/goreop/setup() waves = 3 @@ -16,4 +16,4 @@ /datum/event/meteor_wave/goreops/end() - command_announcement.Announce("All MeteorOps are dead. Major Station Victory.", "MeteorOps") \ No newline at end of file + event_announcement.Announce("All MeteorOps are dead. Major Station Victory.", "MeteorOps") \ No newline at end of file diff --git a/code/modules/events/meaty_ores.dm b/code/modules/events/meaty_ores.dm index df56749734e..48d24ebeef1 100644 --- a/code/modules/events/meaty_ores.dm +++ b/code/modules/events/meaty_ores.dm @@ -1,8 +1,8 @@ /datum/event/dust/meaty/announce() if(prob(16)) - command_announcement.Announce("Unknown biological entities have been detected near [station_name()], please stand-by.", "Lifesign Alert") + event_announcement.Announce("Unknown biological entities have been detected near [station_name()], please stand-by.", "Lifesign Alert") else - command_announcement.Announce("Meaty ores have been detected on collision course with the station.", "Meaty Ore Alert", new_sound = 'sound/AI/meteors.ogg') + event_announcement.Announce("Meaty ores have been detected on collision course with the station.", "Meaty Ore Alert", new_sound = 'sound/AI/meteors.ogg') /datum/event/dust/meaty/setup() qnty = rand(45,125) diff --git a/code/modules/events/meteors.dm b/code/modules/events/meteors.dm index d26e43dba6b..b21e02bd7fa 100644 --- a/code/modules/events/meteors.dm +++ b/code/modules/events/meteors.dm @@ -10,9 +10,9 @@ /datum/event/meteor_wave/announce() switch(severity) if(EVENT_LEVEL_MAJOR) - command_announcement.Announce("Meteors have been detected on collision course with the station.", "Meteor Alert", new_sound = 'sound/AI/meteors.ogg') + event_announcement.Announce("Meteors have been detected on collision course with the station.", "Meteor Alert", new_sound = 'sound/AI/meteors.ogg') else - command_announcement.Announce("The station is now in a meteor shower.", "Meteor Alert") + event_announcement.Announce("The station is now in a meteor shower.", "Meteor Alert") //meteor showers are lighter and more common, /datum/event/meteor_wave/tick() @@ -25,9 +25,9 @@ /datum/event/meteor_wave/end() switch(severity) if(EVENT_LEVEL_MAJOR) - command_announcement.Announce("The station has cleared the meteor storm.", "Meteor Alert") + event_announcement.Announce("The station has cleared the meteor storm.", "Meteor Alert") else - command_announcement.Announce("The station has cleared the meteor shower", "Meteor Alert") + event_announcement.Announce("The station has cleared the meteor shower", "Meteor Alert") /datum/event/meteor_wave/proc/get_meteors() switch(severity) diff --git a/code/modules/events/prison_break.dm b/code/modules/events/prison_break.dm index 340ca836e94..8f16d2636ea 100644 --- a/code/modules/events/prison_break.dm +++ b/code/modules/events/prison_break.dm @@ -37,7 +37,7 @@ /datum/event/prison_break/announce() if(areas && areas.len > 0) - command_announcement.Announce("[pick("Gr3y.T1d3 virus","Malignant trojan")] detected in [station_name()] [(eventDept == "Security")? "imprisonment":"containment"] subroutines. Secure any compromised areas immediately. Station AI involvement is recommended.", "[eventDept] Alert") + event_announcement.Announce("[pick("Gr3y.T1d3 virus","Malignant trojan")] detected in [station_name()] [(eventDept == "Security")? "imprisonment":"containment"] subroutines. Secure any compromised areas immediately. Station AI involvement is recommended.", "[eventDept] Alert") /datum/event/prison_break/start() for(var/area/A in world) diff --git a/code/modules/events/radiation_storm.dm b/code/modules/events/radiation_storm.dm index 7968e2493cf..2e090979ce6 100644 --- a/code/modules/events/radiation_storm.dm +++ b/code/modules/events/radiation_storm.dm @@ -21,7 +21,7 @@ /datum/event/radiation_storm/start() spawn() - 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') + event_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') for(var/area/A in world) if(!is_station_level(A.z) || is_safe_zone(A)) @@ -32,7 +32,7 @@ sleep(600) - 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") + event_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) @@ -58,7 +58,7 @@ sleep(100) - 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") + event_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") for(var/area/A in world) if(!is_station_level(A.z) || is_safe_zone(A)) diff --git a/code/modules/events/rogue_drones.dm b/code/modules/events/rogue_drones.dm index 9b7386fe470..3a770bf7864 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 NSV Icarus. If any are sighted in the area, approach with caution." else msg = "Unidentified hackers have targetted a combat drone wing deployed from the NSV Icarus. If any are sighted in the area, approach with caution." - command_announcement.Announce(msg, "Rogue drone alert") + event_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_announcement.Announce("Icarus drone control reports the malfunctioning wing has been recovered safely.", "Rogue drone alert") + event_announcement.Announce("Icarus drone control reports the malfunctioning wing has been recovered safely.", "Rogue drone alert") else - command_announcement.Announce("Icarus drone control registers disappointment at the loss of the drones, but the survivors have been recovered.", "Rogue drone alert") + event_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 2b3ffb799df..ab703f0edc9 100644 --- a/code/modules/events/spider_infestation.dm +++ b/code/modules/events/spider_infestation.dm @@ -10,7 +10,7 @@ sent_spiders_to_station = 1 /datum/event/spider_infestation/announce() - 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') + event_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/tear.dm b/code/modules/events/tear.dm index e409f6592d8..7a13c239de0 100644 --- a/code/modules/events/tear.dm +++ b/code/modules/events/tear.dm @@ -5,7 +5,7 @@ var/obj/effect/tear/TE /datum/event/tear/announce() - command_announcement.Announce("A tear in the fabric of space and time has opened. Expected location: [impact_area.name].", "Anomaly Alert") + event_announcement.Announce("A tear in the fabric of space and time has opened. Expected location: [impact_area.name].", "Anomaly Alert") /datum/event/tear/start() var/turf/T = pick(get_area_turfs(impact_area)) diff --git a/code/modules/events/vent_clog.dm b/code/modules/events/vent_clog.dm index e5679764a39..137ffc83183 100644 --- a/code/modules/events/vent_clog.dm +++ b/code/modules/events/vent_clog.dm @@ -6,7 +6,7 @@ var/list/vents = list() /datum/event/vent_clog/announce() - command_announcement.Announce("The scrubbers network is experiencing a backpressure surge. Some ejection of contents may occur.", "Atmospherics alert") + event_announcement.Announce("The scrubbers network is experiencing a backpressure surge. Some ejection of contents may occur.", "Atmospherics alert") /datum/event/vent_clog/setup() endWhen = rand(25, 100) diff --git a/code/modules/events/wallrot.dm b/code/modules/events/wallrot.dm index a246345b632..84c0ee211c4 100644 --- a/code/modules/events/wallrot.dm +++ b/code/modules/events/wallrot.dm @@ -3,7 +3,7 @@ endWhen = announceWhen + 1 /datum/event/wallrot/announce() - command_announcement.Announce("Harmful fungi detected on station. Station structures may be contaminated.", "Biohazard Alert") + event_announcement.Announce("Harmful fungi detected on station. Station structures may be contaminated.", "Biohazard Alert") /datum/event/wallrot/start() spawn() diff --git a/code/modules/events/wormholes.dm b/code/modules/events/wormholes.dm index 398994f972d..91a4612cb16 100644 --- a/code/modules/events/wormholes.dm +++ b/code/modules/events/wormholes.dm @@ -21,7 +21,7 @@ wormholes += new /obj/effect/portal/wormhole(T, null, null, -1) /datum/event/wormholes/announce() - command_announcement.Announce("Space-time anomalies detected on the station. There is no additional data.", "Anomaly Alert", new_sound = 'sound/AI/spanomalies.ogg') + event_announcement.Announce("Space-time anomalies detected on the station. There is no additional data.", "Anomaly Alert", new_sound = 'sound/AI/spanomalies.ogg') /datum/event/wormholes/tick() if(activeFor % shift_frequency == 0) diff --git a/code/modules/food_and_drinks/kitchen_machinery/gibber.dm b/code/modules/food_and_drinks/kitchen_machinery/gibber.dm index 31d7a9d0003..908411f5731 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/gibber.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/gibber.dm @@ -258,8 +258,8 @@ new /obj/effect/decal/cleanable/blood/gibs(src) if(!UserOverride) - occupant.attack_log += "\[[time_stamp()]\] Was gibbed by [key_name(user)]" //One shall not simply gib a mob unnoticed! - user.attack_log += "\[[time_stamp()]\] Gibbed [key_name(occupant)]" + occupant.create_attack_log("Was gibbed by [key_name(user)]") //One shall not simply gib a mob unnoticed!) + user.create_attack_log("Gibbed [key_name(occupant)]") if(occupant.ckey) msg_admin_attack("[key_name_admin(user)] gibbed [key_name_admin(occupant)]") @@ -270,7 +270,7 @@ occupant.LAssailant = user else //this looks ugly but it's better than a copy-pasted startgibbing proc override - occupant.attack_log += "\[[time_stamp()]\] Was gibbed by an autogibber (\the [src])" + occupant.create_attack_log("Was gibbed by an autogibber (\the [src])") occupant.emote("scream") playsound(get_turf(src), 'sound/goonstation/effects/gib.ogg', 50, 1) diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 827f0ded62e..ebe6445121c 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -995,8 +995,8 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump, return 1 /mob/living/carbon/proc/forceFedAttackLog(var/obj/item/weapon/reagent_containers/food/toEat, mob/user) - attack_log += text("\[[time_stamp()]\] Has been fed [toEat.name] by [user.name] ([user.ckey]) Reagents: [toEat.reagentlist(toEat)]") - user.attack_log += text("\[[time_stamp()]\] Fed [toEat.name] to [name] ([ckey]) Reagents: [toEat.reagentlist(toEat)]") + create_attack_log("Has been fed [toEat.name] by [user.name] ([user.ckey]) Reagents: [toEat.reagentlist(toEat)]") + user.create_attack_log("Fed [toEat.name] to [name] ([ckey]) Reagents: [toEat.reagentlist(toEat)]") log_attack("[user.name] ([user.ckey]) fed [name] ([ckey]) with [toEat.name] Reagents: [toEat.reagentlist(toEat)] (INTENT: [uppertext(user.a_intent)])") if(!iscarbon(user)) LAssailant = null diff --git a/code/modules/mob/living/carbon/human/human_attackhand.dm b/code/modules/mob/living/carbon/human/human_attackhand.dm index cea8c962af7..a8e075f2433 100644 --- a/code/modules/mob/living/carbon/human/human_attackhand.dm +++ b/code/modules/mob/living/carbon/human/human_attackhand.dm @@ -182,8 +182,8 @@ apply_effect(2, WEAKEN, run_armor_check(affecting, "melee")) playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) visible_message("[M] has pushed [src]!") - M.attack_log += text("\[[time_stamp()]\] Pushed [src.name] ([src.ckey])") - src.attack_log += text("\[[time_stamp()]\] Has been pushed by [M.name] ([M.ckey])") + M.create_attack_log("Pushed [src.name] ([src.ckey])") + src.create_attack_log("Has been pushed by [M.name] ([M.ckey])") if(!iscarbon(M)) LAssailant = null else diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index cbf6c579f95..48cc455c113 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -187,8 +187,8 @@ emp_act --src.meatleft to_chat(user, "\red You hack off a chunk of meat from [src.name]") if(!src.meatleft) - src.attack_log += "\[[time_stamp()]\] Was chopped up into meat by [key_name(user)]" - user.attack_log += "\[[time_stamp()]\] Chopped up [key_name(src)] into meat" + src.create_attack_log("Was chopped up into meat by [key_name(user)]") + user.create_attack_log("Chopped up [key_name(src)] into meat") msg_admin_attack("[key_name_admin(user)] chopped up [key_name_admin(src)] into meat") if(!iscarbon(user)) LAssailant = null @@ -436,8 +436,8 @@ emp_act visible_message("[src] has been hit by [M.name].", \ "[src] has been hit by [M.name].") - attack_log += text("\[[time_stamp()]\] Has been attacked by \the [M] controlled by [key_name(M.occupant)] (INTENT: [uppertext(M.occupant.a_intent)])") - M.occupant.attack_log += text("\[[time_stamp()]\] Attacked [src] with \the [M] (INTENT: [uppertext(M.occupant.a_intent)])") + create_attack_log("Has been attacked by \the [M] controlled by [key_name(M.occupant)] (INTENT: [uppertext(M.occupant.a_intent)])") + M.occupant.create_attack_log("Attacked [src] with \the [M] (INTENT: [uppertext(M.occupant.a_intent)])") msg_admin_attack("[key_name_admin(M.occupant)] attacked [key_name_admin(src)] with \the [M] (INTENT: [uppertext(M.occupant.a_intent)])") else diff --git a/code/modules/mob/living/carbon/human/species/apollo.dm b/code/modules/mob/living/carbon/human/species/apollo.dm index faeecdfcc5f..416a1e8e88e 100644 --- a/code/modules/mob/living/carbon/human/species/apollo.dm +++ b/code/modules/mob/living/carbon/human/species/apollo.dm @@ -79,8 +79,8 @@ head_organ.h_style = "Bald" H.update_hair() - M.attack_log += text("\[[time_stamp()]\] removed antennae [H.name] ([H.ckey])") - H.attack_log += text("\[[time_stamp()]\] Has had their antennae removed by [M.name] ([M.ckey])") + M.create_attack_log("removed antennae [H.name] ([H.ckey])") + H.create_attack_log("Has had their antennae removed by [M.name] ([M.ckey])") msg_admin_attack("[key_name(M)] removed [key_name(H)]'s antennae") return 0 diff --git a/code/modules/mob/living/carbon/slime/slime.dm b/code/modules/mob/living/carbon/slime/slime.dm index 634e9865e45..4952a4bd61b 100644 --- a/code/modules/mob/living/carbon/slime/slime.dm +++ b/code/modules/mob/living/carbon/slime/slime.dm @@ -264,8 +264,8 @@ playsound(loc, M.attack_sound, 50, 1, 1) visible_message("[M] [M.attacktext] [src]!", \ "[M] [M.attacktext] [src]!") - M.attack_log += text("\[[time_stamp()]\] attacked [src.name] ([src.ckey])") - src.attack_log += text("\[[time_stamp()]\] was attacked by [M.name] ([M.ckey])") + M.create_attack_log("attacked [src.name] ([src.ckey])") + src.create_attack_log("was attacked by [M.name] ([M.ckey])") var/damage = rand(M.melee_damage_lower, M.melee_damage_upper) attacked += 10 adjustBruteLoss(damage) diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index 774223c0870..03e8331bde2 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -86,8 +86,8 @@ if(ismob(I.thrower)) var/mob/M = I.thrower if(M) - attack_log += text("\[[time_stamp()]\] Has been hit with a [I], thrown by [key_name(M)]") - M.attack_log += text("\[[time_stamp()]\] Hit [key_name(src)] with a thrown [I]") + create_attack_log("Has been hit with a [I], thrown by [key_name(M)]") + M.create_attack_log("Hit [key_name(src)] with a thrown [I]") if(!istype(src,/mob/living/simple_animal/mouse)) msg_admin_attack("[key_name_admin(src)] was hit by a [I], thrown by [key_name_admin(M)]") @@ -135,8 +135,8 @@ M.occupant_message("You hit [src].") visible_message("[src] has been hit by [M.name].", \ "[src] has been hit by [M.name].") - attack_log += text("\[[time_stamp()]\] Has been attacked by \the [M] controlled by [key_name(M.occupant)] (INTENT: [uppertext(M.occupant.a_intent)])") - M.occupant.attack_log += text("\[[time_stamp()]\] Attacked [src] with \the [M] (INTENT: [uppertext(M.occupant.a_intent)])") + create_attack_log("Has been attacked by \the [M] controlled by [key_name(M.occupant)] (INTENT: [uppertext(M.occupant.a_intent)])") + M.occupant.create_attack_log("Attacked [src] with \the [M] (INTENT: [uppertext(M.occupant.a_intent)])") msg_admin_attack("[key_name_admin(M.occupant)] attacked [key_name_admin(src)] with \the [M] (INTENT: [uppertext(M.occupant.a_intent)])") else diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm index 77a66e4eba0..a81dae5234a 100644 --- a/code/modules/mob/living/silicon/pai/pai.dm +++ b/code/modules/mob/living/silicon/pai/pai.dm @@ -219,8 +219,8 @@ playsound(loc, M.attack_sound, 50, 1, 1) for(var/mob/O in viewers(src, null)) O.show_message("[M] [M.attacktext] [src]!", 1) - M.attack_log += text("\[[time_stamp()]\] attacked [src.name] ([src.ckey])") - src.attack_log += text("\[[time_stamp()]\] was attacked by [M.name] ([M.ckey])") + M.create_attack_log("attacked [src.name] ([src.ckey])") + src.create_attack_log("was attacked by [M.name] ([M.ckey])") var/damage = rand(M.melee_damage_lower, M.melee_damage_upper) adjustBruteLoss(damage) updatehealth() diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 6293707cdc8..16488120798 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -1309,3 +1309,39 @@ mob/proc/yank_out_object() if(F in target.faction) return 1 return 0 + +/mob/proc/create_attack_log(var/text, var/collapse = 1)//forgive me code gods for this shitcode proc + //this proc enables lovely stuff like an attack log that looks like this: "[18:20:29-18:20:45]21x John Smith attacked Andrew Jackson with a crowbar." + //That makes the logs easier to read, but because all of this is stored in strings, weird things have to be used to get it all out. + var/new_log = "\[[time_stamp()]] [text]" + + if(length(attack_log) > 0)//if there are other logs already present + var/previous_log = attack_log[length(attack_log)]//get the latest log + var/last_log_is_range = (copytext(previous_log, 10, 11) == "-") //whether the last log is a time range or not. The "-" will be an indicator that it is. + var/x_sign_position = findtext(previous_log, "x") + + if(world.timeofday - last_log > 100)//if more than 10 seconds from last log + collapse = 0//don't collapse anyway + + //the following checks if the last log has the same contents as the new one + if(last_log_is_range) + if(!(copytext(previous_log, x_sign_position + 13) == text))//the 13 is there because of span classes; you won't see those normally in-game + collapse = 0 + else + if(!(copytext(previous_log, 12) == text)) + collapse = 0 + + + if(collapse == 1) + var/rep = 0 + var/old_timestamp = copytext(previous_log, 2, 10)//copy the first time value. This one doesn't move when it's a timespan, so no biggie + //An attack log entry can either be a time range with multiple occurences of an action or a single one, with just one time stamp + if(last_log_is_range) + + rep = text2num(copytext(previous_log, 44, x_sign_position))//get whatever number is right before the 'x' + + new_log = "\[[old_timestamp]-[time_stamp()]][rep?rep+1:2]x [text]" + attack_log -= attack_log[length(attack_log)]//remove the last log + + attack_log += new_log + last_log = world.timeofday diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index d783520b3f6..962987dcc3f 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -30,6 +30,7 @@ var/lastattacker = null var/lastattacked = null var/attack_log = list( ) + var/last_log = 0 var/obj/machinery/machine = null var/other_mobs = null var/memory = "" diff --git a/code/modules/mob/mob_grab.dm b/code/modules/mob/mob_grab.dm index a22d9bf3c6b..b03062f6e4a 100644 --- a/code/modules/mob/mob_grab.dm +++ b/code/modules/mob/mob_grab.dm @@ -269,8 +269,8 @@ state = GRAB_NECK icon_state = "grabbed+1" assailant.set_dir(get_dir(assailant, affecting)) - affecting.attack_log += "\[[time_stamp()]\] Has had their neck grabbed by [assailant.name] ([assailant.ckey])" - assailant.attack_log += "\[[time_stamp()]\] Grabbed the neck of [affecting.name] ([affecting.ckey])" + affecting.create_attack_log("Has had their neck grabbed by [assailant.name] ([assailant.ckey])") + assailant.create_attack_log("Grabbed the neck of [affecting.name] ([affecting.ckey])") log_attack("[assailant.name] ([assailant.ckey]) grabbed the neck of [affecting.name] ([affecting.ckey])") if(!iscarbon(assailant)) affecting.LAssailant = null @@ -285,8 +285,8 @@ state = GRAB_KILL assailant.visible_message("[assailant] has tightened \his grip on [affecting]'s neck!") - affecting.attack_log += "\[[time_stamp()]\] Has been strangled (kill intent) by [assailant.name] ([assailant.ckey])" - assailant.attack_log += "\[[time_stamp()]\] Strangled (kill intent) [affecting.name] ([affecting.ckey])" + affecting.create_attack_log("Has been strangled (kill intent) by [assailant.name] ([assailant.ckey])") + assailant.create_attack_log("Strangled (kill intent) [affecting.name] ([affecting.ckey])") msg_admin_attack("[key_name(assailant)] strangled (kill intent) [key_name(affecting)]") assailant.next_move = world.time + 10 @@ -338,8 +338,8 @@ damage += hat.force * 3 affecting.apply_damage(damage*rand(90, 110)/100, BRUTE, "head", affected.run_armor_check(affecting, "melee")) playsound(assailant.loc, "swing_hit", 25, 1, -1) - assailant.attack_log += text("\[[time_stamp()]\] Headbutted [affecting.name] ([affecting.ckey])") - affecting.attack_log += text("\[[time_stamp()]\] Headbutted by [assailant.name] ([assailant.ckey])") + assailant.create_attack_log("Headbutted [affecting.name] ([affecting.ckey])") + affecting.create_attack_log("Headbutted by [assailant.name] ([assailant.ckey])") msg_admin_attack("[key_name(assailant)] has headbutted [key_name(affecting)]") return @@ -357,8 +357,8 @@ return assailant.visible_message("[assailant] presses \his fingers into [affecting]'s eyes!") to_chat(affecting, "You feel immense pain as digits are being pressed into your eyes!") - assailant.attack_log += text("\[[time_stamp()]\] Pressed fingers into the eyes of [affecting.name] ([affecting.ckey])") - affecting.attack_log += text("\[[time_stamp()]\] Had fingers pressed into their eyes by [assailant.name] ([assailant.ckey])") + assailant.create_attack_log("Pressed fingers into the eyes of [affecting.name] ([affecting.ckey])") + affecting.create_attack_log("Had fingers pressed into their eyes by [assailant.name] ([assailant.ckey])") msg_admin_attack("[key_name(assailant)] has pressed his fingers into [key_name(affecting)]'s eyes.") var/obj/item/organ/internal/eyes/eyes = affected.get_int_organ(/obj/item/organ/internal/eyes) eyes.damage += rand(3,4) @@ -396,8 +396,8 @@ user.visible_message("[user] devours \the [affecting]!") if(affecting.mind) - affecting.attack_log += "\[[time_stamp()]\] Has been devoured by [attacker.name] ([attacker.ckey])" - attacker.attack_log += "\[[time_stamp()]\] Devoured [affecting.name] ([affecting.ckey])" + affecting.create_attack_log("Has been devoured by [attacker.name] ([attacker.ckey])") + attacker.create_attack_log("Devoured [affecting.name] ([affecting.ckey])") msg_admin_attack("[key_name(attacker)] devoured [key_name(affecting)]") affecting.loc = user diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index 9de96b73129..7e5f847419f 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -701,7 +701,7 @@ to_chat(H, "You feel surrounded by sadness. Sadness... and HONKS!") H.makeCluwne() else if(myeffect == "Demotion Notice") - command_announcement.Announce("[mytarget] is hereby demoted to the rank of Civilian. Process this demotion immediately. Failure to comply with these orders is grounds for termination.","CC Demotion Order") + event_announcement.Announce("[mytarget] is hereby demoted to the rank of Civilian. Process this demotion immediately. Failure to comply with these orders is grounds for termination.","CC Demotion Order") else message_admins("Evil paper [src] was activated without a proper effect set! This is a bug.") used = 1 diff --git a/code/modules/projectiles/guns/dartgun.dm b/code/modules/projectiles/guns/dartgun.dm index b8f659eb09f..6ff1b8982f6 100644 --- a/code/modules/projectiles/guns/dartgun.dm +++ b/code/modules/projectiles/guns/dartgun.dm @@ -173,8 +173,8 @@ R += A.id + " (" R += num2text(A.volume) + ")," if(istype(M, /mob)) - M.attack_log += "\[[time_stamp()]\] [user]/[user.ckey] shot [M]/[M.ckey] with a dartgun ([R])" - user.attack_log += "\[[time_stamp()]\] [user]/[user.ckey] shot [M]/[M.ckey] with a dartgun ([R])" + M.create_attack_log("[user]/[user.ckey] shot [M]/[M.ckey] with a dartgun ([R])") + user.create_attack_log("[user]/[user.ckey] shot [M]/[M.ckey] with a dartgun ([R])") if(M.ckey) msg_admin_attack("[key_name_admin(user)] shot [M] ([M.ckey]) with a dartgun ([R]).") if(!iscarbon(user)) @@ -183,7 +183,7 @@ M.LAssailant = user else - M.attack_log += "\[[time_stamp()]\] UNKNOWN SUBJECT (No longer exists) shot [key_name_admin(M)] with a dartgun ([R])" + M.create_attack_log("UNKNOWN SUBJECT (No longer exists) shot [key_name_admin(M)] with a dartgun ([R])") msg_admin_attack("UNKNOWN shot [key_name(M)] with a dartgun ([R]) (JMP)") if(D.reagents) diff --git a/code/modules/projectiles/guns/magic/wand.dm b/code/modules/projectiles/guns/magic/wand.dm index f743d29f275..a1c1d828288 100644 --- a/code/modules/projectiles/guns/magic/wand.dm +++ b/code/modules/projectiles/guns/magic/wand.dm @@ -50,7 +50,7 @@ /obj/item/weapon/gun/magic/wand/proc/zap_self(mob/living/user) user.visible_message("[user] zaps \himself with [src].") playsound(user, fire_sound, 50, 1) - user.attack_log += "\[[time_stamp()]\] [user]/[user.ckey] zapped \himself with a [src]" + user.create_attack_log("[user]/[user.ckey] zapped \himself with a [src]") ///////////////////////////////////// //WAND OF DEATH diff --git a/code/modules/projectiles/projectile/magic.dm b/code/modules/projectiles/projectile/magic.dm index 95447e2441f..19bfd4b02fa 100644 --- a/code/modules/projectiles/projectile/magic.dm +++ b/code/modules/projectiles/projectile/magic.dm @@ -221,7 +221,7 @@ proc/wabbajack(mob/living/M) else return - M.attack_log += text("\[[time_stamp()]\] [M.real_name] ([M.ckey]) became [new_mob.real_name].") + M.create_attack_log("[M.real_name] ([M.ckey]) became [new_mob.real_name].") new_mob.attack_log = M.attack_log new_mob.a_intent = I_HARM diff --git a/code/modules/reagents/reagent_containers/borghydro.dm b/code/modules/reagents/reagent_containers/borghydro.dm index c69c7b4a0ef..70ba27e7dcc 100644 --- a/code/modules/reagents/reagent_containers/borghydro.dm +++ b/code/modules/reagents/reagent_containers/borghydro.dm @@ -84,8 +84,8 @@ if(M.reagents) var/datum/reagent/injected = chemical_reagents_list[reagent_ids[mode]] var/contained = injected.name - M.attack_log += text("\[[time_stamp()]\] Has been injected with [name] by [key_name(user)]. Reagents: [contained]") - user.attack_log += text("\[[time_stamp()]\] Used the [name] to inject [key_name(M)]. Reagents: [contained]") + M.create_attack_log("Has been injected with [name] by [key_name(user)]. Reagents: [contained]") + user.create_attack_log("Used the [name] to inject [key_name(M)]. Reagents: [contained]") if(M.ckey) msg_admin_attack("[key_name_admin(user)] injected [key_name_admin(M)] with [name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)])") M.LAssailant = user diff --git a/code/modules/reagents/reagent_containers/dropper.dm b/code/modules/reagents/reagent_containers/dropper.dm index deeeb76b58d..b80adc356c7 100644 --- a/code/modules/reagents/reagent_containers/dropper.dm +++ b/code/modules/reagents/reagent_containers/dropper.dm @@ -69,8 +69,8 @@ for(var/datum/reagent/R in reagents.reagent_list) injected += R.name var/contained = english_list(injected) - M.attack_log += text("\[[time_stamp()]\] Has been squirted with [name] by [key_name(user)]. Reagents: [contained]") - user.attack_log += text("\[[time_stamp()]\] Used the [name] to squirt [key_name(M)]. Reagents: [contained]") + M.create_attack_log("Has been squirted with [name] by [key_name(user)]. Reagents: [contained]") + user.create_attack_log("Used the [name] to squirt [key_name(M)]. Reagents: [contained]") if(M.ckey) msg_admin_attack("[key_name_admin(user)] squirted [key_name_admin(M)] with [name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)])") if(!iscarbon(user)) diff --git a/code/modules/reagents/reagent_containers/glass_containers.dm b/code/modules/reagents/reagent_containers/glass_containers.dm index b3d9b148441..6df77682abe 100644 --- a/code/modules/reagents/reagent_containers/glass_containers.dm +++ b/code/modules/reagents/reagent_containers/glass_containers.dm @@ -78,8 +78,8 @@ for(var/datum/reagent/R in reagents.reagent_list) injected += R.name var/contained = english_list(injected) - M.attack_log += text("\[[time_stamp()]\] Has been splashed with [name] by [key_name(user)]. Reagents: [contained]") - user.attack_log += text("\[[time_stamp()]\] Used the [name] to splash [key_name(M)]. Reagents: [contained]") + M.create_attack_log("Has been splashed with [name] by [key_name(user)]. Reagents: [contained]") + user.create_attack_log("Used the [name] to splash [key_name(M)]. Reagents: [contained]") if(M.ckey) msg_admin_attack("[key_name_admin(user)] splashed [key_name_admin(M)] with [name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)])") if(!iscarbon(user)) diff --git a/code/modules/reagents/reagent_containers/syringes.dm b/code/modules/reagents/reagent_containers/syringes.dm index bb84295a22d..6bd1ee79cbf 100644 --- a/code/modules/reagents/reagent_containers/syringes.dm +++ b/code/modules/reagents/reagent_containers/syringes.dm @@ -196,8 +196,8 @@ for(var/datum/reagent/R in reagents.reagent_list) injected += R.name var/contained = english_list(injected) - M.attack_log += text("\[[time_stamp()]\] Has been injected with [name] by [key_name(user)]. Reagents: [contained]") - user.attack_log += text("\[[time_stamp()]\] Used the [name] to inject [key_name(M)]. Reagents: [contained]") + M.create_attack_log("Has been injected with [name] by [key_name(user)]. Reagents: [contained]") + user.create_attack_log("Used the [name] to inject [key_name(M)]. Reagents: [contained]") if(M.ckey) msg_admin_attack("[key_name_admin(user)] injected [key_name_admin(M)] with [name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)])") if(!iscarbon(user)) diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm index 6691df19a1d..a2ed354657b 100644 --- a/code/modules/recycling/disposal.dm +++ b/code/modules/recycling/disposal.dm @@ -132,8 +132,8 @@ for(var/mob/C in viewers(src)) C.show_message("\red [GM.name] has been placed in the [src] by [user].", 3) qdel(G) - usr.attack_log += text("\[[time_stamp()]\] Has placed [key_name(GM)] in disposals.") - GM.attack_log += text("\[[time_stamp()]\] Has been placed in disposals by [key_name(user)]") + usr.create_attack_log("Has placed [key_name(GM)] in disposals.") + GM.create_attack_log("Has been placed in disposals by [key_name(user)]") if(GM.ckey) msg_admin_attack("[key_name_admin(user)] placed [key_name_admin(GM)] in a disposals unit. (JMP)") return @@ -180,8 +180,8 @@ msg = "[user.name] stuffs [target.name] into the [src]!" to_chat(user, "You stuff [target.name] into the [src]!") - user.attack_log += text("\[[time_stamp()]\] Has placed [key_name(target)] in disposals.") - target.attack_log += text("\[[time_stamp()]\] Has been placed in disposals by [key_name(user)]") + user.create_attack_log("Has placed [key_name(target)] in disposals.") + target.create_attack_log("Has been placed in disposals by [key_name(user)]") if(target.ckey) msg_admin_attack("[key_name_admin(user)] placed [key_name_admin(target)] in a disposals unit") else diff --git a/code/modules/recycling/sortingmachinery.dm b/code/modules/recycling/sortingmachinery.dm index 7f7b3bfbb45..dec76eaa5f0 100755 --- a/code/modules/recycling/sortingmachinery.dm +++ b/code/modules/recycling/sortingmachinery.dm @@ -182,7 +182,7 @@ return user.visible_message("[user] wraps [target].") - user.attack_log += text("\[[time_stamp()]\] Has used [name] on [target]") + user.create_attack_log("Has used [name] on [target]") if(amount <= 0 && !src.loc) //if we used our last wrapping paper, drop a cardboard tube new /obj/item/weapon/c_tube( get_turf(user) ) diff --git a/code/modules/research/xenoarchaeology/tools/ano_device_battery.dm b/code/modules/research/xenoarchaeology/tools/ano_device_battery.dm index 8974d7ee1b0..1f530c832e7 100644 --- a/code/modules/research/xenoarchaeology/tools/ano_device_battery.dm +++ b/code/modules/research/xenoarchaeology/tools/ano_device_battery.dm @@ -210,6 +210,6 @@ M.lastattacker = user if(inserted_battery.battery_effect) - user.attack_log += "\[[time_stamp()]\] Tapped [key_name(M)] with [name] (EFFECT: [inserted_battery.battery_effect.effecttype])" - M.attack_log += "\[[time_stamp()]\] Tapped by [key_name(user)] with [name] (EFFECT: [inserted_battery.battery_effect.effecttype])" + user.create_attack_log(" Tapped [key_name(M)] with [name] (EFFECT: [inserted_battery.battery_effect.effecttype])") + M.create_attack_log(" Tapped by [key_name(user)] with [name] (EFFECT: [inserted_battery.battery_effect.effecttype])") msg_admin_attack("[key_name_admin(user)] tapped [key_name_admin(M)] with [name] (EFFECT: [inserted_battery.battery_effect.effecttype])" ) diff --git a/code/modules/security_levels/security levels.dm b/code/modules/security_levels/security levels.dm index a7a5162c231..bfa4f7449b6 100644 --- a/code/modules/security_levels/security levels.dm +++ b/code/modules/security_levels/security levels.dm @@ -7,8 +7,8 @@ //5 = code delta //config.alert_desc_blue_downto -/var/datum/announcement/priority/security/security_announcement_up = new(do_log = 0, do_newscast = 1, new_sound = sound('sound/misc/notice1.ogg')) -/var/datum/announcement/priority/security/security_announcement_down = new(do_log = 0, do_newscast = 1) +/var/datum/announcement/priority/security/security_announcement_up = new(do_log = 0, do_newscast = 0, new_sound = sound('sound/misc/notice1.ogg')) +/var/datum/announcement/priority/security/security_announcement_down = new(do_log = 0, do_newscast = 0) /proc/set_security_level(var/level) switch(level) diff --git a/code/modules/shuttle/shuttle.dm b/code/modules/shuttle/shuttle.dm index 1a03d3141c5..a6bb18bec14 100644 --- a/code/modules/shuttle/shuttle.dm +++ b/code/modules/shuttle/shuttle.dm @@ -836,7 +836,7 @@ var/global/trade_dockrequest_timelimit = 0 if(world.time < trade_dockrequest_timelimit || world.time < trade_dock_timelimit) return to_chat(usr, "Request sent.") - command_announcement.Announce(docking_request_message, "Docking Request") + event_announcement.Announce(docking_request_message, "Docking Request") trade_dockrequest_timelimit = world.time + 1200 // They have 2 minutes to approve the request. /obj/machinery/computer/shuttle/trade/sol diff --git a/code/modules/spacepods/spacepod.dm b/code/modules/spacepods/spacepod.dm index 1c71f8837ee..af18daa893a 100644 --- a/code/modules/spacepods/spacepod.dm +++ b/code/modules/spacepods/spacepod.dm @@ -213,7 +213,7 @@ var/damage = rand(user.melee_damage_lower, user.melee_damage_upper) deal_damage(damage) visible_message("[user] [user.attacktext] [src]!") - user.attack_log += text("\[[time_stamp()]\] attacked [src.name]") + user.create_attack_log("attacked [src.name]") return /obj/spacepod/attack_alien(mob/user as mob) diff --git a/code/modules/surgery/organs/organ.dm b/code/modules/surgery/organs/organ.dm index 66436d22b64..0d029c8e1ce 100644 --- a/code/modules/surgery/organs/organ.dm +++ b/code/modules/surgery/organs/organ.dm @@ -309,8 +309,8 @@ var/list/organ_cache = list() if(owner && vital && is_primary_organ()) // I'd do another check for species or whatever so that you couldn't "kill" an IPC by removing a human head from them, but it doesn't matter since they'll come right back from the dead if(user) - user.attack_log += "\[[time_stamp()]\] removed a vital organ ([src]) from [key_name(owner)] (INTENT: [uppertext(user.a_intent)])" - owner.attack_log += "\[[time_stamp()]\] had a vital organ ([src]) removed by [key_name(user)] (INTENT: [uppertext(user.a_intent)])" + user.create_attack_log(" removed a vital organ ([src]) from [key_name(owner)] (INTENT: [uppertext(user.a_intent)])") + owner.create_attack_log(" had a vital organ ([src]) removed by [key_name(user)] (INTENT: [uppertext(user.a_intent)])") msg_admin_attack("[key_name_admin(user)] removed a vital organ ([src]) from [key_name_admin(owner)]") owner.death() owner = null diff --git a/code/modules/tram/tram.dm b/code/modules/tram/tram.dm index 42b219bb92d..32b39bbe06f 100644 --- a/code/modules/tram/tram.dm +++ b/code/modules/tram/tram.dm @@ -255,7 +255,7 @@ if(prob(M.melee_damage_upper)) qdel(src) src.visible_message("[M] has [M.attacktext] [src]!") - M.attack_log += text("\[[time_stamp()]\] attacked [src.name]") + M.create_attack_log("attacked [src.name]") /obj/tram/bullet_act(var/obj/item/projectile/proj) if(prob(proj.damage)) diff --git a/html/changelog.html b/html/changelog.html index 278ebafd832..0dee1cf6183 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -56,6 +56,10 @@ -->

18 January 2017

+

AndriiYukhymchak updated:

+

Fethas updated: