From 8c3e72c8c8a089706a224a8089626ba8412bb724 Mon Sep 17 00:00:00 2001 From: Tayrtahn Date: Sun, 7 Jul 2024 23:33:17 -0400 Subject: [PATCH] Silence ringtones on admin PDAs (#29801) * Silence ringtones on invisible PDAs * Revert "Silence ringtones on invisible PDAs" This reverts commit afc1041f31eebe82e83630a856a8856b877a9826. * Literally just this * Add an admin announcement for news article publishing --- Content.Server/MassMedia/Systems/NewsSystem.cs | 8 ++++++++ Resources/Locale/en-US/mass-media/news-ui.ftl | 1 + Resources/Prototypes/Entities/Objects/Devices/pda.yml | 1 + 3 files changed, 10 insertions(+) diff --git a/Content.Server/MassMedia/Systems/NewsSystem.cs b/Content.Server/MassMedia/Systems/NewsSystem.cs index 0fb5d42394..9f917d6dbf 100644 --- a/Content.Server/MassMedia/Systems/NewsSystem.cs +++ b/Content.Server/MassMedia/Systems/NewsSystem.cs @@ -20,6 +20,7 @@ using Content.Server.Station.Systems; using Content.Shared.Popups; using Content.Shared.StationRecords; using Robust.Shared.Audio.Systems; +using Content.Server.Chat.Managers; namespace Content.Server.MassMedia.Systems; @@ -35,6 +36,7 @@ public sealed class NewsSystem : SharedNewsSystem [Dependency] private readonly GameTicker _ticker = default!; [Dependency] private readonly AccessReaderSystem _accessReader = default!; [Dependency] private readonly IdCardSystem _idCardSystem = default!; + [Dependency] private readonly IChatManager _chatManager = default!; public override void Initialize() { @@ -161,6 +163,12 @@ public sealed class NewsSystem : SharedNewsSystem $"{ToPrettyString(msg.Actor):actor} created news article {article.Title} by {article.Author}: {article.Content}" ); + _chatManager.SendAdminAnnouncement(Loc.GetString("news-publish-admin-announcement", + ("actor", msg.Actor), + ("title", article.Title), + ("author", article.Author ?? Loc.GetString("news-read-ui-no-author")) + )); + articles.Add(article); var args = new NewsArticlePublishedEvent(article); diff --git a/Resources/Locale/en-US/mass-media/news-ui.ftl b/Resources/Locale/en-US/mass-media/news-ui.ftl index 9f62fe75c0..1553a24b4a 100644 --- a/Resources/Locale/en-US/mass-media/news-ui.ftl +++ b/Resources/Locale/en-US/mass-media/news-ui.ftl @@ -34,3 +34,4 @@ news-write-ui-richtext-tooltip = News articles support rich text {"[bullet/]bullet[/color]"} news-pda-notification-header = New news article +news-publish-admin-announcement = {$actor} published news article {$title} by {$author}" diff --git a/Resources/Prototypes/Entities/Objects/Devices/pda.yml b/Resources/Prototypes/Entities/Objects/Devices/pda.yml index b1a6ab0b8f..84f0f4ae94 100644 --- a/Resources/Prototypes/Entities/Objects/Devices/pda.yml +++ b/Resources/Prototypes/Entities/Objects/Devices/pda.yml @@ -667,6 +667,7 @@ scanDelay: 0 - type: CartridgeLoader uiKey: enum.PdaUiKey.Key + notificationsEnabled: false preinstalled: - CrewManifestCartridge - NotekeeperCartridge -- 2.51.2