Refactor actions to be entities with components (#19900)
This commit is contained in:
25
Content.Shared/Actions/WorldTargetActionComponent.cs
Normal file
25
Content.Shared/Actions/WorldTargetActionComponent.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using Robust.Shared.GameStates;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Shared.Actions;
|
||||
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed partial class WorldTargetActionComponent : BaseTargetActionComponent
|
||||
{
|
||||
public override BaseActionEvent? BaseEvent => Event;
|
||||
|
||||
/// <summary>
|
||||
/// The local-event to raise when this action is performed.
|
||||
/// </summary>
|
||||
[DataField("event")]
|
||||
[NonSerialized]
|
||||
public WorldTargetActionEvent? Event;
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class WorldTargetActionComponentState : BaseActionComponentState
|
||||
{
|
||||
public WorldTargetActionComponentState(WorldTargetActionComponent component) : base(component)
|
||||
{
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user