ActionComponentChangeEvent.cs 651 B

123456789101112131415161718192021222324252627
  1. using Robust.Shared.Prototypes;
  2. namespace Content.Shared.Actions.Events;
  3. /// <summary>
  4. /// Adds / removes the component upon action.
  5. /// </summary>
  6. [Virtual]
  7. public partial class ActionComponentChangeEvent : InstantActionEvent
  8. {
  9. [DataField(required: true)]
  10. public ComponentRegistry Components = new();
  11. }
  12. /// <summary>
  13. /// Similar to <see cref="ActionComponentChangeEvent"/> except raises an event to attempt to relay it.
  14. /// </summary>
  15. public sealed partial class RelayedActionComponentChangeEvent : ActionComponentChangeEvent
  16. {
  17. }
  18. [ByRefEvent]
  19. public record struct AttemptRelayActionComponentChangeEvent
  20. {
  21. public EntityUid? Target;
  22. }