Revert "Actions Rework" (#6888)

This commit is contained in:
Leon Friedrich
2022-02-25 18:55:18 +13:00
committed by GitHub
parent 5ac5dd6a64
commit 49ae383f06
135 changed files with 5165 additions and 3119 deletions

View File

@@ -1,61 +0,0 @@
using Content.Shared.Actions.ActionTypes;
using Robust.Shared.Map;
using Robust.Shared.Serialization;
namespace Content.Shared.Actions;
public sealed class GetActionsEvent : EntityEventArgs
{
public SortedSet<ActionType> Actions = new();
}
/// <summary>
/// Event used to communicate with the client that the user wishes to perform some action.
/// </summary>
/// <remarks>
/// Basically a wrapper for <see cref="PerformActionEvent"/> that the action system will validate before performing
/// (check cooldown, target, enabling-entity)
/// </remarks>
[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
{
/// <summary>
/// The user performing the action
/// </summary>
public EntityUid Performer;
}
public abstract class PerformEntityTargetActionEvent : PerformActionEvent
{
public EntityUid Target;
}
public abstract class PerformWorldTargetActionEvent : PerformActionEvent
{
public MapCoordinates Target;
}