- fix: Gulagged objective fix. (#130)

This commit is contained in:
Aviu00
2024-02-27 20:59:43 +09:00
committed by GitHub
parent 6b8dd3ce41
commit 292743ae3e
5 changed files with 18 additions and 0 deletions

View File

@@ -1,4 +1,5 @@
using System.Linq;
using Content.Server._Miracle.GulagSystem;
using Content.Server.Antag;
using Content.Server.Chat.Managers;
using Content.Server.GameTicking;
@@ -31,6 +32,7 @@ public sealed class ChangelingRuleSystem : GameRuleSystem<ChangelingRuleComponen
[Dependency] private readonly SharedRoleSystem _roleSystem = default!;
[Dependency] private readonly ObjectivesSystem _objectives = default!;
[Dependency] private readonly ChangelingNameGenerator _nameGenerator = default!;
[Dependency] private readonly GulagSystem _gulag = default!;
private const int PlayersPerChangeling = 15;
private const int MaxChangelings = 4;
@@ -230,6 +232,9 @@ public sealed class ChangelingRuleSystem : GameRuleSystem<ChangelingRuleComponen
if (changeling.TotalChangelings >= MaxChangelings)
continue;
if (_gulag.IsUserGulaged(ev.Player.UserId, out _))
continue;
if (!ev.LateJoin)
continue;