Files
tbd-station-14/Content.Server/Objectives/Components/RoleRequirementComponent.cs
slarticodefast f6bfce38da remove mind roles from EntityWhitelist (#36089)
* remove mind roles from EntityWhitelist

* remove redundant dependency
2025-04-10 20:45:12 +10:00

20 lines
744 B
C#

using Content.Server.Objectives.Systems;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Generic;
namespace Content.Server.Objectives.Components;
/// <summary>
/// Requires that the player's mind matches a whitelist.
/// Typical use is checking for (antagonist) roles.
/// </summary>
[RegisterComponent, Access(typeof(RoleRequirementSystem))]
public sealed partial class RoleRequirementComponent : Component
{
/// <summary>
/// Mind role component whitelist.
/// </summary>
[DataField(required: true, customTypeSerializer: typeof(CustomHashSetSerializer<string, ComponentNameSerializer>))]
public HashSet<string> Roles = new();
}