Add AntagPrototype to TraitorRole and Fix traitors choice logic (#5861)
This commit is contained in:
@@ -20,6 +20,7 @@ using Content.Shared.Damage.Prototypes;
|
||||
using Content.Shared.Inventory;
|
||||
using Content.Shared.MobState.Components;
|
||||
using Content.Shared.PDA;
|
||||
using Content.Shared.Roles;
|
||||
using Content.Shared.Traitor.Uplink;
|
||||
using Robust.Server.Player;
|
||||
using Robust.Shared.Configuration;
|
||||
@@ -52,6 +53,8 @@ public class TraitorDeathMatchRuleSystem : GameRuleSystem
|
||||
|
||||
private readonly Dictionary<UplinkAccount, string> _allOriginalNames = new();
|
||||
|
||||
private const string TraitorPrototypeID = "Traitor";
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
@@ -77,7 +80,8 @@ public class TraitorDeathMatchRuleSystem : GameRuleSystem
|
||||
return;
|
||||
}
|
||||
|
||||
var traitorRole = new TraitorRole(mind);
|
||||
var antagPrototype = _prototypeManager.Index<AntagPrototype>(TraitorPrototypeID);
|
||||
var traitorRole = new TraitorRole(mind, antagPrototype);
|
||||
mind.AddRole(traitorRole);
|
||||
|
||||
// Delete anything that may contain "dangerous" role-specific items.
|
||||
|
||||
Reference in New Issue
Block a user