Files
tbd-station-14/Content.Shared/Trigger/Components/Conditions/MindRoleTriggerConditionComponent.cs
slarticodefast 21460c86b0 Mindrole trigger condition (#40323)
* mind role trigger condition

* fix

* nits

---------

Co-authored-by: ArtisticRoomba <145879011+ArtisticRoomba@users.noreply.github.com>
2025-10-10 22:27:14 +00:00

28 lines
993 B
C#

using Content.Shared.Whitelist;
using Robust.Shared.GameStates;
namespace Content.Shared.Trigger.Components.Conditions;
/// <summary>
/// Checks if a triggered entity or the user of a trigger has a certain mindrole.
/// Cancels the trigger otherwise.
/// </summary>
/// <remarks>
/// Mind roles are only networked to their owner! So if you use this on any other entity than yourself it won't be predicted.
/// </remarks>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
public sealed partial class MindRoleTriggerConditionComponent : BaseTriggerConditionComponent
{
/// <summary>
/// Whitelist for what mind role components on the owning entity allow this trigger.
/// </summary>
[DataField, AutoNetworkedField]
public EntityWhitelist? EntityWhitelist;
/// <summary>
/// Whitelist for what mind role components on the User allow this trigger.
/// </summary>
[DataField, AutoNetworkedField]
public EntityWhitelist? UserWhitelist;
}