Compare commits
No commits in common. "master" and "ipc" have entirely different histories.
@ -1,5 +1,5 @@
|
||||
<Project>
|
||||
<PropertyGroup Condition="$(MSBuildProjectName) != 'GatheringPathRenderer'">
|
||||
<Version>4.19</Version>
|
||||
<Version>4.18</Version>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
@ -1,8 +0,0 @@
|
||||
root = true
|
||||
|
||||
[*.json]
|
||||
indent_size = 2
|
||||
indent_style = space
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
charset = utf-8
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://git.carvel.li/liza/Questionable/raw/branch/master/GatheringPaths/gatheringlocation-v1.json",
|
||||
"title": "Gathering Location V1",
|
||||
|
@ -4,5 +4,3 @@
|
||||
indent_size = 2
|
||||
indent_style = space
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
charset = utf-8
|
||||
|
@ -1,4 +1,4 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0-windows</TargetFramework>
|
||||
<LangVersion>12</LangVersion>
|
||||
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "/liza/Questionable/raw/branch/master/Questionable.Model/common-aethernetshard.json",
|
||||
"type": "string",
|
||||
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "/liza/Questionable/raw/branch/master/Questionable.Model/common-aetheryte.json",
|
||||
"type": "string",
|
||||
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "/liza/Questionable/raw/branch/master/Questionable.Model/common-classjob.json",
|
||||
"type": "string",
|
||||
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "/liza/Questionable/raw/branch/master/Questionable.Model/common-vector3.json",
|
||||
"type": "object",
|
||||
|
@ -1,26 +1,16 @@
|
||||
{
|
||||
"Name": "Questionable",
|
||||
"Modules": {
|
||||
"BossMod.Autorotation.MiscAI.AutoFarm": [],
|
||||
"BossMod.Autorotation.MiscAI.AutoPull": [
|
||||
{
|
||||
"Track": "Automatically attack hunt marks once they are below 95% HP",
|
||||
"Option": "Disabled"
|
||||
},
|
||||
{
|
||||
"Track": "Automatically attack deep dungeon bosses when solo",
|
||||
"Option": "Disabled"
|
||||
},
|
||||
{
|
||||
"Track": "Automatically attack all targets if the Epic Echo status is present (i.e. when unsynced)",
|
||||
"Option": "Disabled"
|
||||
}
|
||||
],
|
||||
"BossMod.Autorotation.xan.DNC": [
|
||||
{
|
||||
"Track": "Buffs",
|
||||
"Option": "Auto"
|
||||
},
|
||||
{
|
||||
"Track": "Buffs",
|
||||
"Option": "Delay",
|
||||
"Mod": "Shift, Ctrl"
|
||||
},
|
||||
{
|
||||
"Track": "AOE",
|
||||
"Option": "AOE"
|
||||
@ -35,6 +25,11 @@
|
||||
"Track": "Buffs",
|
||||
"Option": "Auto"
|
||||
},
|
||||
{
|
||||
"Track": "Buffs",
|
||||
"Option": "Delay",
|
||||
"Mod": "Shift, Ctrl"
|
||||
},
|
||||
{
|
||||
"Track": "AOE",
|
||||
"Option": "AOE"
|
||||
@ -59,6 +54,11 @@
|
||||
"Track": "Buffs",
|
||||
"Option": "Auto"
|
||||
},
|
||||
{
|
||||
"Track": "Buffs",
|
||||
"Option": "Delay",
|
||||
"Mod": "Shift, Ctrl"
|
||||
},
|
||||
{
|
||||
"Track": "AOE",
|
||||
"Option": "AOE"
|
||||
@ -77,6 +77,11 @@
|
||||
"Track": "Buffs",
|
||||
"Option": "Auto"
|
||||
},
|
||||
{
|
||||
"Track": "Buffs",
|
||||
"Option": "Delay",
|
||||
"Mod": "Shift, Ctrl"
|
||||
},
|
||||
{
|
||||
"Track": "AOE",
|
||||
"Option": "AOE"
|
||||
@ -91,6 +96,11 @@
|
||||
"Track": "Buffs",
|
||||
"Option": "Auto"
|
||||
},
|
||||
{
|
||||
"Track": "Buffs",
|
||||
"Option": "Delay",
|
||||
"Mod": "Shift, Ctrl"
|
||||
},
|
||||
{
|
||||
"Track": "AOE",
|
||||
"Option": "AOE"
|
||||
@ -115,6 +125,11 @@
|
||||
"Track": "Buffs",
|
||||
"Option": "Auto"
|
||||
},
|
||||
{
|
||||
"Track": "Buffs",
|
||||
"Option": "Delay",
|
||||
"Mod": "Shift, Ctrl"
|
||||
},
|
||||
{
|
||||
"Track": "AOE",
|
||||
"Option": "AOE"
|
||||
@ -129,6 +144,11 @@
|
||||
"Track": "Buffs",
|
||||
"Option": "Auto"
|
||||
},
|
||||
{
|
||||
"Track": "Buffs",
|
||||
"Option": "Delay",
|
||||
"Mod": "Shift, Ctrl"
|
||||
},
|
||||
{
|
||||
"Track": "AOE",
|
||||
"Option": "AOE"
|
||||
@ -143,6 +163,11 @@
|
||||
"Track": "Buffs",
|
||||
"Option": "Auto"
|
||||
},
|
||||
{
|
||||
"Track": "Buffs",
|
||||
"Option": "Delay",
|
||||
"Mod": "Shift, Ctrl"
|
||||
},
|
||||
{
|
||||
"Track": "AOE",
|
||||
"Option": "AOE"
|
||||
@ -157,6 +182,11 @@
|
||||
"Track": "Buffs",
|
||||
"Option": "Auto"
|
||||
},
|
||||
{
|
||||
"Track": "Buffs",
|
||||
"Option": "Delay",
|
||||
"Mod": "Shift, Ctrl"
|
||||
},
|
||||
{
|
||||
"Track": "AOE",
|
||||
"Option": "AOE"
|
||||
@ -171,6 +201,11 @@
|
||||
"Track": "Buffs",
|
||||
"Option": "Auto"
|
||||
},
|
||||
{
|
||||
"Track": "Buffs",
|
||||
"Option": "Delay",
|
||||
"Mod": "Shift, Ctrl"
|
||||
},
|
||||
{
|
||||
"Track": "AOE",
|
||||
"Option": "AOE"
|
||||
@ -185,6 +220,11 @@
|
||||
"Track": "Buffs",
|
||||
"Option": "Auto"
|
||||
},
|
||||
{
|
||||
"Track": "Buffs",
|
||||
"Option": "Delay",
|
||||
"Mod": "Shift, Ctrl"
|
||||
},
|
||||
{
|
||||
"Track": "AOE",
|
||||
"Option": "AOE"
|
||||
@ -199,6 +239,11 @@
|
||||
"Track": "Buffs",
|
||||
"Option": "Auto"
|
||||
},
|
||||
{
|
||||
"Track": "Buffs",
|
||||
"Option": "Delay",
|
||||
"Mod": "Shift, Ctrl"
|
||||
},
|
||||
{
|
||||
"Track": "AOE",
|
||||
"Option": "AOE"
|
||||
@ -213,6 +258,11 @@
|
||||
"Track": "Buffs",
|
||||
"Option": "Auto"
|
||||
},
|
||||
{
|
||||
"Track": "Buffs",
|
||||
"Option": "Delay",
|
||||
"Mod": "Shift, Ctrl"
|
||||
},
|
||||
{
|
||||
"Track": "AOE",
|
||||
"Option": "AOE"
|
||||
@ -227,6 +277,11 @@
|
||||
"Track": "Buffs",
|
||||
"Option": "Auto"
|
||||
},
|
||||
{
|
||||
"Track": "Buffs",
|
||||
"Option": "Delay",
|
||||
"Mod": "Shift, Ctrl"
|
||||
},
|
||||
{
|
||||
"Track": "AOE",
|
||||
"Option": "AOE"
|
||||
@ -241,6 +296,11 @@
|
||||
"Track": "Buffs",
|
||||
"Option": "Auto"
|
||||
},
|
||||
{
|
||||
"Track": "Buffs",
|
||||
"Option": "Delay",
|
||||
"Mod": "Shift, Ctrl"
|
||||
},
|
||||
{
|
||||
"Track": "AOE",
|
||||
"Option": "AOE"
|
||||
@ -255,6 +315,11 @@
|
||||
"Track": "Buffs",
|
||||
"Option": "Auto"
|
||||
},
|
||||
{
|
||||
"Track": "Buffs",
|
||||
"Option": "Delay",
|
||||
"Mod": "Shift, Ctrl"
|
||||
},
|
||||
{
|
||||
"Track": "AOE",
|
||||
"Option": "AOE"
|
||||
@ -264,11 +329,22 @@
|
||||
"Option": "Manual"
|
||||
}
|
||||
],
|
||||
"BossMod.Autorotation.StandardWAR": [
|
||||
{
|
||||
"Track": "AOE",
|
||||
"Option": "AutoFinishCombo"
|
||||
}
|
||||
],
|
||||
"BossMod.Autorotation.xan.RDM": [
|
||||
{
|
||||
"Track": "Buffs",
|
||||
"Option": "Auto"
|
||||
},
|
||||
{
|
||||
"Track": "Buffs",
|
||||
"Option": "Delay",
|
||||
"Mod": "Shift, Ctrl"
|
||||
},
|
||||
{
|
||||
"Track": "AOE",
|
||||
"Option": "AOE"
|
||||
@ -283,6 +359,11 @@
|
||||
"Track": "Buffs",
|
||||
"Option": "Auto"
|
||||
},
|
||||
{
|
||||
"Track": "Buffs",
|
||||
"Option": "Delay",
|
||||
"Mod": "Shift, Ctrl"
|
||||
},
|
||||
{
|
||||
"Track": "AOE",
|
||||
"Option": "AOE"
|
||||
@ -291,18 +372,6 @@
|
||||
"Track": "Targeting",
|
||||
"Option": "Manual"
|
||||
}
|
||||
],
|
||||
"BossMod.Autorotation.VeynWAR": [
|
||||
{
|
||||
"Track": "AOE",
|
||||
"Option": "AutoFinishCombo"
|
||||
}
|
||||
],
|
||||
"BossMod.Autorotation.MiscAI.NormalMovement": [
|
||||
{
|
||||
"Track": "Destination",
|
||||
"Option": "Pathfind"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
@ -473,9 +473,6 @@ internal sealed class QuestController : MiniTaskController<QuestController>
|
||||
private void ClearTasksInternal()
|
||||
{
|
||||
//_logger.LogDebug("Clearing task (internally)");
|
||||
if (_taskQueue.CurrentTaskExecutor is IStoppableTaskExecutor stoppableTaskExecutor)
|
||||
stoppableTaskExecutor.StopNow();
|
||||
|
||||
_taskQueue.Reset();
|
||||
|
||||
_yesAlreadyIpc.RestoreYesAlready();
|
||||
|
@ -49,7 +49,7 @@ internal static class Duty
|
||||
TerritoryData territoryData,
|
||||
IClientState clientState,
|
||||
IChatGui chatGui,
|
||||
SendNotification.Executor sendNotificationExecutor) : TaskExecutor<StartAutoDutyTask>, IStoppableTaskExecutor
|
||||
SendNotification.Executor sendNotificationExecutor) : TaskExecutor<StartAutoDutyTask>
|
||||
{
|
||||
protected override bool Start()
|
||||
{
|
||||
@ -94,8 +94,6 @@ internal static class Duty
|
||||
: ETaskResult.StillRunning;
|
||||
}
|
||||
|
||||
public void StopNow() => autoDutyIpc.Stop();
|
||||
|
||||
public override bool ShouldInterruptOnDamage() => false;
|
||||
}
|
||||
|
||||
@ -107,7 +105,7 @@ internal static class Duty
|
||||
internal sealed class WaitAutoDutyExecutor(
|
||||
AutoDutyIpc autoDutyIpc,
|
||||
TerritoryData territoryData,
|
||||
IClientState clientState) : TaskExecutor<WaitAutoDutyTask>, IStoppableTaskExecutor
|
||||
IClientState clientState) : TaskExecutor<WaitAutoDutyTask>
|
||||
{
|
||||
protected override bool Start() => true;
|
||||
|
||||
@ -122,8 +120,6 @@ internal static class Duty
|
||||
: ETaskResult.StillRunning;
|
||||
}
|
||||
|
||||
public void StopNow() => autoDutyIpc.Stop();
|
||||
|
||||
public override bool ShouldInterruptOnDamage() => false;
|
||||
}
|
||||
|
||||
|
@ -25,11 +25,6 @@ internal interface IExtraTaskCreator : ITaskExecutor
|
||||
IEnumerable<ITask> CreateExtraTasks();
|
||||
}
|
||||
|
||||
internal interface IStoppableTaskExecutor : ITaskExecutor
|
||||
{
|
||||
void StopNow();
|
||||
}
|
||||
|
||||
internal abstract class TaskExecutor<T> : ITaskExecutor
|
||||
where T : class, ITask
|
||||
{
|
||||
|
24
Questionable/External/AutoDutyIpc.cs
vendored
24
Questionable/External/AutoDutyIpc.cs
vendored
@ -13,22 +13,17 @@ internal sealed class AutoDutyIpc
|
||||
private readonly TerritoryData _territoryData;
|
||||
private readonly ILogger<AutoDutyIpc> _logger;
|
||||
private readonly ICallGateSubscriber<uint,bool> _contentHasPath;
|
||||
private readonly ICallGateSubscriber<string, string, object> _setConfig;
|
||||
private readonly ICallGateSubscriber<uint,int,bool,object> _run;
|
||||
private readonly ICallGateSubscriber<bool> _isStopped;
|
||||
private readonly ICallGateSubscriber<object> _stop;
|
||||
|
||||
public AutoDutyIpc(IDalamudPluginInterface pluginInterface, Configuration configuration,
|
||||
TerritoryData territoryData, ILogger<AutoDutyIpc> logger)
|
||||
public AutoDutyIpc(IDalamudPluginInterface pluginInterface, Configuration configuration, TerritoryData territoryData, ILogger<AutoDutyIpc> logger)
|
||||
{
|
||||
_configuration = configuration;
|
||||
_territoryData = territoryData;
|
||||
_logger = logger;
|
||||
_contentHasPath = pluginInterface.GetIpcSubscriber<uint, bool>("AutoDuty.ContentHasPath");
|
||||
_setConfig = pluginInterface.GetIpcSubscriber<string, string, object>("AutoDuty.SetConfig");
|
||||
_run = pluginInterface.GetIpcSubscriber<uint, int, bool, object>("AutoDuty.Run");
|
||||
_isStopped = pluginInterface.GetIpcSubscriber<bool>("AutoDuty.IsStopped");
|
||||
_stop = pluginInterface.GetIpcSubscriber<object>("AutoDuty.Stop");
|
||||
}
|
||||
|
||||
public bool IsConfiguredToRunContent(uint? cfcId, bool autoDutyEnabled)
|
||||
@ -60,8 +55,7 @@ internal sealed class AutoDutyIpc
|
||||
}
|
||||
catch (IpcError e)
|
||||
{
|
||||
_logger.LogWarning("Unable to query AutoDuty for path in territory {TerritoryType}: {Message}",
|
||||
cfcData.TerritoryId, e.Message);
|
||||
_logger.LogWarning("Unable to query AutoDuty for path in territory {TerritoryType}: {Message}", cfcData.TerritoryId, e.Message);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -73,7 +67,6 @@ internal sealed class AutoDutyIpc
|
||||
|
||||
try
|
||||
{
|
||||
_setConfig.InvokeAction("dutyModeEnum", "Support");
|
||||
_run.InvokeAction(cfcData.TerritoryId, 1, true);
|
||||
}
|
||||
catch (IpcError e)
|
||||
@ -93,17 +86,4 @@ internal sealed class AutoDutyIpc
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public void Stop()
|
||||
{
|
||||
try
|
||||
{
|
||||
_logger.LogInformation("Calling AutoDuty.Stop");
|
||||
_stop.InvokeAction();
|
||||
}
|
||||
catch (IpcError e)
|
||||
{
|
||||
throw new TaskException($"Unable to stop AutoDuty: {e.Message}", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
12
Questionable/External/QuestionableIpc.cs
vendored
12
Questionable/External/QuestionableIpc.cs
vendored
@ -15,13 +15,11 @@ internal sealed class QuestionableIpc : IDisposable
|
||||
private const string IpcGetCurrentQuestId = "Questionable.GetCurrentQuestId";
|
||||
private const string IpcGetCurrentlyActiveEventQuests = "Questionable.GetCurrentlyActiveEventQuests";
|
||||
private const string IpcStartQuest = "Questionable.StartQuest";
|
||||
private const string IpcStartSingleQuest = "Questionable.StartSingleQuest";
|
||||
|
||||
private readonly ICallGateProvider<bool> _isRunning;
|
||||
private readonly ICallGateProvider<string?> _getCurrentQuestId;
|
||||
private readonly ICallGateProvider<List<string>> _getCurrentlyActiveEventQuests;
|
||||
private readonly ICallGateProvider<string, bool> _startQuest;
|
||||
private readonly ICallGateProvider<string, bool> _startSingleQuest;
|
||||
|
||||
public QuestionableIpc(
|
||||
QuestController questController,
|
||||
@ -41,20 +39,14 @@ internal sealed class QuestionableIpc : IDisposable
|
||||
eventInfoComponent.GetCurrentlyActiveEventQuests().Select(q => q.ToString()).ToList());
|
||||
|
||||
_startQuest = pluginInterface.GetIpcProvider<string, bool>(IpcStartQuest);
|
||||
_startQuest.RegisterFunc((string questId) => StartQuest(questController, questRegistry, questId, false));
|
||||
|
||||
_startSingleQuest = pluginInterface.GetIpcProvider<string, bool>(IpcStartSingleQuest);
|
||||
_startSingleQuest.RegisterFunc((string questId) => StartQuest(questController, questRegistry, questId, true));
|
||||
_startQuest.RegisterFunc((string questId) => StartQuest(questController, questRegistry, questId));
|
||||
}
|
||||
|
||||
private static bool StartQuest(QuestController qc, QuestRegistry qr, string questId, bool single)
|
||||
private static bool StartQuest(QuestController qc, QuestRegistry qr, string questId)
|
||||
{
|
||||
if (ElementId.TryFromString(questId, out var elementId) && elementId != null && qr.TryGetQuest(elementId, out var quest))
|
||||
{
|
||||
qc.SetNextQuest(quest);
|
||||
if (single)
|
||||
qc.StartSingleQuest("IPCQuestSelection");
|
||||
else
|
||||
qc.Start("IPCQuestSelection");
|
||||
return true;
|
||||
}
|
||||
|
@ -139,7 +139,7 @@ internal sealed class EventInfoComponent
|
||||
public IEnumerable<QuestId> GetCurrentlyActiveEventQuests()
|
||||
{
|
||||
return _eventQuests
|
||||
.Where(x => x.EndsAtUtc >= DateTime.UtcNow)
|
||||
.Where(x => x.EndsAtUtc <= DateTime.UtcNow)
|
||||
.SelectMany(x => x.QuestIds);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user