using System;
using System.Collections.Generic;
+using System.Linq;
using Dalamud.Interface;
using Dalamud.Interface.Colors;
using Dalamud.Interface.Components;
private static readonly IReadOnlyList<PluginInfo> RequiredPlugins =
[
new("vnavmesh",
+ "vnavmesh",
"""
vnavmesh handles the navigation within a zone, moving
your character to the next quest-related objective.
new Uri("https://github.com/awgil/ffxiv_navmesh/"),
new Uri("https://puni.sh/api/repository/veyn")),
new("Lifestream",
+ "Lifestream",
"""
Used to travel to aethernet shards in cities.
""",
new Uri("https://github.com/NightmareXIV/Lifestream"),
new Uri("https://github.com/NightmareXIV/MyDalamudPlugins/raw/main/pluginmaster.json")),
new("TextAdvance",
+ "TextAdvance",
"""
Automatically accepts and turns in quests, skips cutscenes
and dialogue.
private readonly Configuration _configuration;
private readonly IDalamudPluginInterface _pluginInterface;
private readonly UiUtils _uiUtils;
- private readonly DalamudReflector _dalamudReflector;
private readonly ILogger<OneTimeSetupWindow> _logger;
public OneTimeSetupWindow(Configuration configuration, IDalamudPluginInterface pluginInterface, UiUtils uiUtils,
- DalamudReflector dalamudReflector, ILogger<OneTimeSetupWindow> logger, AutomatonIpc automatonIpc)
+ ILogger<OneTimeSetupWindow> logger, AutomatonIpc automatonIpc)
: base("Questionable Setup###QuestionableOneTimeSetup",
ImGuiWindowFlags.NoCollapse | ImGuiWindowFlags.AlwaysAutoResize | ImGuiWindowFlags.NoSavedSettings, true)
{
_configuration = configuration;
_pluginInterface = pluginInterface;
_uiUtils = uiUtils;
- _dalamudReflector = dalamudReflector;
_logger = logger;
_recommendedPlugins =
[
new("Rotation Solver Reborn",
+ "RotationSolver",
"""
Automatically handles most combat interactions you encounter
during quests, including being interrupted by mobs.
new Uri(
"https://raw.githubusercontent.com/FFXIV-CombatReborn/CombatRebornRepo/main/pluginmaster.json")),
new PluginInfo("CBT (formerly known as Automaton)",
+ "Automaton",
"""
Automaton is a collection of automation-related tweaks.
The 'Sniper no sniping' tweak can complete snipe tasks automatically.
new Uri("https://puni.sh/api/repository/croizat"),
[new PluginDetailInfo("'Sniper no sniping' enabled", () => automatonIpc.IsAutoSnipeEnabled)]),
new("NotificationMaster",
+ "NotificationMaster",
"""
Sends a configurable out-of-game notification if a quest
requires manual actions.
private bool DrawPlugin(PluginInfo plugin, float checklistPadding)
{
- bool isInstalled = IsPluginInstalled(plugin.DisplayName);
+ bool isInstalled = IsPluginInstalled(plugin);
using (ImRaii.PushId("plugin_" + plugin.DisplayName))
{
_uiUtils.ChecklistItem(plugin.DisplayName, isInstalled);
return isInstalled;
}
- private bool IsPluginInstalled(string internalName)
+ private bool IsPluginInstalled(PluginInfo pluginInfo)
{
- return _dalamudReflector.TryGetDalamudPlugin(internalName, out _, suppressErrors: true, ignoreCache: true);
+ return _pluginInterface.InstalledPlugins.Any(x => x.InternalName == pluginInfo.InternalName && x.IsLoaded);
}
private sealed record PluginInfo(
string DisplayName,
+ string InternalName,
string Details,
Uri WebsiteUri,
Uri? DalamudRepositoryUri,