CatStation/Content.Server/Objectives/Components/PickRandomPersonComponent.cs
Princess Cheeseballs c5f5a43dd7
Generic Target System (#43554)
* number 15

* evil

* borgar

* Generic Target System

* jafhfjasj

* borger

* whoops

* rename

* a

* whoop

* whoop

* thars your problem!

* asssssssssssssssssssssssssss

* fasfasfsa

* random

---------

Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
2026-07-11 04:11:24 +00:00

29 lines
967 B
C#

using Content.Server.Objectives.Systems;
using Content.Shared.EntityConditions;
using Content.Shared.Objectives.Systems;
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>
/// EntityConditions to apply to <see cref="Pool"/>.
/// If these conditions pass the mind is valid.
/// </summary>
[DataField]
[AlwaysPushInheritance]
public EntityCondition[] Conditions;
}