Action stuff (#31305)
* Action stuff - Cleanup some event stuff - Avoid dirtying entity unnecessarily - Add ActionGrant as an easy way to apply / remove actions via compregistry. * Fix merge
This commit is contained in:
27
Content.Shared/Actions/Events/ActionComponentChangeEvent.cs
Normal file
27
Content.Shared/Actions/Events/ActionComponentChangeEvent.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
namespace Content.Shared.Actions.Events;
|
||||
|
||||
/// <summary>
|
||||
/// Adds / removes the component upon action.
|
||||
/// </summary>
|
||||
[Virtual]
|
||||
public partial class ActionComponentChangeEvent : InstantActionEvent
|
||||
{
|
||||
[DataField(required: true)]
|
||||
public ComponentRegistry Components = new();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Similar to <see cref="ActionComponentChangeEvent"/> except raises an event to attempt to relay it.
|
||||
/// </summary>
|
||||
public sealed partial class RelayedActionComponentChangeEvent : ActionComponentChangeEvent
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
[ByRefEvent]
|
||||
public record struct AttemptRelayActionComponentChangeEvent
|
||||
{
|
||||
public EntityUid? Target;
|
||||
}
|
||||
Reference in New Issue
Block a user