Compare commits
No commits in common. "master" and "master" have entirely different histories.
@ -179,12 +179,10 @@ internal static class AethernetShortcut
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (clientState.TerritoryType == aetheryteData.TerritoryIds[Task.To])
|
|
||||||
logger.LogWarning(
|
|
||||||
"Aethernet shortcut not unlocked (from: {FromAetheryte}, to: {ToAetheryte}), skipping as we are already in the destination territory",
|
|
||||||
Task.From, Task.To);
|
|
||||||
else
|
else
|
||||||
throw new TaskException($"Aethernet shortcut not unlocked (from: {Task.From}, to: {Task.To})");
|
logger.LogWarning(
|
||||||
|
"Aethernet shortcut not unlocked (from: {FromAetheryte}, to: {ToAetheryte}), walking manually",
|
||||||
|
Task.From, Task.To);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
21
Questionable/External/TextAdvanceIpc.cs
vendored
21
Questionable/External/TextAdvanceIpc.cs
vendored
@ -22,16 +22,13 @@ 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,
|
public TextAdvanceIpc(IDalamudPluginInterface pluginInterface, IFramework framework, QuestController questController, Configuration configuration)
|
||||||
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 =
|
_enableExternalControl = pluginInterface.GetIpcSubscriber<string, ExternalTerritoryConfig, bool>("TextAdvance.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;
|
||||||
@ -40,7 +37,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);
|
||||||
}
|
}
|
||||||
@ -48,13 +45,11 @@ internal sealed class TextAdvanceIpc : IDisposable
|
|||||||
|
|
||||||
private void OnUpdate(IFramework framework)
|
private void OnUpdate(IFramework framework)
|
||||||
{
|
{
|
||||||
bool hasActiveQuest = _questController.IsRunning ||
|
if(_configuration.General.ConfigureTextAdvance && _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;
|
||||||
}
|
}
|
||||||
@ -62,9 +57,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