2024-05-25 23:51:37 +02:00
|
|
|
|
using System.Collections.Generic;
|
2024-07-18 16:33:48 +02:00
|
|
|
|
using System.Linq;
|
2024-05-25 23:51:37 +02:00
|
|
|
|
|
2024-08-02 18:30:21 +02:00
|
|
|
|
namespace Questionable.Model.Questing;
|
2024-05-25 23:51:37 +02:00
|
|
|
|
|
2024-06-14 11:37:33 +02:00
|
|
|
|
public sealed class QuestSequence
|
2024-05-25 23:51:37 +02:00
|
|
|
|
{
|
2024-06-14 11:37:33 +02:00
|
|
|
|
public int Sequence { get; set; }
|
2024-05-26 21:45:26 +02:00
|
|
|
|
public string? Comment { get; set; }
|
2024-05-25 23:51:37 +02:00
|
|
|
|
public List<QuestStep> Steps { get; set; } = new();
|
2024-06-03 23:17:35 +02:00
|
|
|
|
|
|
|
|
|
public QuestStep? FindStep(int step)
|
|
|
|
|
{
|
|
|
|
|
if (step < 0 || step >= Steps.Count)
|
|
|
|
|
return null;
|
|
|
|
|
|
|
|
|
|
return Steps[step];
|
|
|
|
|
}
|
2024-07-18 16:33:48 +02:00
|
|
|
|
|
|
|
|
|
public QuestStep? LastStep() => Steps.LastOrDefault();
|
2024-05-25 23:51:37 +02:00
|
|
|
|
}
|