1
0
Fork 0
forked from aly/qstbak
qstbak/Questionable/Questionable.Controller.Steps.Interactions/AethernetShard.cs
2026-08-17 20:29:32 +10:00

50 lines
1.2 KiB
C#

using System;
using Microsoft.Extensions.Logging;
using Questionable.Functions;
using Questionable.Model;
using Questionable.Model.Questing;
using SmartNav.Model;
namespace Questionable.Controller.Steps.Interactions;
internal static class AethernetShard
{
internal sealed class Factory : SimpleTaskFactory
{
public override ITask? CreateTask(Quest quest, QuestSequence sequence, QuestStep step)
{
if (step.InteractionType != EInteractionType.AttuneAethernetShard)
{
return null;
}
ArgumentNullException.ThrowIfNull(step.AethernetShard, "step.AethernetShard");
return new Attune(step.AethernetShard.Value);
}
}
internal sealed record Attune(EAetheryteLocation AetheryteLocation) : ITask
{
public bool ShouldRedoOnInterrupt()
{
return true;
}
public override string ToString()
{
return $"AttuneAethernetShard({AetheryteLocation})";
}
}
internal sealed class DoAttune : Aetheryte.DoAttuneBase<Attune>
{
public DoAttune(AetheryteFunctions aetheryteFunctions, GameFunctions gameFunctions, ILogger<DoAttune> logger)
: base(aetheryteFunctions, gameFunctions, (ILogger)logger, "aethernet shard")
{
}
protected override EAetheryteLocation GetLocation()
{
return base.Task.AetheryteLocation;
}
}
}