From e4f56ddeb4f43a574e60d02f6e88998d0d2d492d Mon Sep 17 00:00:00 2001 From: Liza Carvelli Date: Sat, 22 Mar 2025 23:08:31 +0100 Subject: [PATCH] Remove unused YesAlready code bits --- Questionable/Controller/QuestController.cs | 4 --- Questionable/External/YesAlreadyIpc.cs | 40 ---------------------- Questionable/QuestionablePlugin.cs | 1 - 3 files changed, 45 deletions(-) delete mode 100644 Questionable/External/YesAlreadyIpc.cs diff --git a/Questionable/Controller/QuestController.cs b/Questionable/Controller/QuestController.cs index 0df9e8d9..e67e36e6 100644 --- a/Questionable/Controller/QuestController.cs +++ b/Questionable/Controller/QuestController.cs @@ -37,7 +37,6 @@ internal sealed class QuestController : MiniTaskController 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 _logger; @@ -77,7 +76,6 @@ internal sealed class QuestController : MiniTaskController ICondition condition, IToastGui toastGui, Configuration configuration, - YesAlreadyIpc yesAlreadyIpc, TaskCreator taskCreator, IServiceProvider serviceProvider, InterruptHandler interruptHandler, @@ -97,7 +95,6 @@ internal sealed class QuestController : MiniTaskController _condition = condition; _toastGui = toastGui; _configuration = configuration; - _yesAlreadyIpc = yesAlreadyIpc; _taskCreator = taskCreator; _singlePlayerDutyConfigComponent = singlePlayerDutyConfigComponent; _logger = logger; @@ -507,7 +504,6 @@ internal sealed class QuestController : MiniTaskController _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 index 820e0e95..00000000 --- a/Questionable/External/YesAlreadyIpc.cs +++ /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>("YesAlready.StopRequests", out var data) && - !data.Contains(nameof(Questionable))) - { - _pluginLog.Debug("Disabling YesAlready"); - data.Add(nameof(Questionable)); - } - } - - public void RestoreYesAlready() - { - if (_pluginInterface.TryGetData>("YesAlready.StopRequests", out var data) && - data.Contains(nameof(Questionable))) - { - _pluginLog.Debug("Restoring YesAlready"); - data.Remove(nameof(Questionable)); - } - } - - public void Dispose() => RestoreYesAlready(); -} diff --git a/Questionable/QuestionablePlugin.cs b/Questionable/QuestionablePlugin.cs index a2516ac5..949e0b7d 100644 --- a/Questionable/QuestionablePlugin.cs +++ b/Questionable/QuestionablePlugin.cs @@ -126,7 +126,6 @@ public sealed class QuestionablePlugin : IDalamudPlugin serviceCollection.AddSingleton(); serviceCollection.AddSingleton(); serviceCollection.AddSingleton(); - serviceCollection.AddSingleton(); serviceCollection.AddSingleton(); serviceCollection.AddSingleton(); serviceCollection.AddSingleton(); -- 2.30.2