2025-08-08 16:58:46 +01:00
|
|
|
using Content.Server.Objectives.Systems;
|
|
|
|
|
using Content.Shared.Mind.Filters;
|
|
|
|
|
|
2023-09-16 07:18:10 +01:00
|
|
|
namespace Content.Server.Objectives.Components;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2025-08-08 16:58:46 +01:00
|
|
|
/// Sets the target for <see cref="TargetObjectiveComponent"/> to a random person from a pool and filters.
|
2023-09-16 07:18:10 +01:00
|
|
|
/// </summary>
|
2025-08-08 16:58:46 +01:00
|
|
|
/// <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();
|
|
|
|
|
}
|