Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BlobFix #487

Merged
merged 1 commit into from
Feb 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 14 additions & 7 deletions Content.Server/Backmen/GameTicking/Rules/BlobRuleSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Content.Server.AlertLevel;
using Content.Server.Backmen.GameTicking.Rules.Components;
using Content.Server.Backmen.SpecForces;
using Content.Server.Chat.Managers;
using Content.Server.Chat.Systems;
using Content.Server.GameTicking;
using Content.Server.GameTicking.Rules;
Expand All @@ -10,6 +11,7 @@
using Content.Server.Nuke;
using Content.Server.Objectives;
using Content.Server.RoundEnd;
using Content.Server.Station.Components;
using Content.Server.Station.Systems;
using Content.Shared.Backmen.Blob;
using Content.Shared.Objectives.Components;
Expand All @@ -25,6 +27,8 @@ public sealed class BlobRuleSystem : GameRuleSystem<BlobRuleComponent>
[Dependency] private readonly NukeCodePaperSystem _nukeCode = default!;
[Dependency] private readonly StationSystem _stationSystem = default!;
[Dependency] private readonly ObjectivesSystem _objectivesSystem = default!;
[Dependency] private readonly AlertLevelSystem _alertLevelSystem = default!;
[Dependency] private readonly IChatManager _chatManager = default!;

private ISawmill _sawmill = default!;
private static readonly SoundPathSpecifier BlobDetectAudio = new SoundPathSpecifier("/Audio/Corvax/Adminbuse/Outbreak5.ogg");
Expand Down Expand Up @@ -67,15 +71,20 @@ public override void Update(float frameTime)
}

var stationUid = _stationSystem.GetOwningStation(ent);
if (stationUid == null || !HasComp<StationEventEligibleComponent>(stationUid.Value))
{
_chatManager.SendAdminAlert(ent, Loc.GetString("blob-alert-out-off-station"));
QueueDel(ent);
continue;
}
switch (blobRuleComp.Stage)
{
case BlobStage.Default when comp.BlobTiles.Count < 30:
continue;
case BlobStage.Default:
_chatSystem.DispatchGlobalAnnouncement(Loc.GetString("blob-alert-detect"),
Loc.GetString("Station"), true, BlobDetectAudio, Color.Red);
EntitySystem.Get<AlertLevelSystem>()
.SetLevel(stationUid!.Value, "sigma", true, true, true, false);
_alertLevelSystem.SetLevel(stationUid.Value, "sigma", true, true, true, true);
blobRuleComp.Stage = BlobStage.Begin;
break;
case BlobStage.Begin:
Expand All @@ -87,12 +96,10 @@ public override void Update(float frameTime)
true,
blobRuleComp.AlertAudio,
Color.Red);
if (stationUid != null)
_nukeCode.SendNukeCodes(stationUid.Value);
blobRuleComp.Stage = BlobStage.Critical;
EntitySystem.Get<AlertLevelSystem>()
.SetLevel(stationUid!.Value, "gamma", true, true, true, false);

_nukeCode.SendNukeCodes(stationUid.Value);
blobRuleComp.Stage = BlobStage.Critical;
_alertLevelSystem.SetLevel(stationUid.Value, "gamma", true, true, true, true);
EntityManager.System<SpecForcesSystem>().CallOps(SpecForcesType.RXBZZ, "ДСО");
}

Expand Down
6 changes: 6 additions & 0 deletions Resources/Locale/ru-RU/blob/blob.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ blob-chem-electromagneticweb-info =
Наносит 20 урона ожогами, 20% шанс вызывать ЭМИ разряд при атаке.
Любая уничтоженая плитка гарантировано вызовет ЭМИ.
Вы получаете на 25% больше урона теплом и брутом.

blob-alert-out-off-station = Блоб был удален т.к. был обнаружен вне станции!

blob-title=Блоб
blob-description=Все мы блоб...

# Announcment
blob-alert-recall-shuttle = Эвакуационный шатл не может быть отправлен на станцию пока существует биологическая угроза 5 уровня.
blob-alert-detect = На станции была обнаружена биологическая угроза 5 уровня, обьявлена изоляция станции.
Expand Down
Loading