29 lines
698 B
C#
29 lines
698 B
C#
using Questionable.Model.Questing;
|
|
|
|
namespace Questionable.Controller.Conditions;
|
|
|
|
internal sealed class BeforeDutyCondition : StopCondition
|
|
{
|
|
public override bool IsSession => false;
|
|
|
|
public override EStopConditionType Type => EStopConditionType.BeforeDuty;
|
|
|
|
public override bool Evaluate(StopEvaluationContext context)
|
|
{
|
|
EInteractionType? upcomingInteractionType = context.UpcomingInteractionType;
|
|
if (upcomingInteractionType.HasValue)
|
|
{
|
|
EInteractionType valueOrDefault = upcomingInteractionType.GetValueOrDefault();
|
|
if ((uint)(valueOrDefault - 19) <= 1u)
|
|
{
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
public override string GetDescription()
|
|
{
|
|
return "Before duty";
|
|
}
|
|
}
|