Add QueueAction overload
This commit is contained in:
parent
e4c03f8ccc
commit
e40d4695ea
@ -359,9 +359,9 @@ namespace RageCoop.Client
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Queue an action to be executed on next tick, allowing you to call scripting API from another thread.
|
/// Queue an action to be executed on next tick, allowing you to call scripting API from another thread.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="a"> The action to be executed, must return a bool indicating whether the action cane be removed after execution.</param>
|
/// <param name="a"> An action to be executed with a return value indicating whether the action can be removed after execution.</param>
|
||||||
internal static void QueueAction(Func<bool> a)
|
internal static void QueueAction(Func<bool> a)
|
||||||
{
|
{
|
||||||
lock (QueuedActions)
|
lock (QueuedActions)
|
||||||
|
@ -231,6 +231,15 @@ namespace RageCoop.Client.Scripting
|
|||||||
{
|
{
|
||||||
Main.QueueAction(a);
|
Main.QueueAction(a);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Queue an action to be executed on next tick, allowing you to call scripting API from another thread.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="a"> An action to be executed with a return value indicating whether the action can be removed after execution.</param>
|
||||||
|
public static void QueueAction(Func<bool> a)
|
||||||
|
{
|
||||||
|
Main.QueueAction(a);
|
||||||
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Disconnect from the server
|
/// Disconnect from the server
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user