2024-05-26 19:45:26 +00:00
|
|
|
|
using System;
|
2024-06-08 19:16:57 +00:00
|
|
|
|
using System.Diagnostics.CodeAnalysis;
|
|
|
|
|
using Dalamud.Extensions.MicrosoftLogging;
|
2024-05-25 21:51:37 +00:00
|
|
|
|
using Dalamud.Game;
|
|
|
|
|
using Dalamud.Game.ClientState.Objects;
|
|
|
|
|
using Dalamud.Interface.Windowing;
|
|
|
|
|
using Dalamud.Plugin;
|
|
|
|
|
using Dalamud.Plugin.Services;
|
2024-06-08 19:16:57 +00:00
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
|
using Microsoft.Extensions.Logging;
|
2024-05-25 21:51:37 +00:00
|
|
|
|
using Questionable.Controller;
|
2024-07-14 01:42:30 +00:00
|
|
|
|
using Questionable.Controller.CombatModules;
|
2024-08-17 23:55:38 +00:00
|
|
|
|
using Questionable.Controller.GameUi;
|
2024-07-12 08:31:34 +00:00
|
|
|
|
using Questionable.Controller.NavigationOverrides;
|
2024-08-14 07:28:41 +00:00
|
|
|
|
using Questionable.Controller.Steps;
|
2024-07-12 19:18:53 +00:00
|
|
|
|
using Questionable.Controller.Steps.Shared;
|
|
|
|
|
using Questionable.Controller.Steps.Common;
|
2024-08-03 09:17:20 +00:00
|
|
|
|
using Questionable.Controller.Steps.Gathering;
|
2024-07-12 19:18:53 +00:00
|
|
|
|
using Questionable.Controller.Steps.Interactions;
|
2024-08-07 23:49:14 +00:00
|
|
|
|
using Questionable.Controller.Steps.Leves;
|
2024-09-11 14:58:07 +00:00
|
|
|
|
using Questionable.Controller.Utils;
|
2024-05-27 19:54:34 +00:00
|
|
|
|
using Questionable.Data;
|
2024-05-25 21:51:37 +00:00
|
|
|
|
using Questionable.External;
|
2024-08-05 15:09:49 +00:00
|
|
|
|
using Questionable.Functions;
|
2024-07-15 22:18:10 +00:00
|
|
|
|
using Questionable.Validation;
|
|
|
|
|
using Questionable.Validation.Validators;
|
2024-05-25 21:51:37 +00:00
|
|
|
|
using Questionable.Windows;
|
2024-08-18 17:51:24 +00:00
|
|
|
|
using Questionable.Windows.JournalComponents;
|
2024-07-21 13:30:10 +00:00
|
|
|
|
using Questionable.Windows.QuestComponents;
|
2024-07-12 19:18:53 +00:00
|
|
|
|
using Action = Questionable.Controller.Steps.Interactions.Action;
|
2024-05-25 21:51:37 +00:00
|
|
|
|
|
|
|
|
|
namespace Questionable;
|
|
|
|
|
|
2024-06-08 19:16:57 +00:00
|
|
|
|
[SuppressMessage("ReSharper", "UnusedType.Global")]
|
2024-05-27 19:54:34 +00:00
|
|
|
|
public sealed class QuestionablePlugin : IDalamudPlugin
|
2024-05-25 21:51:37 +00:00
|
|
|
|
{
|
2024-06-08 19:16:57 +00:00
|
|
|
|
private readonly ServiceProvider? _serviceProvider;
|
|
|
|
|
|
2024-07-03 19:00:04 +00:00
|
|
|
|
public QuestionablePlugin(IDalamudPluginInterface pluginInterface,
|
2024-06-08 19:16:57 +00:00
|
|
|
|
IClientState clientState,
|
|
|
|
|
ITargetManager targetManager,
|
|
|
|
|
IFramework framework,
|
|
|
|
|
IGameGui gameGui,
|
|
|
|
|
IDataManager dataManager,
|
|
|
|
|
ISigScanner sigScanner,
|
|
|
|
|
IObjectTable objectTable,
|
|
|
|
|
IPluginLog pluginLog,
|
|
|
|
|
ICondition condition,
|
|
|
|
|
IChatGui chatGui,
|
|
|
|
|
ICommandManager commandManager,
|
2024-06-09 14:30:53 +00:00
|
|
|
|
IAddonLifecycle addonLifecycle,
|
2024-08-04 14:03:23 +00:00
|
|
|
|
IKeyState keyState,
|
2024-08-09 21:58:19 +00:00
|
|
|
|
IContextMenu contextMenu,
|
2024-08-17 23:55:38 +00:00
|
|
|
|
IToastGui toastGui,
|
|
|
|
|
IGameInteropProvider gameInteropProvider)
|
2024-05-25 21:51:37 +00:00
|
|
|
|
{
|
2024-05-26 19:45:26 +00:00
|
|
|
|
ArgumentNullException.ThrowIfNull(pluginInterface);
|
2024-08-05 15:09:49 +00:00
|
|
|
|
ArgumentNullException.ThrowIfNull(chatGui);
|
2024-09-18 20:40:12 +00:00
|
|
|
|
|
2024-08-05 15:09:49 +00:00
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
ServiceCollection serviceCollection = new();
|
|
|
|
|
serviceCollection.AddLogging(builder => builder.SetMinimumLevel(LogLevel.Trace)
|
|
|
|
|
.ClearProviders()
|
|
|
|
|
.AddDalamudLogger(pluginLog, t => t[(t.LastIndexOf('.') + 1)..]));
|
|
|
|
|
serviceCollection.AddSingleton<IDalamudPlugin>(this);
|
|
|
|
|
serviceCollection.AddSingleton(pluginInterface);
|
|
|
|
|
serviceCollection.AddSingleton(clientState);
|
|
|
|
|
serviceCollection.AddSingleton(targetManager);
|
|
|
|
|
serviceCollection.AddSingleton(framework);
|
|
|
|
|
serviceCollection.AddSingleton(gameGui);
|
|
|
|
|
serviceCollection.AddSingleton(dataManager);
|
|
|
|
|
serviceCollection.AddSingleton(sigScanner);
|
|
|
|
|
serviceCollection.AddSingleton(objectTable);
|
|
|
|
|
serviceCollection.AddSingleton(pluginLog);
|
|
|
|
|
serviceCollection.AddSingleton(condition);
|
|
|
|
|
serviceCollection.AddSingleton(chatGui);
|
|
|
|
|
serviceCollection.AddSingleton(commandManager);
|
|
|
|
|
serviceCollection.AddSingleton(addonLifecycle);
|
|
|
|
|
serviceCollection.AddSingleton(keyState);
|
|
|
|
|
serviceCollection.AddSingleton(contextMenu);
|
2024-08-09 21:58:19 +00:00
|
|
|
|
serviceCollection.AddSingleton(toastGui);
|
2024-08-17 23:55:38 +00:00
|
|
|
|
serviceCollection.AddSingleton(gameInteropProvider);
|
2024-08-05 15:09:49 +00:00
|
|
|
|
serviceCollection.AddSingleton(new WindowSystem(nameof(Questionable)));
|
|
|
|
|
serviceCollection.AddSingleton((Configuration?)pluginInterface.GetPluginConfig() ?? new Configuration());
|
|
|
|
|
|
|
|
|
|
AddBasicFunctionsAndData(serviceCollection);
|
|
|
|
|
AddTaskFactories(serviceCollection);
|
|
|
|
|
AddControllers(serviceCollection);
|
|
|
|
|
AddWindows(serviceCollection);
|
|
|
|
|
AddQuestValidators(serviceCollection);
|
|
|
|
|
|
|
|
|
|
serviceCollection.AddSingleton<CommandHandler>();
|
|
|
|
|
serviceCollection.AddSingleton<DalamudInitializer>();
|
|
|
|
|
|
|
|
|
|
_serviceProvider = serviceCollection.BuildServiceProvider();
|
|
|
|
|
Initialize(_serviceProvider);
|
|
|
|
|
}
|
|
|
|
|
catch (Exception)
|
|
|
|
|
{
|
|
|
|
|
chatGui.PrintError("Unable to load plugin, check /xllog for details", "Questionable");
|
|
|
|
|
throw;
|
|
|
|
|
}
|
2024-07-17 13:05:24 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private static void AddBasicFunctionsAndData(ServiceCollection serviceCollection)
|
|
|
|
|
{
|
2024-08-11 00:29:34 +00:00
|
|
|
|
serviceCollection.AddSingleton<AetheryteFunctions>();
|
2024-08-05 15:09:49 +00:00
|
|
|
|
serviceCollection.AddSingleton<ExcelFunctions>();
|
2024-06-08 19:16:57 +00:00
|
|
|
|
serviceCollection.AddSingleton<GameFunctions>();
|
2024-06-20 19:55:48 +00:00
|
|
|
|
serviceCollection.AddSingleton<ChatFunctions>();
|
2024-08-05 15:09:49 +00:00
|
|
|
|
serviceCollection.AddSingleton<QuestFunctions>();
|
2024-09-11 14:58:07 +00:00
|
|
|
|
serviceCollection.AddSingleton<AutoSnipeHandler>();
|
2024-08-05 15:09:49 +00:00
|
|
|
|
|
2024-07-08 18:46:01 +00:00
|
|
|
|
serviceCollection.AddSingleton<AetherCurrentData>();
|
2024-06-08 19:16:57 +00:00
|
|
|
|
serviceCollection.AddSingleton<AetheryteData>();
|
2024-08-03 09:17:20 +00:00
|
|
|
|
serviceCollection.AddSingleton<GatheringData>();
|
2024-08-07 23:49:14 +00:00
|
|
|
|
serviceCollection.AddSingleton<LeveData>();
|
2024-07-29 14:54:18 +00:00
|
|
|
|
serviceCollection.AddSingleton<JournalData>();
|
2024-07-11 00:56:42 +00:00
|
|
|
|
serviceCollection.AddSingleton<QuestData>();
|
2024-06-08 19:16:57 +00:00
|
|
|
|
serviceCollection.AddSingleton<TerritoryData>();
|
|
|
|
|
serviceCollection.AddSingleton<NavmeshIpc>();
|
|
|
|
|
serviceCollection.AddSingleton<LifestreamIpc>();
|
2024-06-16 15:43:42 +00:00
|
|
|
|
serviceCollection.AddSingleton<YesAlreadyIpc>();
|
2024-08-16 18:42:11 +00:00
|
|
|
|
serviceCollection.AddSingleton<ArtisanIpc>();
|
2024-08-31 12:03:53 +00:00
|
|
|
|
serviceCollection.AddSingleton<QuestionableIpc>();
|
2024-07-17 13:05:24 +00:00
|
|
|
|
}
|
2024-06-08 19:16:57 +00:00
|
|
|
|
|
2024-07-17 13:05:24 +00:00
|
|
|
|
private static void AddTaskFactories(ServiceCollection serviceCollection)
|
|
|
|
|
{
|
2024-06-09 14:30:53 +00:00
|
|
|
|
// individual tasks
|
2024-09-20 14:05:39 +00:00
|
|
|
|
serviceCollection
|
|
|
|
|
.AddTaskExecutor<MoveToLandingLocation.Task, MoveToLandingLocation.MoveToLandingLocationExecutor>();
|
2024-09-18 22:00:16 +00:00
|
|
|
|
serviceCollection.AddTaskExecutor<DoGather.Task, DoGather.GatherExecutor>();
|
|
|
|
|
serviceCollection.AddTaskExecutor<DoGatherCollectable.Task, DoGatherCollectable.GatherCollectableExecutor>();
|
|
|
|
|
serviceCollection.AddTaskExecutor<SwitchClassJob.Task, SwitchClassJob.SwitchClassJobExecutor>();
|
2024-09-18 20:40:12 +00:00
|
|
|
|
serviceCollection.AddTaskExecutor<Mount.MountTask, Mount.MountExecutor>();
|
|
|
|
|
serviceCollection.AddTaskExecutor<Mount.UnmountTask, Mount.UnmountExecutor>();
|
2024-06-09 14:30:53 +00:00
|
|
|
|
|
2024-07-17 13:05:24 +00:00
|
|
|
|
// task factories
|
2024-09-18 20:40:12 +00:00
|
|
|
|
serviceCollection
|
2024-09-20 14:05:39 +00:00
|
|
|
|
.AddTaskFactoryAndExecutor<StepDisabled.SkipRemainingTasks, StepDisabled.Factory,
|
|
|
|
|
StepDisabled.SkipDisabledStepsExecutor>();
|
2024-08-20 00:48:06 +00:00
|
|
|
|
serviceCollection.AddTaskFactory<EquipRecommended.BeforeDutyOrInstance>();
|
2024-09-18 20:40:12 +00:00
|
|
|
|
serviceCollection.AddTaskFactoryAndExecutor<Gather.GatheringTask, Gather.Factory, Gather.StartGathering>();
|
|
|
|
|
serviceCollection.AddTaskExecutor<Gather.SkipMarker, Gather.DoSkip>();
|
|
|
|
|
serviceCollection
|
|
|
|
|
.AddTaskFactoryAndExecutor<AetheryteShortcut.Task, AetheryteShortcut.Factory,
|
|
|
|
|
AetheryteShortcut.UseAetheryteShortcut>();
|
2024-09-20 14:05:39 +00:00
|
|
|
|
serviceCollection
|
|
|
|
|
.AddTaskExecutor<AetheryteShortcut.MoveAwayFromAetheryte, AetheryteShortcut.MoveAwayFromAetheryteExecutor>();
|
2024-09-18 20:40:12 +00:00
|
|
|
|
serviceCollection
|
|
|
|
|
.AddTaskFactoryAndExecutor<SkipCondition.SkipTask, SkipCondition.Factory, SkipCondition.CheckSkip>();
|
|
|
|
|
serviceCollection
|
|
|
|
|
.AddTaskFactoryAndExecutor<AethernetShortcut.Task, AethernetShortcut.Factory,
|
|
|
|
|
AethernetShortcut.UseAethernetShortcut>();
|
|
|
|
|
serviceCollection
|
|
|
|
|
.AddTaskFactoryAndExecutor<WaitAtStart.WaitDelay, WaitAtStart.Factory, WaitAtStart.WaitDelayExecutor>();
|
|
|
|
|
serviceCollection.AddTaskFactoryAndExecutor<MoveTo.MoveTask, MoveTo.Factory, MoveTo.MoveExecutor>();
|
|
|
|
|
serviceCollection.AddTaskExecutor<MoveTo.WaitForNearDataId, MoveTo.WaitForNearDataIdExecutor>();
|
|
|
|
|
serviceCollection.AddTaskExecutor<MoveTo.LandTask, MoveTo.LandExecutor>();
|
|
|
|
|
|
2024-09-20 14:05:39 +00:00
|
|
|
|
serviceCollection
|
|
|
|
|
.AddTaskFactoryAndExecutor<NextQuest.SetQuestTask, NextQuest.Factory, NextQuest.NextQuestExecutor>();
|
2024-09-18 20:40:12 +00:00
|
|
|
|
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>();
|
2024-09-18 22:00:16 +00:00
|
|
|
|
serviceCollection.AddTaskFactoryAndExecutor<Duty.Task, Duty.Factory, Duty.OpenDutyWindowExecutor>();
|
2024-08-20 00:48:06 +00:00
|
|
|
|
serviceCollection.AddTaskFactory<Emote.Factory>();
|
2024-09-18 20:40:12 +00:00
|
|
|
|
serviceCollection.AddTaskExecutor<Emote.UseOnObject, Emote.UseOnObjectExecutor>();
|
|
|
|
|
serviceCollection.AddTaskExecutor<Emote.UseOnSelf, Emote.UseOnSelfExecutor>();
|
|
|
|
|
serviceCollection.AddTaskFactoryAndExecutor<Action.UseOnObject, Action.Factory, Action.UseOnObjectExecutor>();
|
|
|
|
|
serviceCollection.AddTaskFactoryAndExecutor<Interact.Task, Interact.Factory, Interact.DoInteract>();
|
2024-08-20 00:48:06 +00:00
|
|
|
|
serviceCollection.AddTaskFactory<Jump.Factory>();
|
2024-09-18 20:40:12 +00:00
|
|
|
|
serviceCollection.AddTaskExecutor<Jump.SingleJumpTask, Jump.DoSingleJump>();
|
|
|
|
|
serviceCollection.AddTaskExecutor<Jump.RepeatedJumpTask, Jump.DoRepeatedJumps>();
|
|
|
|
|
serviceCollection.AddTaskFactoryAndExecutor<Dive.Task, Dive.Factory, Dive.DoDive>();
|
|
|
|
|
serviceCollection.AddTaskFactoryAndExecutor<Say.Task, Say.Factory, Say.UseChat>();
|
2024-08-20 00:48:06 +00:00
|
|
|
|
serviceCollection.AddTaskFactory<UseItem.Factory>();
|
2024-09-18 20:40:12 +00:00
|
|
|
|
serviceCollection.AddTaskExecutor<UseItem.UseOnGround, UseItem.UseOnGroundExecutor>();
|
|
|
|
|
serviceCollection.AddTaskExecutor<UseItem.UseOnPosition, UseItem.UseOnPositionExecutor>();
|
|
|
|
|
serviceCollection.AddTaskExecutor<UseItem.UseOnObject, UseItem.UseOnObjectExecutor>();
|
|
|
|
|
serviceCollection.AddTaskExecutor<UseItem.UseOnSelf, UseItem.UseOnSelfExecutor>();
|
2024-09-18 22:00:16 +00:00
|
|
|
|
serviceCollection.AddTaskFactoryAndExecutor<EquipItem.Task, EquipItem.Factory, EquipItem.DoEquip>();
|
2024-09-18 20:40:12 +00:00
|
|
|
|
serviceCollection
|
|
|
|
|
.AddTaskFactoryAndExecutor<EquipRecommended.EquipTask, EquipRecommended.Factory,
|
|
|
|
|
EquipRecommended.DoEquipRecommended>();
|
|
|
|
|
serviceCollection.AddTaskFactoryAndExecutor<Craft.CraftTask, Craft.Factory, Craft.DoCraft>();
|
|
|
|
|
serviceCollection
|
|
|
|
|
.AddTaskFactoryAndExecutor<TurnInDelivery.Task, TurnInDelivery.Factory,
|
|
|
|
|
TurnInDelivery.SatisfactionSupplyTurnIn>();
|
|
|
|
|
|
2024-08-20 00:48:06 +00:00
|
|
|
|
serviceCollection.AddTaskFactory<InitiateLeve.Factory>();
|
2024-09-20 14:05:39 +00:00
|
|
|
|
serviceCollection
|
|
|
|
|
.AddTaskExecutor<InitiateLeve.SkipInitiateIfActive, InitiateLeve.SkipInitiateIfActiveExecutor>();
|
2024-09-18 20:40:12 +00:00
|
|
|
|
serviceCollection.AddTaskExecutor<InitiateLeve.OpenJournal, InitiateLeve.OpenJournalExecutor>();
|
|
|
|
|
serviceCollection.AddTaskExecutor<InitiateLeve.Initiate, InitiateLeve.InitiateExecutor>();
|
|
|
|
|
serviceCollection.AddTaskExecutor<InitiateLeve.SelectDifficulty, InitiateLeve.SelectDifficultyExecutor>();
|
2024-06-09 14:30:53 +00:00
|
|
|
|
|
2024-09-18 22:00:16 +00:00
|
|
|
|
serviceCollection.AddTaskExecutor<WaitCondition.Task, WaitCondition.WaitConditionExecutor>();
|
2024-08-20 00:48:06 +00:00
|
|
|
|
serviceCollection.AddTaskFactory<WaitAtEnd.Factory>();
|
2024-09-18 20:40:12 +00:00
|
|
|
|
serviceCollection.AddTaskExecutor<WaitAtEnd.WaitDelay, WaitAtEnd.WaitDelayExecutor>();
|
|
|
|
|
serviceCollection.AddTaskExecutor<WaitAtEnd.WaitNextStepOrSequence, WaitAtEnd.WaitNextStepOrSequenceExecutor>();
|
|
|
|
|
serviceCollection.AddTaskExecutor<WaitAtEnd.WaitForCompletionFlags, WaitAtEnd.WaitForCompletionFlagsExecutor>();
|
|
|
|
|
serviceCollection.AddTaskExecutor<WaitAtEnd.WaitObjectAtPosition, WaitAtEnd.WaitObjectAtPositionExecutor>();
|
|
|
|
|
serviceCollection.AddTaskExecutor<WaitAtEnd.WaitQuestAccepted, WaitAtEnd.WaitQuestAcceptedExecutor>();
|
|
|
|
|
serviceCollection.AddTaskExecutor<WaitAtEnd.WaitQuestCompleted, WaitAtEnd.WaitQuestCompletedExecutor>();
|
|
|
|
|
serviceCollection.AddTaskExecutor<WaitAtEnd.NextStep, WaitAtEnd.NextStepExecutor>();
|
|
|
|
|
serviceCollection.AddTaskExecutor<WaitAtEnd.EndAutomation, WaitAtEnd.EndAutomationExecutor>();
|
2024-08-15 23:21:15 +00:00
|
|
|
|
|
|
|
|
|
serviceCollection.AddSingleton<TaskCreator>();
|
2024-07-17 13:05:24 +00:00
|
|
|
|
}
|
2024-06-09 14:30:53 +00:00
|
|
|
|
|
2024-07-17 13:05:24 +00:00
|
|
|
|
private static void AddControllers(ServiceCollection serviceCollection)
|
|
|
|
|
{
|
2024-06-08 19:16:57 +00:00
|
|
|
|
serviceCollection.AddSingleton<MovementController>();
|
2024-07-12 08:31:34 +00:00
|
|
|
|
serviceCollection.AddSingleton<MovementOverrideController>();
|
2024-08-05 18:00:02 +00:00
|
|
|
|
serviceCollection.AddSingleton<GatheringPointRegistry>();
|
2024-06-08 19:16:57 +00:00
|
|
|
|
serviceCollection.AddSingleton<QuestRegistry>();
|
|
|
|
|
serviceCollection.AddSingleton<QuestController>();
|
2024-07-14 01:42:30 +00:00
|
|
|
|
serviceCollection.AddSingleton<CombatController>();
|
2024-08-03 09:17:20 +00:00
|
|
|
|
serviceCollection.AddSingleton<GatheringController>();
|
2024-08-04 14:03:23 +00:00
|
|
|
|
serviceCollection.AddSingleton<ContextMenuController>();
|
2024-09-22 12:31:14 +00:00
|
|
|
|
serviceCollection.AddSingleton<ShopController>();
|
2024-07-14 01:42:30 +00:00
|
|
|
|
|
2024-08-17 23:55:38 +00:00
|
|
|
|
serviceCollection.AddSingleton<CraftworksSupplyController>();
|
|
|
|
|
serviceCollection.AddSingleton<CreditsController>();
|
|
|
|
|
serviceCollection.AddSingleton<HelpUiController>();
|
|
|
|
|
serviceCollection.AddSingleton<InteractionUiController>();
|
|
|
|
|
serviceCollection.AddSingleton<LeveUiController>();
|
|
|
|
|
|
2024-09-01 13:14:28 +00:00
|
|
|
|
serviceCollection.AddSingleton<ICombatModule, Mount128Module>();
|
2024-07-14 01:42:30 +00:00
|
|
|
|
serviceCollection.AddSingleton<ICombatModule, RotationSolverRebornModule>();
|
2024-07-17 13:05:24 +00:00
|
|
|
|
}
|
2024-06-08 19:16:57 +00:00
|
|
|
|
|
2024-07-17 13:05:24 +00:00
|
|
|
|
private static void AddWindows(ServiceCollection serviceCollection)
|
|
|
|
|
{
|
2024-07-21 13:30:10 +00:00
|
|
|
|
serviceCollection.AddSingleton<UiUtils>();
|
|
|
|
|
|
|
|
|
|
serviceCollection.AddSingleton<ActiveQuestComponent>();
|
|
|
|
|
serviceCollection.AddSingleton<ARealmRebornComponent>();
|
|
|
|
|
serviceCollection.AddSingleton<CreationUtilsComponent>();
|
2024-08-19 13:19:15 +00:00
|
|
|
|
serviceCollection.AddSingleton<EventInfoComponent>();
|
2024-07-29 14:54:18 +00:00
|
|
|
|
serviceCollection.AddSingleton<QuestTooltipComponent>();
|
2024-07-21 13:30:10 +00:00
|
|
|
|
serviceCollection.AddSingleton<QuickAccessButtonsComponent>();
|
|
|
|
|
serviceCollection.AddSingleton<RemainingTasksComponent>();
|
|
|
|
|
|
2024-08-18 17:51:24 +00:00
|
|
|
|
serviceCollection.AddSingleton<QuestJournalComponent>();
|
|
|
|
|
serviceCollection.AddSingleton<GatheringJournalComponent>();
|
|
|
|
|
|
2024-06-18 15:51:23 +00:00
|
|
|
|
serviceCollection.AddSingleton<QuestWindow>();
|
2024-06-12 16:03:48 +00:00
|
|
|
|
serviceCollection.AddSingleton<ConfigWindow>();
|
2024-06-18 15:51:23 +00:00
|
|
|
|
serviceCollection.AddSingleton<DebugOverlay>();
|
2024-07-14 19:31:07 +00:00
|
|
|
|
serviceCollection.AddSingleton<QuestSelectionWindow>();
|
2024-07-15 22:18:10 +00:00
|
|
|
|
serviceCollection.AddSingleton<QuestValidationWindow>();
|
2024-07-29 14:54:18 +00:00
|
|
|
|
serviceCollection.AddSingleton<JournalProgressWindow>();
|
2024-08-24 23:30:42 +00:00
|
|
|
|
serviceCollection.AddSingleton<PriorityWindow>();
|
2024-07-17 13:05:24 +00:00
|
|
|
|
}
|
2024-07-15 22:18:10 +00:00
|
|
|
|
|
2024-07-17 13:05:24 +00:00
|
|
|
|
private static void AddQuestValidators(ServiceCollection serviceCollection)
|
|
|
|
|
{
|
2024-07-15 22:18:10 +00:00
|
|
|
|
serviceCollection.AddSingleton<QuestValidator>();
|
|
|
|
|
serviceCollection.AddSingleton<IQuestValidator, QuestDisabledValidator>();
|
|
|
|
|
serviceCollection.AddSingleton<IQuestValidator, BasicSequenceValidator>();
|
|
|
|
|
serviceCollection.AddSingleton<IQuestValidator, UniqueStartStopValidator>();
|
2024-07-16 12:43:31 +00:00
|
|
|
|
serviceCollection.AddSingleton<IQuestValidator, NextQuestValidator>();
|
2024-07-15 22:18:10 +00:00
|
|
|
|
serviceCollection.AddSingleton<IQuestValidator, CompletionFlagsValidator>();
|
2024-07-27 22:13:52 +00:00
|
|
|
|
serviceCollection.AddSingleton<IQuestValidator, AethernetShortcutValidator>();
|
2024-08-05 15:09:49 +00:00
|
|
|
|
serviceCollection.AddSingleton<IQuestValidator, DialogueChoiceValidator>();
|
2024-09-02 20:03:29 +00:00
|
|
|
|
serviceCollection.AddSingleton<IQuestValidator, ClassQuestShouldHaveShortcutValidator>();
|
2024-07-17 13:05:24 +00:00
|
|
|
|
serviceCollection.AddSingleton<JsonSchemaValidator>();
|
|
|
|
|
serviceCollection.AddSingleton<IQuestValidator>(sp => sp.GetRequiredService<JsonSchemaValidator>());
|
2024-05-25 21:51:37 +00:00
|
|
|
|
}
|
|
|
|
|
|
2024-08-05 15:09:49 +00:00
|
|
|
|
private static void Initialize(IServiceProvider serviceProvider)
|
|
|
|
|
{
|
|
|
|
|
serviceProvider.GetRequiredService<QuestRegistry>().Reload();
|
2024-08-05 18:00:02 +00:00
|
|
|
|
serviceProvider.GetRequiredService<GatheringPointRegistry>().Reload();
|
2024-08-05 15:09:49 +00:00
|
|
|
|
serviceProvider.GetRequiredService<CommandHandler>();
|
|
|
|
|
serviceProvider.GetRequiredService<ContextMenuController>();
|
2024-08-17 23:55:38 +00:00
|
|
|
|
serviceProvider.GetRequiredService<CraftworksSupplyController>();
|
|
|
|
|
serviceProvider.GetRequiredService<CreditsController>();
|
|
|
|
|
serviceProvider.GetRequiredService<HelpUiController>();
|
|
|
|
|
serviceProvider.GetRequiredService<LeveUiController>();
|
2024-09-22 12:31:14 +00:00
|
|
|
|
serviceProvider.GetRequiredService<ShopController>();
|
2024-08-31 12:03:53 +00:00
|
|
|
|
serviceProvider.GetRequiredService<QuestionableIpc>();
|
2024-08-05 15:09:49 +00:00
|
|
|
|
serviceProvider.GetRequiredService<DalamudInitializer>();
|
2024-09-11 14:58:07 +00:00
|
|
|
|
serviceProvider.GetRequiredService<AutoSnipeHandler>().Enable();
|
2024-08-05 15:09:49 +00:00
|
|
|
|
}
|
|
|
|
|
|
2024-05-25 21:51:37 +00:00
|
|
|
|
public void Dispose()
|
|
|
|
|
{
|
2024-06-08 19:16:57 +00:00
|
|
|
|
_serviceProvider?.Dispose();
|
2024-05-25 21:51:37 +00:00
|
|
|
|
}
|
|
|
|
|
}
|