DoAfter can now raise events so you don't need to use async with it (#4253)
This commit is contained in:
committed by
GitHub
parent
d5e34c6ad4
commit
ef958185fb
@@ -81,6 +81,36 @@ namespace Content.Server.DoAfter
|
||||
/// </summary>
|
||||
public Func<bool>? ExtraCheck { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Event to be raised directed to the <see cref="User"/> entity when the DoAfter is cancelled.
|
||||
/// </summary>
|
||||
public EntityEventArgs? UserCancelledEvent { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Event to be raised directed to the <see cref="User"/> entity when the DoAfter is finished successfully.
|
||||
/// </summary>
|
||||
public EntityEventArgs? UserFinishedEvent { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Event to be raised directed to the <see cref="User"/> entity when the DoAfter is cancelled.
|
||||
/// </summary>
|
||||
public EntityEventArgs? TargetCancelledEvent { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Event to be raised directed to the <see cref="User"/> entity when the DoAfter is finished successfully.
|
||||
/// </summary>
|
||||
public EntityEventArgs? TargetFinishedEvent { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Event to be broadcast when the DoAfter is cancelled.
|
||||
/// </summary>
|
||||
public object? BroadcastCancelledEvent { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Event to be broadcast when the DoAfter is finished successfully.
|
||||
/// </summary>
|
||||
public object? BroadcastFinishedEvent { get; set; }
|
||||
|
||||
public DoAfterEventArgs(
|
||||
IEntity user,
|
||||
float delay,
|
||||
|
||||
Reference in New Issue
Block a user