CatStation/Content.Shared/Actions/Components/ActionUserWhitelistComponent.cs
AndrewFenriz dd46064672
Unify blink and katana dash teleportation (also removed EnergyKatana system/component) (#45041)
* ActionRestrictions

* katana use ActionGrant/ItemActionGrant

* TeleportAction

* no more DashAbility

* no more TeleportSpell

* no more EnergyKatana

* cleanup

* fix whitelist and popup

* docs

* display recharge cooldown

* refactor: whitespace consistency!111

* Revert "display recharge cooldown"

This reverts commit 3b93b179

* popup for limited charges

* maybe fix

* no more CanUseCharge

* upd

* better?

* refactor: using _SharedPhysicsSystem for TeleportActionSystem collision detection + small refactoring

* refactor: xml-doc

---------

Co-authored-by: Fildrance <fildrance@gmail.com>
2026-08-09 12:27:08 +00:00

25 lines
807 B
C#

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;
}