using Content.Shared.Actions.ActionTypes; using Robust.Shared.Map; using Robust.Shared.Serialization; namespace Content.Shared.Actions; public sealed class GetActionsEvent : EntityEventArgs { public SortedSet Actions = new(); } /// /// Event used to communicate with the client that the user wishes to perform some action. /// /// /// Basically a wrapper for that the action system will validate before performing /// (check cooldown, target, enabling-entity) /// [Serializable, NetSerializable] public sealed class RequestPerformActionEvent : EntityEventArgs { public readonly ActionType Action; public readonly EntityUid? EntityTarget; public readonly MapCoordinates? MapTarget; public RequestPerformActionEvent(InstantAction action) { Action = action; } public RequestPerformActionEvent(EntityTargetAction action, EntityUid entityTarget) { Action = action; EntityTarget = entityTarget; } public RequestPerformActionEvent(WorldTargetAction action, MapCoordinates mapTarget) { Action = action; MapTarget = mapTarget; } } [ImplicitDataDefinitionForInheritors] public abstract class PerformActionEvent : HandledEntityEventArgs { /// /// The user performing the action /// public EntityUid Performer; } public abstract class PerformEntityTargetActionEvent : PerformActionEvent { public EntityUid Target; } public abstract class PerformWorldTargetActionEvent : PerformActionEvent { public MapCoordinates Target; }