forked from aly/qstbak
muffin v7.5.6
This commit is contained in:
parent
6266f9e6b7
commit
addf2d530f
619 changed files with 264792 additions and 446022 deletions
|
|
@ -1,9 +1,12 @@
|
|||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Questionable.Controller.Steps;
|
||||
|
||||
internal abstract class TaskExecutor<T> : ITaskExecutor where T : class, ITask
|
||||
{
|
||||
private long _lastProgressAt;
|
||||
|
||||
protected T Task { get; set; }
|
||||
|
||||
public InteractionProgressContext? ProgressContext { get; set; }
|
||||
|
|
@ -13,33 +16,142 @@ internal abstract class TaskExecutor<T> : ITaskExecutor where T : class, ITask
|
|||
public virtual bool WasInterrupted()
|
||||
{
|
||||
InteractionProgressContext progressContext = ProgressContext;
|
||||
if (progressContext != null)
|
||||
int num = ((progressContext == null) ? 1406481972 : 1406481975);
|
||||
while (true)
|
||||
{
|
||||
progressContext.Update();
|
||||
return progressContext.WasInterrupted();
|
||||
int num2 = num;
|
||||
int num3 = 1406481974;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0048;
|
||||
case 1:
|
||||
progressContext.Update();
|
||||
return progressContext.WasInterrupted();
|
||||
case 2:
|
||||
return false;
|
||||
}
|
||||
continue;
|
||||
IL_0048:
|
||||
num = 1406481975;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ITaskExecutor.WasInterrupted()
|
||||
{
|
||||
//ILSpy generated this explicit interface implementation from .override directive in WasInterrupted
|
||||
return this.WasInterrupted();
|
||||
}
|
||||
|
||||
public virtual bool HasTimedOut(float timeoutSeconds)
|
||||
{
|
||||
int num = ((ProgressContext != null) ? (-1028990417) : (-1028990418));
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1028990417;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
return _200F_202B_202E_202E_206A_202A_202D_202A_202B_202A_200D_206F_206A_202A_206D_202C_206B_200F_206E_200B_200D_206E_202C_202E_202E_200B_202B_200D_202E_206F_206D_206F_202E_200E_202C_202C_202C_200C_206C_206B_202E() - _lastProgressAt > (long)(timeoutSeconds * 1000f);
|
||||
case 1:
|
||||
return false;
|
||||
case 2:
|
||||
goto IL_0061;
|
||||
}
|
||||
continue;
|
||||
IL_0061:
|
||||
num = -1028990418;
|
||||
}
|
||||
}
|
||||
|
||||
bool ITaskExecutor.HasTimedOut(float timeoutSeconds)
|
||||
{
|
||||
//ILSpy generated this explicit interface implementation from .override directive in HasTimedOut
|
||||
return this.HasTimedOut(timeoutSeconds);
|
||||
}
|
||||
|
||||
protected void ResetProgressTimer()
|
||||
{
|
||||
_lastProgressAt = _200F_202B_202E_202E_206A_202A_202D_202A_202B_202A_200D_206F_206A_202A_206D_202C_206B_200F_206E_200B_200D_206E_202C_202E_202E_200B_202B_200D_202E_206F_206D_206F_202E_200E_202C_202C_202C_200C_206C_206B_202E();
|
||||
}
|
||||
|
||||
public Type GetTaskType()
|
||||
{
|
||||
return typeof(T);
|
||||
return _200D_206E_206F_200E_206B_202A_202D_200C_202E_202B_206D_206F_200D_206A_202D_200E_206D_200E_206F_200F_206E_202A_200D_206F_200F_200C_206F_202C_206D_206F_206C_206F_200D_200B_202E_200D_202C_206C_202D_206D_202E(typeof(T).TypeHandle);
|
||||
}
|
||||
|
||||
Type ITaskExecutor.GetTaskType()
|
||||
{
|
||||
//ILSpy generated this explicit interface implementation from .override directive in GetTaskType
|
||||
return this.GetTaskType();
|
||||
}
|
||||
|
||||
protected abstract bool Start();
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public bool Start(ITask task)
|
||||
{
|
||||
if (task is T task2)
|
||||
T val = task as T;
|
||||
int num = ((val == null) ? 746010718 : 746010717);
|
||||
while (true)
|
||||
{
|
||||
Task = task2;
|
||||
ProgressContext = null;
|
||||
return Start();
|
||||
int num2 = num;
|
||||
int num3 = 746010719;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
DefaultInterpolatedStringHandler defaultInterpolatedStringHandler = new DefaultInterpolatedStringHandler(19, 2);
|
||||
defaultInterpolatedStringHandler.AppendLiteral(global::_003CModule_003E._206C_202A_206D_206A_206E_202A_202B_206F_206D_200F_202D_200F_202D_206A_202C_202B_206D_206A_200E_200E_202D_202D_200D_200C_200D_200D_206D_206E_202A_200F_206E_206C_206D_206A_206D_202B_200F_200D_206E_200C_202E<string>(78496127));
|
||||
defaultInterpolatedStringHandler.AppendFormatted(_202D_202E_206C_206C_202A_202B_200F_202D_200F_200C_206F_206B_206B_206D_200C_206F_200E_200E_202B_202C_206A_200E_206B_200F_206D_202B_200C_202D_202B_202E_200F_200F_206E_202E_206C_200B_202E_200D_202C_200F_202E((object)task));
|
||||
defaultInterpolatedStringHandler.AppendLiteral(global::_003CModule_003E._202D_206D_206A_206E_202C_202B_200C_206C_200E_206A_206D_200E_206A_202A_200C_202E_206E_202C_206F_200B_206D_206F_200C_202C_200B_202B_200F_200B_206A_206F_200F_202E_206B_200E_202B_202A_200F_200B_202A_200E_202E<string>(-718265658));
|
||||
defaultInterpolatedStringHandler.AppendFormatted(_200D_206E_206F_200E_206B_202A_202D_200C_202E_202B_206D_206F_200D_206A_202D_200E_206D_200E_206F_200F_206E_202A_200D_206F_200F_200C_206F_202C_206D_206F_206C_206F_200D_200B_202E_200D_202C_206C_202D_206D_202E(typeof(T).TypeHandle));
|
||||
throw new TaskException(defaultInterpolatedStringHandler.ToStringAndClear());
|
||||
}
|
||||
case 2:
|
||||
Task = val;
|
||||
ProgressContext = null;
|
||||
_lastProgressAt = _200F_202B_202E_202E_206A_202A_202D_202A_202B_202A_200D_206F_206A_202A_206D_202C_206B_200F_206E_200B_200D_206E_202C_202E_202E_200B_202B_200D_202E_206F_206D_206F_202E_200E_202C_202C_202C_200C_206C_206B_202E();
|
||||
return Start();
|
||||
case 0:
|
||||
goto IL_00ce;
|
||||
}
|
||||
continue;
|
||||
IL_00ce:
|
||||
num = 746010717;
|
||||
}
|
||||
throw new TaskException($"Unable to cast {task.GetType()} to {typeof(T)}");
|
||||
}
|
||||
|
||||
bool ITaskExecutor.Start(ITask task)
|
||||
{
|
||||
//ILSpy generated this explicit interface implementation from .override directive in Start
|
||||
return this.Start(task);
|
||||
}
|
||||
|
||||
public abstract ETaskResult Update();
|
||||
|
||||
public abstract bool ShouldInterruptOnDamage();
|
||||
|
||||
static long _200F_202B_202E_202E_206A_202A_202D_202A_202B_202A_200D_206F_206A_202A_206D_202C_206B_200F_206E_200B_200D_206E_202C_202E_202E_200B_202B_200D_202E_206F_206D_206F_202E_200E_202C_202C_202C_200C_206C_206B_202E()
|
||||
{
|
||||
return Environment.TickCount64;
|
||||
}
|
||||
|
||||
static Type _200D_206E_206F_200E_206B_202A_202D_200C_202E_202B_206D_206F_200D_206A_202D_200E_206D_200E_206F_200F_206E_202A_200D_206F_200F_200C_206F_202C_206D_206F_206C_206F_200D_200B_202E_200D_202C_206C_202D_206D_202E(RuntimeTypeHandle P_0)
|
||||
{
|
||||
return Type.GetTypeFromHandle(P_0);
|
||||
}
|
||||
|
||||
static Type _202D_202E_206C_206C_202A_202B_200F_202D_200F_200C_206F_206B_206B_206D_200C_206F_200E_200E_202B_202C_206A_200E_206B_200F_206D_202B_200C_202D_202B_202E_200F_200F_206E_202E_206C_200B_202E_200D_202C_200F_202E(object P_0)
|
||||
{
|
||||
return P_0.GetType();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue