Remove unused YesAlready code bits
authorLiza Carvelli <liza@carvel.li>
Sat, 22 Mar 2025 22:08:31 +0000 (23:08 +0100)
committerLiza Carvelli <liza@carvel.li>
Sat, 22 Mar 2025 22:08:31 +0000 (23:08 +0100)
Questionable/Controller/QuestController.cs
Questionable/External/YesAlreadyIpc.cs [deleted file]
Questionable/QuestionablePlugin.cs

index 0df9e8d9109617b39be8e62712028c10705498a8..e67e36e6624257b929898d595ce6c56bc22e4794 100644 (file)
@@ -37,7 +37,6 @@ internal sealed class QuestController : MiniTaskController<QuestController>
     private readonly ICondition _condition;
     private readonly IToastGui _toastGui;
     private readonly Configuration _configuration;
-    private readonly YesAlreadyIpc _yesAlreadyIpc;
     private readonly TaskCreator _taskCreator;
     private readonly SinglePlayerDutyConfigComponent _singlePlayerDutyConfigComponent;
     private readonly ILogger<QuestController> _logger;
@@ -77,7 +76,6 @@ internal sealed class QuestController : MiniTaskController<QuestController>
         ICondition condition,
         IToastGui toastGui,
         Configuration configuration,
-        YesAlreadyIpc yesAlreadyIpc,
         TaskCreator taskCreator,
         IServiceProvider serviceProvider,
         InterruptHandler interruptHandler,
@@ -97,7 +95,6 @@ internal sealed class QuestController : MiniTaskController<QuestController>
         _condition = condition;
         _toastGui = toastGui;
         _configuration = configuration;
-        _yesAlreadyIpc = yesAlreadyIpc;
         _taskCreator = taskCreator;
         _singlePlayerDutyConfigComponent = singlePlayerDutyConfigComponent;
         _logger = logger;
@@ -507,7 +504,6 @@ internal sealed class QuestController : MiniTaskController<QuestController>
 
         _taskQueue.Reset();
 
-        _yesAlreadyIpc.RestoreYesAlready();
         _combatController.Stop("ClearTasksInternal");
         _gatheringController.Stop("ClearTasksInternal");
     }
diff --git a/Questionable/External/YesAlreadyIpc.cs b/Questionable/External/YesAlreadyIpc.cs
deleted file mode 100644 (file)
index 820e0e9..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-using System;
-using System.Collections.Generic;
-using Dalamud.Plugin;
-using Dalamud.Plugin.Services;
-
-namespace Questionable.External;
-
-internal sealed class YesAlreadyIpc : IDisposable
-{
-    private readonly IDalamudPluginInterface _pluginInterface;
-    private readonly IPluginLog _pluginLog;
-
-    public YesAlreadyIpc(IDalamudPluginInterface pluginInterface, IPluginLog pluginLog)
-    {
-        _pluginInterface = pluginInterface;
-        _pluginLog = pluginLog;
-    }
-
-    public void DisableYesAlready()
-    {
-        if (_pluginInterface.TryGetData<HashSet<string>>("YesAlready.StopRequests", out var data) &&
-            !data.Contains(nameof(Questionable)))
-        {
-            _pluginLog.Debug("Disabling YesAlready");
-            data.Add(nameof(Questionable));
-        }
-    }
-
-    public void RestoreYesAlready()
-    {
-        if (_pluginInterface.TryGetData<HashSet<string>>("YesAlready.StopRequests", out var data) &&
-            data.Contains(nameof(Questionable)))
-        {
-            _pluginLog.Debug("Restoring YesAlready");
-            data.Remove(nameof(Questionable));
-        }
-    }
-
-    public void Dispose() => RestoreYesAlready();
-}
index a2516ac5f5ac9ae5de3ba5ed27bd0a202f69084f..949e0b7d95d12825b82e129806fdff8db53f9171 100644 (file)
@@ -126,7 +126,6 @@ public sealed class QuestionablePlugin : IDalamudPlugin
         serviceCollection.AddSingleton<TerritoryData>();
         serviceCollection.AddSingleton<NavmeshIpc>();
         serviceCollection.AddSingleton<LifestreamIpc>();
-        serviceCollection.AddSingleton<YesAlreadyIpc>();
         serviceCollection.AddSingleton<ArtisanIpc>();
         serviceCollection.AddSingleton<QuestionableIpc>();
         serviceCollection.AddSingleton<TextAdvanceIpc>();