muffin v7.4.10
This commit is contained in:
parent
2df81c5d15
commit
b8dd142c23
47 changed files with 3604 additions and 1058 deletions
|
|
@ -196,6 +196,20 @@ internal sealed class QuestionableIpc : IDisposable
|
|||
|
||||
private const string IpcStopLevelingMode = "Questionable.StopLevelingMode";
|
||||
|
||||
private const string IpcGetBlacklistedQuests = "Questionable.GetBlacklistedQuests";
|
||||
|
||||
private const string IpcAddBlacklistedQuest = "Questionable.AddBlacklistedQuest";
|
||||
|
||||
private const string IpcRemoveBlacklistedQuest = "Questionable.RemoveBlacklistedQuest";
|
||||
|
||||
private const string IpcClearBlacklistedQuests = "Questionable.ClearBlacklistedQuests";
|
||||
|
||||
private const string IpcIsQuestBlacklisted = "Questionable.IsQuestBlacklisted";
|
||||
|
||||
private const string IpcGetMsqPriorityMode = "Questionable.GetMsqPriorityMode";
|
||||
|
||||
private const string IpcSetMsqPriorityMode = "Questionable.SetMsqPriorityMode";
|
||||
|
||||
private readonly QuestController _questController;
|
||||
|
||||
private readonly QuestRegistry _questRegistry;
|
||||
|
|
@ -350,6 +364,20 @@ internal sealed class QuestionableIpc : IDisposable
|
|||
|
||||
private readonly ICallGateProvider<bool> _stopLevelingMode;
|
||||
|
||||
private readonly ICallGateProvider<List<string>> _getBlacklistedQuests;
|
||||
|
||||
private readonly ICallGateProvider<string, bool> _addBlacklistedQuest;
|
||||
|
||||
private readonly ICallGateProvider<string, bool> _removeBlacklistedQuest;
|
||||
|
||||
private readonly ICallGateProvider<bool> _clearBlacklistedQuests;
|
||||
|
||||
private readonly ICallGateProvider<string, bool> _isQuestBlacklisted;
|
||||
|
||||
private readonly ICallGateProvider<int> _getMsqPriorityMode;
|
||||
|
||||
private readonly ICallGateProvider<int, bool> _setMsqPriorityMode;
|
||||
|
||||
public QuestionableIpc(QuestController questController, EventInfoComponent eventInfoComponent, QuestRegistry questRegistry, QuestFunctions questFunctions, QuestData questData, ManualPriorityComponent manualPriorityComponent, PresetBuilderComponent presetBuilderComponent, Configuration configuration, IDalamudPluginInterface pluginInterface, IServiceProvider serviceProvider, AutoDutyIpc autoDutyIpc)
|
||||
{
|
||||
QuestionableIpc questionableIpc = this;
|
||||
|
|
@ -542,6 +570,20 @@ internal sealed class QuestionableIpc : IDisposable
|
|||
_startLevelingMode.RegisterFunc(StartLevelingMode);
|
||||
_stopLevelingMode = pluginInterface.GetIpcProvider<bool>("Questionable.StopLevelingMode");
|
||||
_stopLevelingMode.RegisterFunc(StopLevelingMode);
|
||||
_getBlacklistedQuests = pluginInterface.GetIpcProvider<List<string>>("Questionable.GetBlacklistedQuests");
|
||||
_getBlacklistedQuests.RegisterFunc(GetBlacklistedQuests);
|
||||
_addBlacklistedQuest = pluginInterface.GetIpcProvider<string, bool>("Questionable.AddBlacklistedQuest");
|
||||
_addBlacklistedQuest.RegisterFunc(AddBlacklistedQuest);
|
||||
_removeBlacklistedQuest = pluginInterface.GetIpcProvider<string, bool>("Questionable.RemoveBlacklistedQuest");
|
||||
_removeBlacklistedQuest.RegisterFunc(RemoveBlacklistedQuest);
|
||||
_clearBlacklistedQuests = pluginInterface.GetIpcProvider<bool>("Questionable.ClearBlacklistedQuests");
|
||||
_clearBlacklistedQuests.RegisterFunc(ClearBlacklistedQuests);
|
||||
_isQuestBlacklisted = pluginInterface.GetIpcProvider<string, bool>("Questionable.IsQuestBlacklisted");
|
||||
_isQuestBlacklisted.RegisterFunc(IsQuestBlacklistedIpc);
|
||||
_getMsqPriorityMode = pluginInterface.GetIpcProvider<int>("Questionable.GetMsqPriorityMode");
|
||||
_getMsqPriorityMode.RegisterFunc(GetMsqPriorityMode);
|
||||
_setMsqPriorityMode = pluginInterface.GetIpcProvider<int, bool>("Questionable.SetMsqPriorityMode");
|
||||
_setMsqPriorityMode.RegisterFunc(SetMsqPriorityMode);
|
||||
}
|
||||
|
||||
private bool StartQuest(string questId, bool single)
|
||||
|
|
@ -1387,6 +1429,67 @@ internal sealed class QuestionableIpc : IDisposable
|
|||
}
|
||||
}
|
||||
|
||||
private List<string> GetBlacklistedQuests()
|
||||
{
|
||||
return _configuration.General.BlacklistedQuests.Select((ElementId q) => q.ToString()).ToList();
|
||||
}
|
||||
|
||||
private bool AddBlacklistedQuest(string questId)
|
||||
{
|
||||
if (ElementId.TryFromString(questId, out ElementId elementId) && elementId != null && _configuration.General.BlacklistedQuests.Add(elementId))
|
||||
{
|
||||
_pluginInterface.SavePluginConfig(_configuration);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private bool RemoveBlacklistedQuest(string questId)
|
||||
{
|
||||
if (ElementId.TryFromString(questId, out ElementId elementId) && elementId != null)
|
||||
{
|
||||
bool num = _configuration.General.BlacklistedQuests.Remove(elementId);
|
||||
if (num)
|
||||
{
|
||||
_pluginInterface.SavePluginConfig(_configuration);
|
||||
}
|
||||
return num;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private bool ClearBlacklistedQuests()
|
||||
{
|
||||
_configuration.General.BlacklistedQuests.Clear();
|
||||
_pluginInterface.SavePluginConfig(_configuration);
|
||||
return true;
|
||||
}
|
||||
|
||||
private bool IsQuestBlacklistedIpc(string questId)
|
||||
{
|
||||
if (ElementId.TryFromString(questId, out ElementId elementId) && elementId != null)
|
||||
{
|
||||
return _questFunctions.IsQuestBlacklisted(elementId);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private int GetMsqPriorityMode()
|
||||
{
|
||||
return (int)_configuration.General.MsqPriority;
|
||||
}
|
||||
|
||||
private bool SetMsqPriorityMode(int mode)
|
||||
{
|
||||
if (!Enum.IsDefined(typeof(Configuration.EMsqPriorityMode), mode))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
_configuration.General.MsqPriority = (Configuration.EMsqPriorityMode)mode;
|
||||
_pluginInterface.SavePluginConfig(_configuration);
|
||||
return true;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
_exportQuestPriority.UnregisterFunc();
|
||||
|
|
@ -1456,5 +1559,12 @@ internal sealed class QuestionableIpc : IDisposable
|
|||
_getMsqLevelLockInfo.UnregisterFunc();
|
||||
_setLevelingModeEnabled.UnregisterFunc();
|
||||
_isLevelingModeEnabled.UnregisterFunc();
|
||||
_isQuestBlacklisted.UnregisterFunc();
|
||||
_clearBlacklistedQuests.UnregisterFunc();
|
||||
_removeBlacklistedQuest.UnregisterFunc();
|
||||
_addBlacklistedQuest.UnregisterFunc();
|
||||
_getBlacklistedQuests.UnregisterFunc();
|
||||
_setMsqPriorityMode.UnregisterFunc();
|
||||
_getMsqPriorityMode.UnregisterFunc();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue