add StartDelay bool to actions (#33026)

* add StartDelay bool to actions

* forgot summary
This commit is contained in:
lzk
2024-10-28 23:21:14 +01:00
committed by GitHub
parent 7ac2d9a8bd
commit dc3a2f6d28
6 changed files with 12 additions and 11 deletions

View File

@@ -813,6 +813,9 @@ public abstract class SharedActionsSystem : EntitySystem
if (action.AttachedEntity != null)
RemoveAction(action.AttachedEntity.Value, actionId, action: action);
if (action.StartDelay && action.UseDelay != null)
SetCooldown(actionId, action.UseDelay.Value);
DebugTools.AssertOwner(performer, comp);
comp ??= EnsureComp<ActionsComponent>(performer);
action.AttachedEntity = performer;