Add ActionPerformedEvent, ActionsSystem.SetIfBiggerCooldown, action id to action events and BackgroundOn field (#27682)
* Add ActionPerformedEvent and ActionsSystem.SetIfBiggerCooldown * Add action id to action events and backgroundon field to action component
This commit is contained in:
@@ -47,7 +47,10 @@ public sealed class ActionOnInteractSystem : EntitySystem
|
||||
|
||||
var (actId, act) = _random.Pick(options);
|
||||
if (act.Event != null)
|
||||
{
|
||||
act.Event.Performer = args.User;
|
||||
act.Event.Action = actId;
|
||||
}
|
||||
|
||||
_actions.PerformAction(args.User, null, actId, act, act.Event, _timing.CurTime, false);
|
||||
args.Handled = true;
|
||||
@@ -75,6 +78,7 @@ public sealed class ActionOnInteractSystem : EntitySystem
|
||||
if (entAct.Event != null)
|
||||
{
|
||||
entAct.Event.Performer = args.User;
|
||||
entAct.Event.Action = entActId;
|
||||
entAct.Event.Target = args.Target.Value;
|
||||
}
|
||||
|
||||
@@ -100,6 +104,7 @@ public sealed class ActionOnInteractSystem : EntitySystem
|
||||
if (act.Event != null)
|
||||
{
|
||||
act.Event.Performer = args.User;
|
||||
act.Event.Action = actId;
|
||||
act.Event.Target = args.ClickLocation;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user