Refactor minds to be entities with components, make roles components (#19591)
Co-authored-by: ShadowCommander <10494922+ShadowCommander@users.noreply.github.com> Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using Content.Server.Objectives.Interfaces;
|
||||
using Content.Server.GameTicking.Rules;
|
||||
using Content.Server.Mind;
|
||||
using Content.Server.Objectives.Interfaces;
|
||||
|
||||
namespace Content.Server.Objectives.Requirements
|
||||
{
|
||||
@@ -9,9 +10,9 @@ namespace Content.Server.Objectives.Requirements
|
||||
[DataField("traitors")]
|
||||
private int _requiredTraitors = 2;
|
||||
|
||||
public bool CanBeAssigned(Mind.Mind mind)
|
||||
public bool CanBeAssigned(EntityUid mindId, MindComponent mind)
|
||||
{
|
||||
return EntitySystem.Get<TraitorRuleSystem>().GetOtherTraitorsAliveAndConnected(mind).Count >= _requiredTraitors;
|
||||
return EntitySystem.Get<TraitorRuleSystem>().GetOtherTraitorMindsAliveAndConnected(mind).Count >= _requiredTraitors;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user