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;
ICondition condition,
IToastGui toastGui,
Configuration configuration,
- YesAlreadyIpc yesAlreadyIpc,
TaskCreator taskCreator,
IServiceProvider serviceProvider,
InterruptHandler interruptHandler,
_condition = condition;
_toastGui = toastGui;
_configuration = configuration;
- _yesAlreadyIpc = yesAlreadyIpc;
_taskCreator = taskCreator;
_singlePlayerDutyConfigComponent = singlePlayerDutyConfigComponent;
_logger = logger;
_taskQueue.Reset();
- _yesAlreadyIpc.RestoreYesAlready();
_combatController.Stop("ClearTasksInternal");
_gatheringController.Stop("ClearTasksInternal");
}
+++ /dev/null
-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();
-}
serviceCollection.AddSingleton<TerritoryData>();
serviceCollection.AddSingleton<NavmeshIpc>();
serviceCollection.AddSingleton<LifestreamIpc>();
- serviceCollection.AddSingleton<YesAlreadyIpc>();
serviceCollection.AddSingleton<ArtisanIpc>();
serviceCollection.AddSingleton<QuestionableIpc>();
serviceCollection.AddSingleton<TextAdvanceIpc>();