mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-10 02:41:18 +03:00
* initially works i think * yeah * pulled these numbers outta my ass * text * silly * fixy fix * fix * This sure is a videogame * init test fuck everything * sprites * fix dirty * query * another query * craftable changeling sting * remove todo * \n * doc
32 lines
1,004 B
C#
32 lines
1,004 B
C#
using Content.Shared.Popups;
|
|
using Content.Shared.Whitelist;
|
|
using Robust.Shared.GameStates;
|
|
using Robust.Shared.Prototypes;
|
|
|
|
namespace Content.Shared.Actions.Components;
|
|
|
|
/// <summary>
|
|
/// Prevents an action from being used by entities that do not pass the configured whitelist.
|
|
/// </summary>
|
|
[RegisterComponent, NetworkedComponent, Access(typeof(ActionRestrictionsSystem))]
|
|
[EntityCategory("Actions")]
|
|
public sealed partial class ActionUserWhitelistComponent : Component
|
|
{
|
|
/// <summary>
|
|
/// Whitelist that an entity must pass to use the action.
|
|
/// </summary>
|
|
[DataField(required: true)]
|
|
public EntityWhitelist Whitelist = new();
|
|
|
|
/// <summary>
|
|
/// Localization ID of the popup shown when the user does not pass <see cref="Whitelist"/>.
|
|
/// </summary>
|
|
[DataField]
|
|
public LocId? OnFailPopup;
|
|
|
|
/// <summary>
|
|
/// What type the fail popup should appear as.
|
|
/// </summary>
|
|
[DataField]
|
|
public PopupType OnFailPopupType = PopupType.SmallCaution;
|
|
}
|