fixed EnqueueFunction, apparently AddItem function doesn't actually adds an item.
This commit is contained in:
@@ -16,6 +16,8 @@ using HarmonyLib;
|
|||||||
using MoonSharp.Interpreter.Interop;
|
using MoonSharp.Interpreter.Interop;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Reflection.Emit;
|
using System.Reflection.Emit;
|
||||||
|
using Barotrauma.Extensions;
|
||||||
|
using System.Threading;
|
||||||
|
|
||||||
namespace Barotrauma
|
namespace Barotrauma
|
||||||
{
|
{
|
||||||
@@ -855,7 +857,7 @@ namespace Barotrauma
|
|||||||
|
|
||||||
public void EnqueueFunction(object function, params object[] args)
|
public void EnqueueFunction(object function, params object[] args)
|
||||||
{
|
{
|
||||||
queuedFunctionCalls.AddItem(new Tuple<object, object[]>(function, args));
|
queuedFunctionCalls.Enqueue(new Tuple<object, object[]>(function, args));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Add(string name, string hookName, object function)
|
public void Add(string name, string hookName, object function)
|
||||||
|
|||||||
Reference in New Issue
Block a user