forked from liza/Questionable
Compare commits
No commits in common. "aaad336c64b583d27ff27f02056101fb4cf82375" and "47d9f090a24a43cf4fb3cb60f9bc9f5f4397c4bf" have entirely different histories.
aaad336c64
...
47d9f090a2
@ -62,9 +62,6 @@ internal static class QuestStepExtensions
|
||||
Assignment(nameof(QuestStep.IgnoreDistanceToObject),
|
||||
step.IgnoreDistanceToObject, emptyStep.IgnoreDistanceToObject)
|
||||
.AsSyntaxNodeOrToken(),
|
||||
Assignment(nameof(QuestStep.RestartNavigationIfCancelled),
|
||||
step.RestartNavigationIfCancelled, emptyStep.RestartNavigationIfCancelled)
|
||||
.AsSyntaxNodeOrToken(),
|
||||
Assignment(nameof(QuestStep.Comment), step.Comment, emptyStep.Comment)
|
||||
.AsSyntaxNodeOrToken(),
|
||||
Assignment(nameof(QuestStep.Aetheryte), step.Aetheryte, emptyStep.Aetheryte)
|
||||
|
@ -53,7 +53,6 @@
|
||||
"Y": -0.63573146,
|
||||
"Z": -166.33862
|
||||
},
|
||||
"StopDistance": 5,
|
||||
"TerritoryId": 141,
|
||||
"InteractionType": "Interact"
|
||||
}
|
||||
|
@ -35,7 +35,6 @@
|
||||
},
|
||||
"TerritoryId": 155,
|
||||
"InteractionType": "CompleteQuest",
|
||||
"Mount": true,
|
||||
"DialogueChoices": [
|
||||
{
|
||||
"Type": "YesNo",
|
||||
|
@ -337,6 +337,16 @@
|
||||
"InteractionType": "WalkTo",
|
||||
"Fly": true
|
||||
},
|
||||
{
|
||||
"Position": {
|
||||
"X": 233.0817,
|
||||
"Y": 8,
|
||||
"Z": -21.83023
|
||||
},
|
||||
"TerritoryId": 146,
|
||||
"InteractionType": "WalkTo",
|
||||
"Fly": true
|
||||
},
|
||||
{
|
||||
"DataId": 2000077,
|
||||
"Position": {
|
||||
@ -350,16 +360,18 @@
|
||||
"KillEnemyDataIds": [
|
||||
9489
|
||||
],
|
||||
"$": "0 0 0 0 0 0 -> 16 17 0 0 0 128",
|
||||
"CompletionQuestVariablesFlags": [
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
128
|
||||
],
|
||||
"Fly": true
|
||||
"$": "0 0 0 0 0 0 -> 16 17 0 0 0 128"
|
||||
},
|
||||
{
|
||||
"Position": {
|
||||
"X": 614.4023,
|
||||
"Y": 301.81046,
|
||||
"Z": -101.94888
|
||||
},
|
||||
"TerritoryId": 155,
|
||||
"InteractionType": "WalkTo",
|
||||
"Fly": true,
|
||||
"AetheryteShortcut": "Coerthas Central Highlands - Camp Dragonhead"
|
||||
},
|
||||
{
|
||||
"DataId": 2000078,
|
||||
@ -374,17 +386,7 @@
|
||||
"KillEnemyDataIds": [
|
||||
9490
|
||||
],
|
||||
"Fly": true,
|
||||
"AetheryteShortcut": "Coerthas Central Highlands - Camp Dragonhead",
|
||||
"$": "16 17 0 0 0 128 -> 0 17 0 0 0 0",
|
||||
"CompletionQuestVariablesFlags": [
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
64
|
||||
]
|
||||
"$": "16 17 0 0 0 128 -> 0 17 0 0 0 0"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -191,15 +191,6 @@
|
||||
"AethernetShard": "[Gold Saucer] Cactpot Board",
|
||||
"DelaySecondsAtStart": 3
|
||||
},
|
||||
{
|
||||
"Position": {
|
||||
"X": 111.36922,
|
||||
"Y": 13.000123,
|
||||
"Z": -24.209782
|
||||
},
|
||||
"TerritoryId": 144,
|
||||
"InteractionType": "WalkTo"
|
||||
},
|
||||
{
|
||||
"DataId": 1011079,
|
||||
"Position": {
|
||||
@ -216,15 +207,6 @@
|
||||
{
|
||||
"Sequence": 6,
|
||||
"Steps": [
|
||||
{
|
||||
"Position": {
|
||||
"X": 111.36922,
|
||||
"Y": 13.000123,
|
||||
"Z": -24.209782
|
||||
},
|
||||
"TerritoryId": 144,
|
||||
"InteractionType": "WalkTo"
|
||||
},
|
||||
{
|
||||
"TerritoryId": 144,
|
||||
"InteractionType": "None",
|
||||
|
@ -235,16 +235,6 @@ internal sealed class InteractionUiController : IDisposable
|
||||
_logger.LogInformation("Checking if current quest {Name} is on the list", currentQuest.Quest.Info.Name);
|
||||
if (CheckQuestSelection(addonSelectIconString, currentQuest.Quest, answers))
|
||||
return;
|
||||
|
||||
var sequence = currentQuest.Quest.FindSequence(currentQuest.Sequence);
|
||||
QuestStep? step = sequence?.FindStep(currentQuest.Step);
|
||||
if (step is { InteractionType: EInteractionType.AcceptQuest, PickUpQuestId: not null } &&
|
||||
_questRegistry.TryGetQuest(step.PickUpQuestId, out Quest? pickupQuest))
|
||||
{
|
||||
_logger.LogInformation("Checking if current picked-up {Name} is on the list", pickupQuest.Info.Name);
|
||||
if (CheckQuestSelection(addonSelectIconString, pickupQuest, answers))
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
var nextQuest = _questController.NextQuest;
|
||||
|
@ -68,7 +68,7 @@ internal static class MoveTo
|
||||
public ITask Move(MoveParams moveParams)
|
||||
{
|
||||
return new MoveInternal(moveParams, movementController, gameFunctions,
|
||||
loggerFactory.CreateLogger<MoveInternal>(), clientState, dataManager);
|
||||
loggerFactory.CreateLogger<MoveInternal>(), condition, clientState, dataManager);
|
||||
}
|
||||
|
||||
public ITask Land()
|
||||
@ -163,22 +163,26 @@ internal static class MoveTo
|
||||
private readonly string _cannotExecuteAtThisTime;
|
||||
private readonly MovementController _movementController;
|
||||
private readonly ILogger<MoveInternal> _logger;
|
||||
private readonly ICondition _condition;
|
||||
private readonly IClientState _clientState;
|
||||
|
||||
private readonly Action _startAction;
|
||||
private readonly Vector3 _destination;
|
||||
private readonly MoveParams _moveParams;
|
||||
private readonly bool _isUnderwaterInitially;
|
||||
private bool _canRestart;
|
||||
|
||||
public MoveInternal(MoveParams moveParams,
|
||||
MovementController movementController,
|
||||
GameFunctions gameFunctions,
|
||||
ILogger<MoveInternal> logger,
|
||||
ICondition condition,
|
||||
IClientState clientState,
|
||||
IDataManager dataManager)
|
||||
{
|
||||
_movementController = movementController;
|
||||
_logger = logger;
|
||||
_condition = condition;
|
||||
_clientState = clientState;
|
||||
_cannotExecuteAtThisTime = dataManager.GetString<LogMessage>(579, x => x.Text)!;
|
||||
|
||||
@ -253,7 +257,8 @@ internal static class MoveTo
|
||||
|
||||
public bool OnErrorToast(SeString message)
|
||||
{
|
||||
if (GameFunctions.GameStringEquals(_cannotExecuteAtThisTime, message.TextValue))
|
||||
if (GameFunctions.GameStringEquals(_cannotExecuteAtThisTime, message.TextValue) &&
|
||||
_condition[ConditionFlag.Diving])
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
31
Questionable/External/QuestionableIpc.cs
vendored
31
Questionable/External/QuestionableIpc.cs
vendored
@ -1,31 +0,0 @@
|
||||
using System;
|
||||
using Dalamud.Plugin;
|
||||
using Dalamud.Plugin.Ipc;
|
||||
using Questionable.Controller;
|
||||
|
||||
namespace Questionable.External;
|
||||
|
||||
internal sealed class QuestionableIpc : IDisposable
|
||||
{
|
||||
private const string IpcIsRunning = "Questionable.IsRunning";
|
||||
private const string IpcGetCurrentQuestId = "Questionable.GetCurrentQuestId";
|
||||
|
||||
private readonly ICallGateProvider<bool> _isRunning;
|
||||
private readonly ICallGateProvider<string?> _getCurrentQuestId;
|
||||
|
||||
public QuestionableIpc(QuestController questController, IDalamudPluginInterface pluginInterface)
|
||||
{
|
||||
_isRunning = pluginInterface.GetIpcProvider<bool>(IpcIsRunning);
|
||||
_isRunning.RegisterFunc(() => questController.IsRunning);
|
||||
|
||||
_getCurrentQuestId = pluginInterface.GetIpcProvider<string?>(IpcGetCurrentQuestId);
|
||||
_getCurrentQuestId.RegisterFunc(() => questController.CurrentQuest?.Quest.Id.ToString());
|
||||
}
|
||||
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
_getCurrentQuestId.UnregisterFunc();
|
||||
_isRunning.UnregisterFunc();
|
||||
}
|
||||
}
|
@ -120,7 +120,6 @@ public sealed class QuestionablePlugin : IDalamudPlugin
|
||||
serviceCollection.AddSingleton<LifestreamIpc>();
|
||||
serviceCollection.AddSingleton<YesAlreadyIpc>();
|
||||
serviceCollection.AddSingleton<ArtisanIpc>();
|
||||
serviceCollection.AddSingleton<QuestionableIpc>();
|
||||
}
|
||||
|
||||
private static void AddTaskFactories(ServiceCollection serviceCollection)
|
||||
@ -236,7 +235,6 @@ public sealed class QuestionablePlugin : IDalamudPlugin
|
||||
serviceProvider.GetRequiredService<CreditsController>();
|
||||
serviceProvider.GetRequiredService<HelpUiController>();
|
||||
serviceProvider.GetRequiredService<LeveUiController>();
|
||||
serviceProvider.GetRequiredService<QuestionableIpc>();
|
||||
serviceProvider.GetRequiredService<DalamudInitializer>();
|
||||
}
|
||||
|
||||
|
@ -177,7 +177,7 @@ internal sealed partial class ActiveQuestComponent
|
||||
{
|
||||
using var _ = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudYellow);
|
||||
ImGui.TextUnformatted(
|
||||
$"Next Quest: {Shorten(nextQuest.Quest.Info.Name)} / {nextQuest.Sequence} / {nextQuest.Step}");
|
||||
$"Next Quest: {Shorten(currentQuest.Quest.Info.Name)} / {currentQuest.Sequence} / {currentQuest.Step}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user