[fix] lone ops fix (#15478)
This commit is contained in:
@@ -595,8 +595,11 @@ public sealed class NukeopsRuleSystem : GameRuleSystem
|
|||||||
|
|
||||||
var mind = mindComponent.Mind;
|
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)));
|
mind.AddRole(new TraitorRole(mind, _prototypeManager.Index<AntagPrototype>(role)));
|
||||||
_operativeMindPendingData.Remove(uid);
|
_operativeMindPendingData.Remove(uid);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ public sealed class LoneOpsSpawn : StationEventSystem
|
|||||||
[Dependency] private readonly GameTicker _gameTicker = default!;
|
[Dependency] private readonly GameTicker _gameTicker = default!;
|
||||||
[Dependency] private readonly NukeopsRuleSystem _nukeopsRuleSystem = 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 LoneOpsShuttlePath = "Maps/Shuttles/striker.yml";
|
||||||
public const string GameRuleProto = "Nukeops";
|
public const string GameRuleProto = "Nukeops";
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -246,12 +246,12 @@
|
|||||||
endAfter: 1
|
endAfter: 1
|
||||||
|
|
||||||
- type: gameRule
|
- type: gameRule
|
||||||
id: LoneOps
|
id: LoneOpsSpawn
|
||||||
config:
|
config:
|
||||||
!type:StationEventRuleConfiguration
|
!type:StationEventRuleConfiguration
|
||||||
id: LoneOps
|
id: LoneOpsSpawn
|
||||||
earliestStart: 55
|
earliestStart: 55
|
||||||
weight: 5
|
weight: 5
|
||||||
minimumPlayers: 20
|
minimumPlayers: 10
|
||||||
reoccurrenceDelay: 25
|
reoccurrenceDelay: 25
|
||||||
endAfter: 1
|
endAfter: 1
|
||||||
|
|||||||
Reference in New Issue
Block a user