Antag menu (#9900)

* Refactor traitor generation code.

* RandomTraitorAlive no longer crashes when 1 traitor. Also cleaner/faster

* Add Antag menu for admins, add Traitor to the list.

* Add zombie to admin-antag menu

* Pirates, lone op, make traitor consistent with the rest.

* Add name strings

* cleaned usings.

* Cleanup.

Co-authored-by: drakewill <drake@drakewill-crl>
Co-authored-by: moonheart08 <moonheart08@users.noreply.github.com>
This commit is contained in:
drakewill-CRL
2022-07-20 05:46:23 -04:00
committed by GitHub
parent 6d53826c58
commit d02e2dad26
9 changed files with 236 additions and 92 deletions

View File

@@ -23,6 +23,7 @@ using Robust.Shared.Prototypes;
using Robust.Shared.Random;
using Robust.Shared.Utility;
using Content.Server.Traitor;
using System.Data;
namespace Content.Server.GameTicking.Rules;
@@ -287,6 +288,16 @@ public sealed class NukeopsRuleSystem : GameRuleSystem
}
}
//For admins forcing someone to nukeOps.
public void MakeLoneNukie(Mind.Mind mind)
{
if (!mind.OwnedEntity.HasValue)
return;
mind.AddRole(new TraitorRole(mind, _prototypeManager.Index<AntagPrototype>(NukeopsPrototypeId)));
_stationSpawningSystem.EquipStartingGear(mind.OwnedEntity.Value, _prototypeManager.Index<StartingGearPrototype>("SyndicateOperativeGearFull"), null);
}
private void OnStartAttempt(RoundStartAttemptEvent ev)
{
if (!RuleAdded)