Skip to content

Commit

Permalink
Добавил объявление
Browse files Browse the repository at this point in the history
  • Loading branch information
pxc1984 committed Jul 6, 2024
1 parent 964e81e commit 4d97a3e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Content.Server/_Sunrise/Shuttles/CodeEquipmentSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using Content.Server.Chat.Systems;
using Content.Server.DeviceNetwork.Systems;
using Content.Server.GameTicking;
using Content.Server.Pinpointer;
using Content.Server.Shuttles.Components;
using Content.Server.Shuttles.Events;
using Content.Server.Shuttles.Systems;
Expand All @@ -18,6 +19,7 @@
using Robust.Shared.Map;
using Robust.Shared.Random;
using Robust.Shared.Timing;
using Robust.Shared.Utility;

namespace Content.Server._Sunrise.Shuttles;

Expand All @@ -28,6 +30,8 @@ public sealed class CodeEquipmentSystem : EntitySystem
[Dependency] private readonly ShuttleSystem _shuttles = default!;
[Dependency] private readonly StationSystem _station = default!;
[Dependency] private readonly ChatSystem _chat = default!;
[Dependency] private readonly NavMapSystem _nav = default!;

public override void Initialize()
{
SubscribeLocalEvent<CodeEquipmentComponent, StationPostInitEvent>(OnStationPostInit);
Expand Down Expand Up @@ -76,8 +80,9 @@ private void OnFTLCompletedEvent(EntityUid uid, CodeEquipmentShuttleComponent co
{
if (comp.EnableDockAnnouncement)
{
var xform = Transform(uid);
_chat.DispatchGlobalAnnouncement(
Loc.GetString(comp.DockAnnounceMessage),
Loc.GetString(comp.DockAnnounceMessage, ("location", FormattedMessage.RemoveMarkup(_nav.GetNearestBeaconString((uid, xform))))),
colorOverride: Color.PaleVioletRed,
announceVoice: "Azir");
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
announcement-gamma-armory = Центральное командование приняло решение отправить шаттл с оружейной комнатой Гамма кода для устранения угрозы на станции. Шаттл пристыкован { $location } Держитесь! Слава НТ!

0 comments on commit 4d97a3e

Please sign in to comment.