punish v6.8.18.0
This commit is contained in:
commit
e786325cda
322 changed files with 554232 additions and 0 deletions
|
@ -0,0 +1,43 @@
|
|||
using System;
|
||||
using Questionable.Controller.Steps.Common;
|
||||
using Questionable.Model;
|
||||
using Questionable.Model.Questing;
|
||||
|
||||
namespace Questionable.Controller.Steps.Shared;
|
||||
|
||||
internal static class WaitAtStart
|
||||
{
|
||||
internal sealed class Factory : SimpleTaskFactory
|
||||
{
|
||||
public override ITask? CreateTask(Quest quest, QuestSequence sequence, QuestStep step)
|
||||
{
|
||||
if (!step.DelaySecondsAtStart.HasValue)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return new WaitDelay(TimeSpan.FromSeconds(step.DelaySecondsAtStart.Value));
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed record WaitDelay(TimeSpan Delay) : ITask
|
||||
{
|
||||
public override string ToString()
|
||||
{
|
||||
return $"Wait[S](seconds: {Delay.TotalSeconds})";
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class WaitDelayExecutor : AbstractDelayedTaskExecutor<WaitDelay>
|
||||
{
|
||||
protected override bool StartInternal()
|
||||
{
|
||||
base.Delay = base.Task.Delay;
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool ShouldInterruptOnDamage()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue