action refactor proper ecs edition (#27422)
This commit is contained in:
20
Content.Shared/Actions/Components/InstantActionComponent.cs
Normal file
20
Content.Shared/Actions/Components/InstantActionComponent.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using Content.Shared.Actions;
|
||||
using Robust.Shared.GameStates;
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
namespace Content.Shared.Actions.Components;
|
||||
|
||||
/// <summary>
|
||||
/// An action that raises an event as soon as it gets used.
|
||||
/// Requires <see cref="ActionComponent"/>.
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent, Access(typeof(SharedActionsSystem))]
|
||||
[EntityCategory("Actions")]
|
||||
public sealed partial class InstantActionComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// The local-event to raise when this action is performed.
|
||||
/// </summary>
|
||||
[DataField(required: true), NonSerialized]
|
||||
public InstantActionEvent? Event;
|
||||
}
|
||||
Reference in New Issue
Block a user