Add events for custom action target validation (#27230)
This commit is contained in:
@@ -64,7 +64,7 @@ public sealed class ActionOnInteractSystem : EntitySystem
|
||||
var entOptions = GetValidActions<EntityTargetActionComponent>(component.ActionEntities, args.CanReach);
|
||||
for (var i = entOptions.Count - 1; i >= 0; i--)
|
||||
{
|
||||
var action = entOptions[i].Comp;
|
||||
var action = entOptions[i];
|
||||
if (!_actions.ValidateEntityTarget(args.User, args.Target.Value, action))
|
||||
entOptions.RemoveAt(i);
|
||||
}
|
||||
@@ -88,7 +88,7 @@ public sealed class ActionOnInteractSystem : EntitySystem
|
||||
var options = GetValidActions<WorldTargetActionComponent>(component.ActionEntities, args.CanReach);
|
||||
for (var i = options.Count - 1; i >= 0; i--)
|
||||
{
|
||||
var action = options[i].Comp;
|
||||
var action = options[i];
|
||||
if (!_actions.ValidateWorldTarget(args.User, args.ClickLocation, action))
|
||||
options.RemoveAt(i);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user