[fix] lone ops fix (#15478)

This commit is contained in:
Scribbles0 2023-04-17 02:01:36 -07:00 committed by GitHub
parent e812e6b3e3
commit ea4a4a8358
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 354 additions and 137 deletions

View File

@ -595,8 +595,11 @@ public sealed class NukeopsRuleSystem : GameRuleSystem
var mind = mindComponent.Mind;
if (_operativeMindPendingData.TryGetValue(uid, out var role))
if (_operativeMindPendingData.TryGetValue(uid, out var role) || !_nukeopsRuleConfig.SpawnOutpost || !_nukeopsRuleConfig.EndsRound)
{
if (role == null)
role = _nukeopsRuleConfig.OperativeRoleProto;
mind.AddRole(new TraitorRole(mind, _prototypeManager.Index<AntagPrototype>(role)));
_operativeMindPendingData.Remove(uid);
}

View File

@ -15,7 +15,7 @@ public sealed class LoneOpsSpawn : StationEventSystem
[Dependency] private readonly GameTicker _gameTicker = default!;
[Dependency] private readonly NukeopsRuleSystem _nukeopsRuleSystem = default!;
public override string Prototype => "LoneOps";
public override string Prototype => "LoneOpsSpawn";
public const string LoneOpsShuttlePath = "Maps/Shuttles/striker.yml";
public const string GameRuleProto = "Nukeops";

File diff suppressed because it is too large Load Diff

View File

@ -246,12 +246,12 @@
endAfter: 1
- type: gameRule
id: LoneOps
id: LoneOpsSpawn
config:
!type:StationEventRuleConfiguration
id: LoneOps
id: LoneOpsSpawn
earliestStart: 55
weight: 5
minimumPlayers: 20
minimumPlayers: 10
reoccurrenceDelay: 25
endAfter: 1