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

@@ -189,7 +189,7 @@ public sealed class PiratesRuleSystem : GameRuleSystem
if (spawns.Count == 0)
{
spawns.Add(Transform(_pirateShip).Coordinates);
Logger.WarningS("pirates", $"Fell back to default spawn for nukies!");
Logger.WarningS("pirates", $"Fell back to default spawn for pirates!");
}
for (var i = 0; i < ops.Length; i++)
@@ -223,6 +223,14 @@ public sealed class PiratesRuleSystem : GameRuleSystem
}); // Include the players in the appraisal.
}
//Forcing one player to be a pirate.
public void MakePirate(Mind.Mind mind)
{
if (!mind.OwnedEntity.HasValue)
return;
_stationSpawningSystem.EquipStartingGear(mind.OwnedEntity.Value, _prototypeManager.Index<StartingGearPrototype>("PirateGear"), null);
}
private void OnStartAttempt(RoundStartAttemptEvent ev)
{
if (!RuleAdded)