Rename task stuff
authorLiza Carvelli <liza@carvel.li>
Wed, 18 Sep 2024 22:00:16 +0000 (00:00 +0200)
committerLiza Carvelli <liza@carvel.li>
Wed, 18 Sep 2024 22:00:16 +0000 (00:00 +0200)
Questionable/Controller/Steps/Common/NextQuest.cs
Questionable/Controller/Steps/Common/WaitConditionTask.cs
Questionable/Controller/Steps/Gathering/DoGather.cs
Questionable/Controller/Steps/Gathering/DoGatherCollectable.cs
Questionable/Controller/Steps/Gathering/MoveToLandingLocation.cs
Questionable/Controller/Steps/Interactions/Duty.cs
Questionable/Controller/Steps/Interactions/EquipItem.cs
Questionable/Controller/Steps/Shared/StepDisabled.cs
Questionable/Controller/Steps/Shared/SwitchClassJob.cs
Questionable/Controller/Utils/QuestWorkUtils.cs
Questionable/QuestionablePlugin.cs

index 32aa7ad90a5d47b3c420af496c1b83b2d1f04d91..2c889375c4c9a03456ef5f2f6d1220a8c9b49ad7 100644 (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()
         {
index 9389bfb2323e1ec1f37ee86fe9a4e4671975a490..367fdfec0ab62d6bdb85e47046e20c09bf62c060 100644 (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;
 
index e0e05a94a5320bb884f6cae540ccbad7a613ff63..169b0b7c618500bdbb91d021e78626cc1e576872 100644 (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;
 
index 17376e10a03de610308e6b9637c1122c55a7d39a..167409434b801fd3eeb02b20f0275a9a20c9bd64 100644 (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;
 
index cc9f4d979fc35c487623826fd4968b54c3d7443a..048bd2080fcbaf1235fced0286f5742978eefe73 100644 (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!;
 
index 172eb961a30058520114e3eca7ff86e71ff55677..42c94d87bf4db614dbddb11d28f64ac503373fe6 100644 (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>
     {
index d9cd3971cf584ab56424b3c4a3cf459c19556939..9e424f65204af50854d3a0bf5501bafd4d030ead 100644 (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;
 
index 917951f8fac30979b32234daacc4ebdfa538ac98..f706535927a91614bdd5d625002c1e108759ebf3 100644 (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;
 
index 880aac693d5d3febac0a12edc1abba761c1e5452..37ddf1eebc887c2a344fcd3c8ece4a0f3d371500 100644 (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()
         {
index 56484ecc715ca7d9a171636e58eb92d1c84f7dfd..5315aa9eba51928362f37e5df6698f162605f85f 100644 (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;
             }
 
index 98f357f16d2a69abeffb3eb966ff40b543243a65..47b5cb96c1d5dbcf35213270dc4fada6ee142581 100644 (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>();