Add events for custom action target validation (#27230)

This commit is contained in:
DrSmugleaf
2024-04-22 01:39:50 -07:00
committed by GitHub
parent 210e6f6444
commit b0e6ff6779
5 changed files with 39 additions and 10 deletions

View File

@@ -200,7 +200,7 @@ public sealed class ActionUIController : UIController, IOnStateChanged<GameplayS
var coords = args.Coordinates;
if (!_actionsSystem.ValidateWorldTarget(user, coords, action))
if (!_actionsSystem.ValidateWorldTarget(user, coords, (actionId, action)))
{
// Invalid target.
if (action.DeselectOnMiss)
@@ -235,7 +235,7 @@ public sealed class ActionUIController : UIController, IOnStateChanged<GameplayS
var entity = args.EntityUid;
if (!_actionsSystem.ValidateEntityTarget(user, entity, action))
if (!_actionsSystem.ValidateEntityTarget(user, entity, (actionId, action)))
{
if (action.DeselectOnMiss)
StopTargeting();