* add MindHasRole whitelist overload * add mind filters framework * add different mind filters and pools * update traitor stuff to use mind filters * line * don't duplicate kill objectives * g * gs --------- Co-authored-by: deltanedas <@deltanedas:kde.org> Co-authored-by: ScarKy0 <106310278+ScarKy0@users.noreply.github.com> Co-authored-by: ScarKy0 <scarky0@onet.eu> Co-authored-by: SlamBamActionman <slambamactionman@gmail.com>
27 lines
837 B
C#
27 lines
837 B
C#
using Content.Server.Objectives.Systems;
|
|
using Content.Shared.Mind.Filters;
|
|
|
|
namespace Content.Server.Objectives.Components;
|
|
|
|
/// <summary>
|
|
/// Sets the target for <see cref="TargetObjectiveComponent"/> to a random person from a pool and filters.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Don't copy paste this for a new objective, if you need a new filter just make a new filter and set it in YAML.
|
|
/// </remarks>
|
|
[RegisterComponent, Access(typeof(PickObjectiveTargetSystem))]
|
|
public sealed partial class PickRandomPersonComponent : Component
|
|
{
|
|
/// <summary>
|
|
/// A pool to pick potential targets from.
|
|
/// </summary>
|
|
[DataField]
|
|
public IMindPool Pool = new AliveHumansPool();
|
|
|
|
/// <summary>
|
|
/// Filters to apply to <see cref="Pool"/>.
|
|
/// </summary>
|
|
[DataField]
|
|
public List<MindFilter> Filters = new();
|
|
}
|