action refactor proper ecs edition (#27422)

This commit is contained in:
deltanedas
2025-05-28 19:52:11 +00:00
committed by GitHub
parent a9f7cfbcb6
commit b3825dce97
111 changed files with 1995 additions and 2901 deletions

View File

@@ -0,0 +1,32 @@
namespace Content.Shared.Actions.Events;
/// <summary>
/// Raised on an action entity before being used to:
/// 1. Make sure client is sending the correct kind of target (if any)
/// 2. Do any validation on the target, if needed
/// 3. Give the action system an event to raise on the performer, to actually do the action.
/// </summary>
[ByRefEvent]
public struct ActionValidateEvent
{
/// <summary>
/// Request event the client sent.
/// </summary>
public RequestPerformActionEvent Input;
/// <summary>
/// User trying to use the action.
/// </summary>
public EntityUid User;
/// <summary>
/// Entity providing this action to the user, used for logging.
/// </summary>
public EntityUid Provider;
/// <summary>
/// If set to true, the client sent invalid event data and this should be logged as an error.
/// For functioning input that happens to not be allowed this should not be set, for example a range check.
/// </summary>
public bool Invalid;
}