Skip to content

Commit

Permalink
fix prison round end text
Browse files Browse the repository at this point in the history
  • Loading branch information
Doublechest committed Aug 17, 2024
1 parent 41ba17b commit a483fd9
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Content.Server/Stories/Prison/PrisonSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
using Robust.Server.Player;
using Content.Shared.Mind;
using Content.Server.Mind;
using Content.Shared.Roles;
using Content.Shared.Roles.Jobs;

namespace Content.Server.Stories.Prison;

Expand All @@ -41,7 +43,7 @@ public sealed partial class PrisonSystem : EntitySystem
[Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly MobStateSystem _mobState = default!;
[Dependency] private readonly StatusEffectsSystem _statusEffects = default!;
private const string PrisonerJobId = "PRISONPrisoner";
private readonly ProtoId<JobPrototype> _prisonerJobId = "PRISONPrisoner";
private const string PacifiedKey = "Pacified";
/// <summary>
/// Процент сбежавших зеков для их полной победы.
Expand Down Expand Up @@ -76,9 +78,11 @@ private void OnRoundEndText(RoundEndTextAppendEvent args)
int alivePrisoners = 0;
HashSet<EntityUid> escapedPrisoners = new();

foreach (var (player, jobs) in stationJobs.PlayerJobs)

var queryPrisonersMinds = EntityQueryEnumerator<JobComponent, MindComponent>();
while (queryPrisonersMinds.MoveNext(out var uid, out var job, out var mind))
{
if (jobs.Contains(PrisonerJobId))
if (job.Prototype == _prisonerJobId)
roundstartPrisoners++;
}

Expand Down

0 comments on commit a483fd9

Please sign in to comment.