mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 10:21:18 +03:00
* 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>
29 lines
967 B
C#
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;
|
|
}
|