Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
e0f416a5cd | |||
|
b2d57ae5a7 | ||
|
99b5ef42a6 | ||
7734692b0f | |||
16b62316c5 | |||
|
3c9e14e891 |
@ -1,7 +1,6 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json",
|
"$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json",
|
||||||
"Author": "liza",
|
"Author": "pot0to",
|
||||||
"Disabled": true,
|
|
||||||
"QuestSequence": [
|
"QuestSequence": [
|
||||||
{
|
{
|
||||||
"Sequence": 0,
|
"Sequence": 0,
|
||||||
@ -9,9 +8,9 @@
|
|||||||
{
|
{
|
||||||
"DataId": 1032643,
|
"DataId": 1032643,
|
||||||
"Position": {
|
"Position": {
|
||||||
"X": 787.0145,
|
"X": 787.0145,
|
||||||
"Y": -45.82774,
|
"Y": -45.82774,
|
||||||
"Z": -218.555
|
"Z": -218.555
|
||||||
},
|
},
|
||||||
"TerritoryId": 817,
|
"TerritoryId": 817,
|
||||||
"InteractionType": "AcceptQuest"
|
"InteractionType": "AcceptQuest"
|
||||||
@ -22,26 +21,56 @@
|
|||||||
"Sequence": 255,
|
"Sequence": 255,
|
||||||
"Steps": [
|
"Steps": [
|
||||||
{
|
{
|
||||||
|
"DataId": 33005,
|
||||||
"Position": {
|
"Position": {
|
||||||
"X": 788.1569,
|
"X": 214.7744,
|
||||||
"Y": -45.82557,
|
"Y": -19.57758,
|
||||||
"Z": -212.9306
|
"Z": 623.6767
|
||||||
},
|
},
|
||||||
"TerritoryId": 817,
|
"TerritoryId": 817,
|
||||||
"InteractionType": "WalkTo",
|
"InteractionType": "Gather",
|
||||||
"AetheryteShortcut": "Rak'tika - Fanow",
|
"RequiredQuestAcceptedJob": [
|
||||||
|
"Miner"
|
||||||
|
],
|
||||||
|
"ItemsToGather": [
|
||||||
|
{
|
||||||
|
"ItemId": 29537,
|
||||||
|
"ItemCount": 3
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"Fly": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"DataId": 33020,
|
||||||
|
"Position": {
|
||||||
|
"X": 226.1767,
|
||||||
|
"Y": -20.10281,
|
||||||
|
"Z": 643.5543
|
||||||
|
},
|
||||||
|
"TerritoryId": 817,
|
||||||
|
"InteractionType": "Gather",
|
||||||
|
"RequiredQuestAcceptedJob": [
|
||||||
|
"Botanist"
|
||||||
|
],
|
||||||
|
"ItemsToGather": [
|
||||||
|
{
|
||||||
|
"ItemId": 29563,
|
||||||
|
"ItemCount": 3
|
||||||
|
}
|
||||||
|
],
|
||||||
"Fly": true
|
"Fly": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"DataId": 1032643,
|
"DataId": 1032643,
|
||||||
"Position": {
|
"Position": {
|
||||||
"X": 787.0145,
|
"X": 787.0145,
|
||||||
"Y": -45.82774,
|
"Y": -45.82774,
|
||||||
"Z": -218.555
|
"Z": -218.555
|
||||||
},
|
},
|
||||||
"StopDistance": 7,
|
|
||||||
"TerritoryId": 817,
|
"TerritoryId": 817,
|
||||||
"InteractionType": "CompleteQuest"
|
"InteractionType": "CompleteQuest",
|
||||||
|
"AetheryteShortcut": "Rak'tika - Fanow",
|
||||||
|
"Fly": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -179,10 +179,12 @@ internal static class AethernetShortcut
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else if (clientState.TerritoryType == aetheryteData.TerritoryIds[Task.To])
|
||||||
logger.LogWarning(
|
logger.LogWarning(
|
||||||
"Aethernet shortcut not unlocked (from: {FromAetheryte}, to: {ToAetheryte}), walking manually",
|
"Aethernet shortcut not unlocked (from: {FromAetheryte}, to: {ToAetheryte}), skipping as we are already in the destination territory",
|
||||||
Task.From, Task.To);
|
Task.From, Task.To);
|
||||||
|
else
|
||||||
|
throw new TaskException($"Aethernet shortcut not unlocked (from: {Task.From}, to: {Task.To})");
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
21
Questionable/External/TextAdvanceIpc.cs
vendored
21
Questionable/External/TextAdvanceIpc.cs
vendored
@ -22,13 +22,16 @@ internal sealed class TextAdvanceIpc : IDisposable
|
|||||||
private readonly string _pluginName;
|
private readonly string _pluginName;
|
||||||
private readonly ExternalTerritoryConfig _externalTerritoryConfig = new();
|
private readonly ExternalTerritoryConfig _externalTerritoryConfig = new();
|
||||||
|
|
||||||
public TextAdvanceIpc(IDalamudPluginInterface pluginInterface, IFramework framework, QuestController questController, Configuration configuration)
|
public TextAdvanceIpc(IDalamudPluginInterface pluginInterface, IFramework framework,
|
||||||
|
QuestController questController, Configuration configuration)
|
||||||
{
|
{
|
||||||
_framework = framework;
|
_framework = framework;
|
||||||
_questController = questController;
|
_questController = questController;
|
||||||
_configuration = configuration;
|
_configuration = configuration;
|
||||||
_isInExternalControl = pluginInterface.GetIpcSubscriber<bool>("TextAdvance.IsInExternalControl");
|
_isInExternalControl = pluginInterface.GetIpcSubscriber<bool>("TextAdvance.IsInExternalControl");
|
||||||
_enableExternalControl = pluginInterface.GetIpcSubscriber<string, ExternalTerritoryConfig, bool>("TextAdvance.EnableExternalControl");
|
_enableExternalControl =
|
||||||
|
pluginInterface.GetIpcSubscriber<string, ExternalTerritoryConfig, bool>(
|
||||||
|
"TextAdvance.EnableExternalControl");
|
||||||
_disableExternalControl = pluginInterface.GetIpcSubscriber<string, bool>("TextAdvance.DisableExternalControl");
|
_disableExternalControl = pluginInterface.GetIpcSubscriber<string, bool>("TextAdvance.DisableExternalControl");
|
||||||
_pluginName = pluginInterface.InternalName;
|
_pluginName = pluginInterface.InternalName;
|
||||||
_framework.Update += OnUpdate;
|
_framework.Update += OnUpdate;
|
||||||
@ -37,7 +40,7 @@ internal sealed class TextAdvanceIpc : IDisposable
|
|||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
_framework.Update -= OnUpdate;
|
_framework.Update -= OnUpdate;
|
||||||
if(_isExternalControlActivated)
|
if (_isExternalControlActivated)
|
||||||
{
|
{
|
||||||
_disableExternalControl.InvokeFunc(_pluginName);
|
_disableExternalControl.InvokeFunc(_pluginName);
|
||||||
}
|
}
|
||||||
@ -45,11 +48,13 @@ internal sealed class TextAdvanceIpc : IDisposable
|
|||||||
|
|
||||||
private void OnUpdate(IFramework framework)
|
private void OnUpdate(IFramework framework)
|
||||||
{
|
{
|
||||||
if(_configuration.General.ConfigureTextAdvance && _questController.IsRunning)
|
bool hasActiveQuest = _questController.IsRunning ||
|
||||||
|
_questController.AutomationType != QuestController.EAutomationType.Manual;
|
||||||
|
if (_configuration.General.ConfigureTextAdvance && hasActiveQuest)
|
||||||
{
|
{
|
||||||
if(!_isInExternalControl.InvokeFunc())
|
if (!_isInExternalControl.InvokeFunc())
|
||||||
{
|
{
|
||||||
if(_enableExternalControl.InvokeFunc(_pluginName, _externalTerritoryConfig))
|
if (_enableExternalControl.InvokeFunc(_pluginName, _externalTerritoryConfig))
|
||||||
{
|
{
|
||||||
_isExternalControlActivated = true;
|
_isExternalControlActivated = true;
|
||||||
}
|
}
|
||||||
@ -57,9 +62,9 @@ internal sealed class TextAdvanceIpc : IDisposable
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(_isExternalControlActivated)
|
if (_isExternalControlActivated)
|
||||||
{
|
{
|
||||||
if(_disableExternalControl.InvokeFunc(_pluginName) || !_isInExternalControl.InvokeFunc())
|
if (_disableExternalControl.InvokeFunc(_pluginName) || !_isInExternalControl.InvokeFunc())
|
||||||
{
|
{
|
||||||
_isExternalControlActivated = false;
|
_isExternalControlActivated = false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user