- 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.Rules.Components;
@@ -50,6 +51,7 @@ public sealed class TraitorRuleSystem : GameRuleSystem<TraitorRuleComponent>
[Dependency] private readonly ObjectivesSystem _objectives = default!;
//WD EDIT
[Dependency] private readonly GameTicker _gameTicker = default!;
[Dependency] private readonly GulagSystem _gulag = default!;
private ISawmill _sawmill = default!;
@@ -308,6 +310,9 @@ public sealed class TraitorRuleSystem : GameRuleSystem<TraitorRuleComponent>
if (!GameTicker.IsGameRuleAdded(uid, gameRule))
continue;
if (_gulag.IsUserGulaged(ev.Player.UserId, out _)) // WD
continue;
if (traitor.TotalTraitors >= MaxTraitors)
continue;
if (!ev.LateJoin)