Gamerule Entities, Take 2 (#15765)

This commit is contained in:
Nemanja
2023-04-25 20:23:14 -04:00
committed by GitHub
parent 08ccb5367e
commit 59349b1b9b
124 changed files with 3102 additions and 4344 deletions

View File

@@ -13,7 +13,9 @@ namespace Content.Server.Objectives.Conditions
public IObjectiveCondition GetAssigned(Mind.Mind mind)
{
//todo shit of a fuck
var entityMgr = IoCManager.Resolve<IEntityManager>();
var traitors = entityMgr.EntitySysManager.GetEntitySystem<TraitorRuleSystem>().GetOtherTraitorsAliveAndConnected(mind).ToList();
List<Traitor.TraitorRole> removeList = new();
@@ -23,7 +25,7 @@ namespace Content.Server.Objectives.Conditions
{
foreach (var condition in objective.Conditions)
{
if (condition.GetType() == typeof(RandomTraitorProgressCondition))
if (condition is RandomTraitorProgressCondition)
{
removeList.Add(traitor);
}