Skip to content

Commit

Permalink
дельта и эвак после икаруса (#1083)
Browse files Browse the repository at this point in the history
  • Loading branch information
babaevlsdd authored Jan 10, 2025
1 parent b8667f6 commit ea8d7c9
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Content.Server/_Sunrise/AssaultOps/Icarus/IcarusTerminalSystem.cs
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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;
Expand All @@ -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()
{
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit ea8d7c9

Please sign in to comment.