From ea8d7c9c7e25afa045aacb7dca1faabf94619c19 Mon Sep 17 00:00:00 2001 From: Babaev <129369024+babaevlsdd@users.noreply.github.com> Date: Fri, 10 Jan 2025 23:09:40 +0600 Subject: [PATCH] =?UTF-8?q?=D0=B4=D0=B5=D0=BB=D1=8C=D1=82=D0=B0=20=D0=B8?= =?UTF-8?q?=20=D1=8D=D0=B2=D0=B0=D0=BA=20=D0=BF=D0=BE=D1=81=D0=BB=D0=B5=20?= =?UTF-8?q?=D0=B8=D0=BA=D0=B0=D1=80=D1=83=D1=81=D0=B0=20(#1083)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AssaultOps/Icarus/IcarusTerminalSystem.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Content.Server/_Sunrise/AssaultOps/Icarus/IcarusTerminalSystem.cs b/Content.Server/_Sunrise/AssaultOps/Icarus/IcarusTerminalSystem.cs index 25d2b42985a..3bb0ecaf1d8 100644 --- a/Content.Server/_Sunrise/AssaultOps/Icarus/IcarusTerminalSystem.cs +++ b/Content.Server/_Sunrise/AssaultOps/Icarus/IcarusTerminalSystem.cs @@ -1,5 +1,6 @@ using System.Linq; using System.Numerics; +using Content.Server.AlertLevel; using Content.Server.Chat.Systems; using Content.Server.GameTicking; using Content.Server.RoundEnd; @@ -14,6 +15,7 @@ using Robust.Shared.Map.Components; using Robust.Shared.Player; using Robust.Shared.Random; +using Robust.Shared.Timing; using Robust.Shared.Utility; namespace Content.Server._Sunrise.AssaultOps.Icarus; @@ -34,6 +36,7 @@ public sealed class IcarusTerminalSystem : EntitySystem [Dependency] private readonly RoundEndSystem _roundEndSystem = default!; [Dependency] private readonly AudioSystem _audio = default!; [Dependency] private readonly ItemSlotsSystem _itemSlotsSystem = default!; + [Dependency] private readonly AlertLevelSystem _alertLevel = default!; public override void Initialize() { @@ -220,6 +223,18 @@ private void ActivateBeamOnStation(IcarusTerminalComponent component) _audio.PlayGlobal(component.FireSound, Filter.Broadcast(), false); FireBeam(GetStationArea()); + + // Ждём 10 секунд, прежде чем активировать дельту и эвакуироваться + Timer.Spawn(TimeSpan.FromSeconds(10), () => + { + var targetStation = _stationSystem.GetStations().FirstOrNull(); + if (targetStation != null) + { + _alertLevel.SetLevel(targetStation.Value, "delta", true, true, true); + } + + _roundEndSystem.DoRoundEndBehavior(RoundEndBehavior.ShuttleCall, TimeSpan.FromMinutes(1)); + }); } public MapCoordinates FireBeam(Box2 area)