Rename task stuff

pull/3/head
Liza 2024-09-19 00:00:16 +02:00
parent b85ab8afe7
commit dfd38a311b
Signed by: liza
GPG Key ID: 7199F8D727D55F67
11 changed files with 25 additions and 25 deletions

View File

@ -33,11 +33,11 @@ internal static class NextQuest
public override string ToString() => $"SetNextQuest({NextQuestId})";
}
internal sealed class Executor(
internal sealed class NextQuestExecutor(
QuestRegistry questRegistry,
QuestController questController,
QuestFunctions questFunctions,
ILogger<Executor> logger) : TaskExecutor<SetQuestTask>
ILogger<NextQuestExecutor> logger) : TaskExecutor<SetQuestTask>
{
protected override bool Start()
{

View File

@ -9,7 +9,7 @@ internal static class WaitCondition
public override string ToString() => Description;
}
internal sealed class Executor : TaskExecutor<Task>
internal sealed class WaitConditionExecutor : TaskExecutor<Task>
{
private DateTime _continueAt = DateTime.MaxValue;

View File

@ -29,13 +29,13 @@ internal static class DoGather
public override string ToString() => $"DoGather{(RevisitRequired ? " if revist" : "")}";
}
internal sealed class Executor(
internal sealed class GatherExecutor(
GatheringController gatheringController,
GameFunctions gameFunctions,
IGameGui gameGui,
IClientState clientState,
ICondition condition,
ILogger<Executor> logger) : TaskExecutor<Task>
ILogger<GatherExecutor> logger) : TaskExecutor<Task>
{
private const uint StatusGatheringRateUp = 218;

View File

@ -27,12 +27,12 @@ internal static class DoGatherCollectable
$"DoGatherCollectable({SeIconChar.Collectible.ToIconString()}/{Request.Collectability}){(RevisitRequired ? " if revist" : "")}";
}
internal sealed class Executor(
internal sealed class GatherCollectableExecutor(
GatheringController gatheringController,
GameFunctions gameFunctions,
IClientState clientState,
IGameGui gameGui,
ILogger<Executor> logger) : TaskExecutor<Task>
ILogger<GatherCollectableExecutor> logger) : TaskExecutor<Task>
{
private Queue<EAction>? _actionQueue;

View File

@ -21,11 +21,11 @@ internal static class MoveToLandingLocation
public override string ToString() => $"Land/{FlyBetweenNodes}";
}
internal sealed class Executor(
internal sealed class MoveToLandingLocationExecutor(
MoveTo.MoveExecutor moveExecutor,
GameFunctions gameFunctions,
IObjectTable objectTable,
ILogger<Executor> logger) : TaskExecutor<Task>
ILogger<MoveToLandingLocationExecutor> logger) : TaskExecutor<Task>
{
private ITask _moveTask = null!;

View File

@ -26,7 +26,7 @@ internal static class Duty
public override string ToString() => $"OpenDutyFinder({ContentFinderConditionId})";
}
internal sealed class Executor(
internal sealed class OpenDutyWindowExecutor(
GameFunctions gameFunctions,
ICondition condition) : TaskExecutor<Task>
{

View File

@ -33,9 +33,9 @@ internal static class EquipItem
public override string ToString() => $"Equip({ItemId})";
}
internal sealed class Executor(
internal sealed class DoEquip(
IDataManager dataManager,
ILogger<Executor> logger) : TaskExecutor<Task>, IToastAware
ILogger<DoEquip> logger) : TaskExecutor<Task>, IToastAware
{
private const int MaxAttempts = 3;

View File

@ -22,7 +22,7 @@ internal static class StepDisabled
public override string ToString() => "StepDisabled";
}
internal sealed class Executor(ILogger<SkipRemainingTasks> logger) : TaskExecutor<SkipRemainingTasks>
internal sealed class SkipDisabledStepsExecutor(ILogger<SkipRemainingTasks> logger) : TaskExecutor<SkipRemainingTasks>
{
protected override bool Start() => true;

View File

@ -13,7 +13,7 @@ internal static class SwitchClassJob
public override string ToString() => $"SwitchJob({ClassJob})";
}
internal sealed class Executor(IClientState clientState) : AbstractDelayedTaskExecutor<Task>
internal sealed class SwitchClassJobExecutor(IClientState clientState) : AbstractDelayedTaskExecutor<Task>
{
protected override unsafe bool StartInternal()
{

View File

@ -63,7 +63,7 @@ internal static class QuestWorkUtils
{
if (requiredQuestVariables.Count != 6 || requiredQuestVariables.All(x => x == null || x.Count == 0))
{
logger.LogDebug("No RQW defined");
logger.LogDebug("No RequiredQW defined");
return true;
}
@ -71,7 +71,7 @@ internal static class QuestWorkUtils
{
if (requiredQuestVariables[i] == null)
{
logger.LogInformation("No RQW {Index} defined", i);
logger.LogDebug("No RequiredQW {Index} defined", i);
continue;
}

View File

@ -129,16 +129,16 @@ public sealed class QuestionablePlugin : IDalamudPlugin
private static void AddTaskFactories(ServiceCollection serviceCollection)
{
// individual tasks
serviceCollection.AddTaskExecutor<MoveToLandingLocation.Task, MoveToLandingLocation.Executor>();
serviceCollection.AddTaskExecutor<DoGather.Task, DoGather.Executor>();
serviceCollection.AddTaskExecutor<DoGatherCollectable.Task, DoGatherCollectable.Executor>();
serviceCollection.AddTaskExecutor<SwitchClassJob.Task, SwitchClassJob.Executor>();
serviceCollection.AddTaskExecutor<MoveToLandingLocation.Task, MoveToLandingLocation.MoveToLandingLocationExecutor>();
serviceCollection.AddTaskExecutor<DoGather.Task, DoGather.GatherExecutor>();
serviceCollection.AddTaskExecutor<DoGatherCollectable.Task, DoGatherCollectable.GatherCollectableExecutor>();
serviceCollection.AddTaskExecutor<SwitchClassJob.Task, SwitchClassJob.SwitchClassJobExecutor>();
serviceCollection.AddTaskExecutor<Mount.MountTask, Mount.MountExecutor>();
serviceCollection.AddTaskExecutor<Mount.UnmountTask, Mount.UnmountExecutor>();
// task factories
serviceCollection
.AddTaskFactoryAndExecutor<StepDisabled.SkipRemainingTasks, StepDisabled.Factory, StepDisabled.Executor>();
.AddTaskFactoryAndExecutor<StepDisabled.SkipRemainingTasks, StepDisabled.Factory, StepDisabled.SkipDisabledStepsExecutor>();
serviceCollection.AddTaskFactory<EquipRecommended.BeforeDutyOrInstance>();
serviceCollection.AddTaskFactoryAndExecutor<Gather.GatheringTask, Gather.Factory, Gather.StartGathering>();
serviceCollection.AddTaskExecutor<Gather.SkipMarker, Gather.DoSkip>();
@ -156,14 +156,14 @@ public sealed class QuestionablePlugin : IDalamudPlugin
serviceCollection.AddTaskExecutor<MoveTo.WaitForNearDataId, MoveTo.WaitForNearDataIdExecutor>();
serviceCollection.AddTaskExecutor<MoveTo.LandTask, MoveTo.LandExecutor>();
serviceCollection.AddTaskFactoryAndExecutor<NextQuest.SetQuestTask, NextQuest.Factory, NextQuest.Executor>();
serviceCollection.AddTaskFactoryAndExecutor<NextQuest.SetQuestTask, NextQuest.Factory, NextQuest.NextQuestExecutor>();
serviceCollection
.AddTaskFactoryAndExecutor<AetherCurrent.Attune, AetherCurrent.Factory, AetherCurrent.DoAttune>();
serviceCollection
.AddTaskFactoryAndExecutor<AethernetShard.Attune, AethernetShard.Factory, AethernetShard.DoAttune>();
serviceCollection.AddTaskFactoryAndExecutor<Aetheryte.Attune, Aetheryte.Factory, Aetheryte.DoAttune>();
serviceCollection.AddTaskFactoryAndExecutor<Combat.Task, Combat.Factory, Combat.HandleCombat>();
serviceCollection.AddTaskFactoryAndExecutor<Duty.Task, Duty.Factory, Duty.Executor>();
serviceCollection.AddTaskFactoryAndExecutor<Duty.Task, Duty.Factory, Duty.OpenDutyWindowExecutor>();
serviceCollection.AddTaskFactory<Emote.Factory>();
serviceCollection.AddTaskExecutor<Emote.UseOnObject, Emote.UseOnObjectExecutor>();
serviceCollection.AddTaskExecutor<Emote.UseOnSelf, Emote.UseOnSelfExecutor>();
@ -179,7 +179,7 @@ public sealed class QuestionablePlugin : IDalamudPlugin
serviceCollection.AddTaskExecutor<UseItem.UseOnPosition, UseItem.UseOnPositionExecutor>();
serviceCollection.AddTaskExecutor<UseItem.UseOnObject, UseItem.UseOnObjectExecutor>();
serviceCollection.AddTaskExecutor<UseItem.UseOnSelf, UseItem.UseOnSelfExecutor>();
serviceCollection.AddTaskFactoryAndExecutor<EquipItem.Task, EquipItem.Factory, EquipItem.Executor>();
serviceCollection.AddTaskFactoryAndExecutor<EquipItem.Task, EquipItem.Factory, EquipItem.DoEquip>();
serviceCollection
.AddTaskFactoryAndExecutor<EquipRecommended.EquipTask, EquipRecommended.Factory,
EquipRecommended.DoEquipRecommended>();
@ -194,7 +194,7 @@ public sealed class QuestionablePlugin : IDalamudPlugin
serviceCollection.AddTaskExecutor<InitiateLeve.Initiate, InitiateLeve.InitiateExecutor>();
serviceCollection.AddTaskExecutor<InitiateLeve.SelectDifficulty, InitiateLeve.SelectDifficultyExecutor>();
serviceCollection.AddTaskExecutor<WaitCondition.Task, WaitCondition.Executor>();
serviceCollection.AddTaskExecutor<WaitCondition.Task, WaitCondition.WaitConditionExecutor>();
serviceCollection.AddTaskFactory<WaitAtEnd.Factory>();
serviceCollection.AddTaskExecutor<WaitAtEnd.WaitDelay, WaitAtEnd.WaitDelayExecutor>();
serviceCollection.AddTaskExecutor<WaitAtEnd.WaitNextStepOrSequence, WaitAtEnd.WaitNextStepOrSequenceExecutor>();