Skip to content

Commit

Permalink
Революция теперь заканчивается сразу после убийства всех глав (#1068)
Browse files Browse the repository at this point in the history
* Update RevolutionaryRuleSystem.cs

* автоматический эпсилон при смерти глав
  • Loading branch information
babaevlsdd authored Jan 10, 2025
1 parent 7c1e8dc commit f1e22f6
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Content.Server/GameTicking/Rules/RevolutionaryRuleSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
using Content.Server.RoundEnd;
using Content.Server.Shuttles.Systems;
using Content.Server.Station.Systems;
using Content.Server.AlertLevel; // Sunrise-Edit
using Content.Shared.Database;
using Content.Shared.GameTicking.Components;
using Content.Shared.Humanoid;
Expand Down Expand Up @@ -49,6 +50,7 @@ public sealed class RevolutionaryRuleSystem : GameRuleSystem<RevolutionaryRuleCo
[Dependency] private readonly RoundEndSystem _roundEnd = default!;
[Dependency] private readonly StationSystem _stationSystem = default!;
[Dependency] private readonly IGameTiming _timing = default!;
[Dependency] private readonly AlertLevelSystem _alertLevel = default!; // Sunrise-Edit

//Used in OnPostFlash, no reference to the rule component is available
public readonly ProtoId<NpcFactionPrototype> RevolutionaryNpcFaction = "Revolutionary";
Expand Down Expand Up @@ -81,7 +83,14 @@ protected override void ActiveTick(EntityUid uid, RevolutionaryRuleComponent com

if (CheckCommandLose())
{
_roundEnd.DoRoundEndBehavior(RoundEndBehavior.ShuttleCall, component.ShuttleCallTime);
// Sunrise-Edit-Start
var stations = _stationSystem.GetStations();
foreach (var station in stations)
{
_alertLevel.SetLevel(station, "epsilon", true, true, true);
}
_roundEnd.EndRound();
// Sunrise-Edit-End
GameTicker.EndGameRule(uid, gameRule);
}
}
Expand Down

0 comments on commit f1e22f6

Please sign in to comment.