muffin v6.12
This commit is contained in:
parent
cfb4dea47e
commit
c8197297b2
58 changed files with 40038 additions and 58059 deletions
|
@ -13,7 +13,7 @@ namespace Questionable.External;
|
|||
|
||||
internal sealed class PandorasBoxIpc : IDisposable
|
||||
{
|
||||
private static readonly ImmutableHashSet<string> ConflictingFeatures = new HashSet<string> { "Auto-Meditation", "Auto-Motif (Out of Combat)", "Auto-Mount after Combat", "Auto-Mount after Gathering", "Auto-Peleton", "Auto-Spring in Sanctuaries", "Auto-select Turn-ins", "Auto-Sync FATEs", "Auto-interact with Gathering Nodes", "Pandora Quick Gather" }.ToImmutableHashSet();
|
||||
private static readonly ImmutableHashSet<string> ConflictingFeatures = new HashSet<string> { "Auto-Meditation", "Auto-Motif (Out of Combat)", "Auto-Mount after Combat", "Auto-Mount after Gathering", "Auto-Peleton", "Auto-Sprint in Sanctuaries", "Auto-interact with Gathering Nodes", "Auto-select Turn-ins", "Auto-Sync FATEs", "Pandora Quick Gather" }.ToImmutableHashSet();
|
||||
|
||||
private readonly IFramework _framework;
|
||||
|
||||
|
|
|
@ -44,6 +44,14 @@ internal sealed class QuestionableIpc : IDisposable
|
|||
|
||||
private const string IpcIsQuestLocked = "Questionable.IsQuestLocked";
|
||||
|
||||
private const string IpcIsQuestCompleted = "Questionable.IsQuestCompleted";
|
||||
|
||||
private const string IpcIsQuestAvailable = "Questionable.IsQuestAvailable";
|
||||
|
||||
private const string IpcIsQuestAccepted = "Questionable.IsQuestAccepted";
|
||||
|
||||
private const string IpcIsQuestUnobtainable = "Questionable.IsQuestUnobtainable";
|
||||
|
||||
private const string IpcImportQuestPriority = "Questionable.ImportQuestPriority";
|
||||
|
||||
private const string IpcClearQuestPriority = "Questionable.ClearQuestPriority";
|
||||
|
@ -60,6 +68,8 @@ internal sealed class QuestionableIpc : IDisposable
|
|||
|
||||
private readonly QuestFunctions _questFunctions;
|
||||
|
||||
private readonly ManualPriorityComponent _manualPriorityComponent;
|
||||
|
||||
private readonly ICallGateProvider<bool> _isRunning;
|
||||
|
||||
private readonly ICallGateProvider<string?> _getCurrentQuestId;
|
||||
|
@ -74,6 +84,14 @@ internal sealed class QuestionableIpc : IDisposable
|
|||
|
||||
private readonly ICallGateProvider<string, bool> _isQuestLocked;
|
||||
|
||||
private readonly ICallGateProvider<string, bool> _isQuestCompleted;
|
||||
|
||||
private readonly ICallGateProvider<string, bool> _isQuestAvailable;
|
||||
|
||||
private readonly ICallGateProvider<string, bool> _isQuestAccepted;
|
||||
|
||||
private readonly ICallGateProvider<string, bool> _isQuestUnobtainable;
|
||||
|
||||
private readonly ICallGateProvider<string, bool> _importQuestPriority;
|
||||
|
||||
private readonly ICallGateProvider<string, bool> _addQuestPriority;
|
||||
|
@ -84,12 +102,13 @@ internal sealed class QuestionableIpc : IDisposable
|
|||
|
||||
private readonly ICallGateProvider<string> _exportQuestPriority;
|
||||
|
||||
public QuestionableIpc(QuestController questController, EventInfoComponent eventInfoComponent, QuestRegistry questRegistry, QuestFunctions questFunctions, PriorityWindow priorityWindow, IDalamudPluginInterface pluginInterface)
|
||||
public QuestionableIpc(QuestController questController, EventInfoComponent eventInfoComponent, QuestRegistry questRegistry, QuestFunctions questFunctions, ManualPriorityComponent manualPriorityComponent, IDalamudPluginInterface pluginInterface)
|
||||
{
|
||||
QuestionableIpc questionableIpc = this;
|
||||
_questController = questController;
|
||||
_questRegistry = questRegistry;
|
||||
_questFunctions = questFunctions;
|
||||
_manualPriorityComponent = manualPriorityComponent;
|
||||
_isRunning = pluginInterface.GetIpcProvider<bool>("Questionable.IsRunning");
|
||||
_isRunning.RegisterFunc(() => questController.AutomationType != QuestController.EAutomationType.Manual || questController.IsRunning);
|
||||
_getCurrentQuestId = pluginInterface.GetIpcProvider<string>("Questionable.GetCurrentQuestId");
|
||||
|
@ -105,6 +124,14 @@ internal sealed class QuestionableIpc : IDisposable
|
|||
_startSingleQuest.RegisterFunc((string questId) => questionableIpc.StartQuest(questId, single: true));
|
||||
_isQuestLocked = pluginInterface.GetIpcProvider<string, bool>("Questionable.IsQuestLocked");
|
||||
_isQuestLocked.RegisterFunc(IsQuestLocked);
|
||||
_isQuestCompleted = pluginInterface.GetIpcProvider<string, bool>("Questionable.IsQuestCompleted");
|
||||
_isQuestCompleted.RegisterFunc(IsQuestCompleted);
|
||||
_isQuestAvailable = pluginInterface.GetIpcProvider<string, bool>("Questionable.IsQuestAvailable");
|
||||
_isQuestAvailable.RegisterFunc(IsQuestAvailable);
|
||||
_isQuestAccepted = pluginInterface.GetIpcProvider<string, bool>("Questionable.IsQuestAccepted");
|
||||
_isQuestAccepted.RegisterFunc(IsQuestAccepted);
|
||||
_isQuestUnobtainable = pluginInterface.GetIpcProvider<string, bool>("Questionable.IsQuestUnobtainable");
|
||||
_isQuestUnobtainable.RegisterFunc(IsQuestUnobtainable);
|
||||
_importQuestPriority = pluginInterface.GetIpcProvider<string, bool>("Questionable.ImportQuestPriority");
|
||||
_importQuestPriority.RegisterFunc(ImportQuestPriority);
|
||||
_addQuestPriority = pluginInterface.GetIpcProvider<string, bool>("Questionable.AddQuestPriority");
|
||||
|
@ -114,7 +141,7 @@ internal sealed class QuestionableIpc : IDisposable
|
|||
_insertQuestPriority = pluginInterface.GetIpcProvider<int, string, bool>("Questionable.InsertQuestPriority");
|
||||
_insertQuestPriority.RegisterFunc(InsertQuestPriority);
|
||||
_exportQuestPriority = pluginInterface.GetIpcProvider<string>("Questionable.ExportQuestPriority");
|
||||
_exportQuestPriority.RegisterFunc(priorityWindow.EncodeQuestPriority);
|
||||
_exportQuestPriority.RegisterFunc(_manualPriorityComponent.EncodeQuestPriority);
|
||||
}
|
||||
|
||||
private bool StartQuest(string questId, bool single)
|
||||
|
@ -172,6 +199,42 @@ internal sealed class QuestionableIpc : IDisposable
|
|||
return true;
|
||||
}
|
||||
|
||||
private bool IsQuestCompleted(string questId)
|
||||
{
|
||||
if (ElementId.TryFromString(questId, out ElementId elementId) && elementId != null)
|
||||
{
|
||||
return _questFunctions.IsQuestComplete(elementId);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private bool IsQuestAvailable(string questId)
|
||||
{
|
||||
if (ElementId.TryFromString(questId, out ElementId elementId) && elementId != null)
|
||||
{
|
||||
return _questFunctions.IsReadyToAcceptQuest(elementId);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private bool IsQuestAccepted(string questId)
|
||||
{
|
||||
if (ElementId.TryFromString(questId, out ElementId elementId) && elementId != null)
|
||||
{
|
||||
return _questFunctions.IsQuestAccepted(elementId);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private bool IsQuestUnobtainable(string questId)
|
||||
{
|
||||
if (ElementId.TryFromString(questId, out ElementId elementId) && elementId != null)
|
||||
{
|
||||
return _questFunctions.IsQuestUnobtainable(elementId);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private bool ImportQuestPriority(string encodedQuestPriority)
|
||||
{
|
||||
List<ElementId> questElements = PriorityWindow.DecodeQuestPriority(encodedQuestPriority);
|
||||
|
@ -210,6 +273,10 @@ internal sealed class QuestionableIpc : IDisposable
|
|||
_clearQuestPriority.UnregisterFunc();
|
||||
_addQuestPriority.UnregisterFunc();
|
||||
_importQuestPriority.UnregisterFunc();
|
||||
_isQuestUnobtainable.UnregisterFunc();
|
||||
_isQuestAccepted.UnregisterFunc();
|
||||
_isQuestAvailable.UnregisterFunc();
|
||||
_isQuestCompleted.UnregisterFunc();
|
||||
_isQuestLocked.UnregisterFunc();
|
||||
_startSingleQuest.UnregisterFunc();
|
||||
_startQuest.UnregisterFunc();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue