add(SharedDoAfterSystem): Add a IsRunning "Utility" function (#30512)
This commit is contained in:
parent
778bfe3355
commit
5bc9c04a02
1 changed files with 13 additions and 0 deletions
|
|
@ -393,5 +393,18 @@ public abstract partial class SharedDoAfterSystem : EntitySystem
|
|||
// networking whether a do-after has raised its events or not.
|
||||
return DoAfterStatus.Finished;
|
||||
}
|
||||
|
||||
public bool IsRunning(DoAfterId? id, DoAfterComponent? comp = null)
|
||||
{
|
||||
if (id == null)
|
||||
return false;
|
||||
|
||||
return GetStatus(id.Value.Uid, id.Value.Index, comp) == DoAfterStatus.Running;
|
||||
}
|
||||
|
||||
public bool IsRunning(EntityUid entity, ushort id, DoAfterComponent? comp = null)
|
||||
{
|
||||
return GetStatus(entity, id, comp) == DoAfterStatus.Running;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue