]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Silence ringtones on admin PDAs (#29801)
authorTayrtahn <tayrtahn@gmail.com>
Mon, 8 Jul 2024 03:33:17 +0000 (23:33 -0400)
committerGitHub <noreply@github.com>
Mon, 8 Jul 2024 03:33:17 +0000 (13:33 +1000)
* 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
Resources/Locale/en-US/mass-media/news-ui.ftl
Resources/Prototypes/Entities/Objects/Devices/pda.yml

index 0fb5d4239494953e30d4da7cc0c726c191ad5705..9f917d6dbfaf7317920e3b6257f0a9f65882309e 100644 (file)
@@ -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);
index 9f62fe75c0c1af5802480a6e03da93ef55776198..1553a24b4afe84f4fc81a952ad55ae4b1004a1d4 100644 (file)
@@ -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}"
index b1a6ab0b8fa6be9bef2eb26716c5f65377627dfc..84f0f4ae94c8e8cdec41c3b84364bfe4ddd0f0c0 100644 (file)
     scanDelay: 0
   - type: CartridgeLoader
     uiKey: enum.PdaUiKey.Key
+    notificationsEnabled: false
     preinstalled:
       - CrewManifestCartridge
       - NotekeeperCartridge