forked from aly/qstbak
26 lines
1 KiB
C#
26 lines
1 KiB
C#
using System.Runtime.CompilerServices;
|
|
|
|
namespace Questionable.Controller.Conditions;
|
|
|
|
internal sealed class QuestCountCondition : StopCondition
|
|
{
|
|
public required int Count { get; set; }
|
|
|
|
public override bool IsSession => true;
|
|
|
|
public override EStopConditionType Type => EStopConditionType.QuestCount;
|
|
|
|
public override bool Evaluate(StopEvaluationContext context)
|
|
{
|
|
return context.QuestsCompletedThisSession >= Count;
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.NoInlining)]
|
|
public override string GetDescription()
|
|
{
|
|
DefaultInterpolatedStringHandler defaultInterpolatedStringHandler = new DefaultInterpolatedStringHandler(17, 1);
|
|
defaultInterpolatedStringHandler.AppendFormatted(Count);
|
|
defaultInterpolatedStringHandler.AppendLiteral(global::_003CModule_003E._202E_206C_200F_206B_206A_202A_202C_206F_200C_206C_202B_206B_206D_206D_206D_202D_206E_202E_206C_206E_206D_202C_206F_200D_202D_202E_206A_206D_202A_206A_202B_200D_200C_206D_202B_200B_200D_200C_206E_206B_202E<string>(1579947935));
|
|
return defaultInterpolatedStringHandler.ToStringAndClear();
|
|
}
|
|
}
|