CatStation/Content.Shared/Actions/Events/ActionAttemptEvent.cs
ScarKy0 1cdf296bb6
Action Requirements (#46029)
* FAILURE

* oh it was that easy

* actually this is how its supposed to be yeah

* remove mobstate and satiation

* replacements

* cleaner

* discord remarks

* refactor: extract ActionRequirementsSystem.DoCancel method, fix typo in ActionRequirementsComponent

* review

---------

Co-authored-by: Fildrance <fildrance@gmail.com>
2026-09-16 12:08:40 +00:00

10 lines
421 B
C#

using Content.Shared.Popups;
namespace Content.Shared.Actions.Events;
/// <summary>
/// Raised before an action is used and can be cancelled to prevent it.
/// Allowed to have side effects like modifying the action components.
/// </summary>
[ByRefEvent]
public record struct ActionAttemptEvent(EntityUid User, EntityUid? Target, bool Cancelled = false, string? Reason = null, PopupType Type = PopupType.SmallCaution);