Reorganize namespaces; fix steps with 'fly: true' not mounting if close to target
This commit is contained in:
parent
a0f0a058fc
commit
9848431962
@ -5,7 +5,7 @@ using Dalamud.Game.ClientState.Keys;
|
||||
using Dalamud.Plugin.Services;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Questionable.Controller.Steps;
|
||||
using Questionable.Controller.Steps.BaseFactory;
|
||||
using Questionable.Controller.Steps.Shared;
|
||||
using Questionable.External;
|
||||
using Questionable.Model;
|
||||
using Questionable.Model.V1;
|
||||
|
@ -1,6 +1,6 @@
|
||||
using System;
|
||||
|
||||
namespace Questionable.Controller.Steps.BaseTasks;
|
||||
namespace Questionable.Controller.Steps.Common;
|
||||
|
||||
internal abstract class AbstractDelayedTask : ITask
|
||||
{
|
@ -5,7 +5,7 @@ using Dalamud.Plugin.Services;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Questionable.Data;
|
||||
|
||||
namespace Questionable.Controller.Steps.BaseTasks;
|
||||
namespace Questionable.Controller.Steps.Common;
|
||||
|
||||
internal sealed class MountTask(
|
||||
GameFunctions gameFunctions,
|
@ -4,7 +4,7 @@ using Microsoft.Extensions.Logging;
|
||||
using Questionable.Model;
|
||||
using Questionable.Model.V1;
|
||||
|
||||
namespace Questionable.Controller.Steps.BaseTasks;
|
||||
namespace Questionable.Controller.Steps.Common;
|
||||
|
||||
internal static class NextQuest
|
||||
{
|
@ -3,7 +3,7 @@ using Dalamud.Game.ClientState.Conditions;
|
||||
using Dalamud.Plugin.Services;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace Questionable.Controller.Steps.BaseTasks;
|
||||
namespace Questionable.Controller.Steps.Common;
|
||||
|
||||
internal sealed class UnmountTask(ICondition condition, ILogger<UnmountTask> logger, GameFunctions gameFunctions)
|
||||
: ITask
|
@ -1,6 +1,6 @@
|
||||
using System;
|
||||
|
||||
namespace Questionable.Controller.Steps.BaseTasks;
|
||||
namespace Questionable.Controller.Steps.Common;
|
||||
|
||||
internal sealed class WaitConditionTask(Func<bool> predicate, string description) : ITask
|
||||
{
|
@ -5,11 +5,11 @@ using Dalamud.Game.ClientState.Objects.Types;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Questionable.Controller.Steps.BaseTasks;
|
||||
using Questionable.Controller.Steps.Common;
|
||||
using Questionable.Model;
|
||||
using Questionable.Model.V1;
|
||||
|
||||
namespace Questionable.Controller.Steps.InteractionFactory;
|
||||
namespace Questionable.Controller.Steps.Interactions;
|
||||
|
||||
internal static class Action
|
||||
{
|
@ -6,7 +6,7 @@ using Questionable.Data;
|
||||
using Questionable.Model;
|
||||
using Questionable.Model.V1;
|
||||
|
||||
namespace Questionable.Controller.Steps.InteractionFactory;
|
||||
namespace Questionable.Controller.Steps.Interactions;
|
||||
|
||||
internal static class AetherCurrent
|
||||
{
|
@ -4,7 +4,7 @@ using Microsoft.Extensions.Logging;
|
||||
using Questionable.Model;
|
||||
using Questionable.Model.V1;
|
||||
|
||||
namespace Questionable.Controller.Steps.InteractionFactory;
|
||||
namespace Questionable.Controller.Steps.Interactions;
|
||||
|
||||
internal static class AethernetShard
|
||||
{
|
@ -4,7 +4,7 @@ using Microsoft.Extensions.Logging;
|
||||
using Questionable.Model;
|
||||
using Questionable.Model.V1;
|
||||
|
||||
namespace Questionable.Controller.Steps.InteractionFactory;
|
||||
namespace Questionable.Controller.Steps.Interactions;
|
||||
|
||||
internal static class Aetheryte
|
||||
{
|
@ -1,11 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Questionable.Controller.Steps.BaseTasks;
|
||||
using Questionable.Controller.Steps.Common;
|
||||
using Questionable.Model;
|
||||
using Questionable.Model.V1;
|
||||
|
||||
namespace Questionable.Controller.Steps.InteractionFactory;
|
||||
namespace Questionable.Controller.Steps.Interactions;
|
||||
|
||||
internal static class Combat
|
||||
{
|
@ -5,7 +5,7 @@ using Microsoft.Extensions.DependencyInjection;
|
||||
using Questionable.Model;
|
||||
using Questionable.Model.V1;
|
||||
|
||||
namespace Questionable.Controller.Steps.InteractionFactory;
|
||||
namespace Questionable.Controller.Steps.Interactions;
|
||||
|
||||
internal static class Duty
|
||||
{
|
@ -1,11 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Questionable.Controller.Steps.BaseTasks;
|
||||
using Questionable.Controller.Steps.Common;
|
||||
using Questionable.Model;
|
||||
using Questionable.Model.V1;
|
||||
|
||||
namespace Questionable.Controller.Steps.InteractionFactory;
|
||||
namespace Questionable.Controller.Steps.Interactions;
|
||||
|
||||
internal static class Emote
|
||||
{
|
@ -6,11 +6,11 @@ using FFXIVClientStructs.FFXIV.Client.Game;
|
||||
using Lumina.Excel.GeneratedSheets;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Questionable.Controller.Steps.BaseTasks;
|
||||
using Questionable.Controller.Steps.Common;
|
||||
using Questionable.Model.V1;
|
||||
using Quest = Questionable.Model.Quest;
|
||||
|
||||
namespace Questionable.Controller.Steps.InteractionFactory;
|
||||
namespace Questionable.Controller.Steps.Interactions;
|
||||
|
||||
internal static class EquipItem
|
||||
{
|
@ -6,11 +6,11 @@ using Dalamud.Game.ClientState.Objects.Types;
|
||||
using Dalamud.Plugin.Services;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Questionable.Controller.Steps.BaseFactory;
|
||||
using Questionable.Controller.Steps.Shared;
|
||||
using Questionable.Model;
|
||||
using Questionable.Model.V1;
|
||||
|
||||
namespace Questionable.Controller.Steps.InteractionFactory;
|
||||
namespace Questionable.Controller.Steps.Interactions;
|
||||
|
||||
internal static class Interact
|
||||
{
|
@ -2,11 +2,11 @@
|
||||
using Dalamud.Plugin.Services;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Questionable.Controller.Steps.BaseTasks;
|
||||
using Questionable.Controller.Steps.Common;
|
||||
using Questionable.Model;
|
||||
using Questionable.Model.V1;
|
||||
|
||||
namespace Questionable.Controller.Steps.InteractionFactory;
|
||||
namespace Questionable.Controller.Steps.Interactions;
|
||||
|
||||
internal static class Jump
|
||||
{
|
@ -1,11 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Questionable.Controller.Steps.BaseTasks;
|
||||
using Questionable.Controller.Steps.Common;
|
||||
using Questionable.Model;
|
||||
using Questionable.Model.V1;
|
||||
|
||||
namespace Questionable.Controller.Steps.InteractionFactory;
|
||||
namespace Questionable.Controller.Steps.Interactions;
|
||||
|
||||
internal static class Say
|
||||
{
|
@ -6,7 +6,7 @@ using Questionable.External;
|
||||
using Questionable.Model;
|
||||
using Questionable.Model.V1;
|
||||
|
||||
namespace Questionable.Controller.Steps.InteractionFactory;
|
||||
namespace Questionable.Controller.Steps.Interactions;
|
||||
|
||||
internal static class SinglePlayerDuty
|
||||
{
|
@ -3,11 +3,11 @@ using System.Collections.Generic;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Questionable.Controller.Steps.BaseTasks;
|
||||
using Questionable.Controller.Steps.Common;
|
||||
using Questionable.Model;
|
||||
using Questionable.Model.V1;
|
||||
|
||||
namespace Questionable.Controller.Steps.InteractionFactory;
|
||||
namespace Questionable.Controller.Steps.Interactions;
|
||||
|
||||
internal static class UseItem
|
||||
{
|
@ -11,7 +11,7 @@ using Questionable.Model;
|
||||
using Questionable.Model.V1;
|
||||
using Questionable.Model.V1.Converter;
|
||||
|
||||
namespace Questionable.Controller.Steps.BaseFactory;
|
||||
namespace Questionable.Controller.Steps.Shared;
|
||||
|
||||
internal static class AethernetShortcut
|
||||
{
|
@ -4,12 +4,12 @@ using System.Numerics;
|
||||
using Dalamud.Plugin.Services;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Questionable.Controller.Steps.BaseTasks;
|
||||
using Questionable.Controller.Steps.Common;
|
||||
using Questionable.Data;
|
||||
using Questionable.Model;
|
||||
using Questionable.Model.V1;
|
||||
|
||||
namespace Questionable.Controller.Steps.BaseFactory;
|
||||
namespace Questionable.Controller.Steps.Shared;
|
||||
|
||||
internal static class AetheryteShortcut
|
||||
{
|
@ -6,12 +6,12 @@ using Dalamud.Game.ClientState.Objects.Types;
|
||||
using Dalamud.Plugin.Services;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Questionable.Controller.Steps.BaseTasks;
|
||||
using Questionable.Controller.Steps.Common;
|
||||
using Questionable.Data;
|
||||
using Questionable.Model;
|
||||
using Questionable.Model.V1;
|
||||
|
||||
namespace Questionable.Controller.Steps.BaseFactory;
|
||||
namespace Questionable.Controller.Steps.Shared;
|
||||
|
||||
internal static class Move
|
||||
{
|
||||
@ -82,8 +82,15 @@ internal static class Move
|
||||
if (!Step.DisableNavmesh)
|
||||
{
|
||||
if (Step.Mount == null)
|
||||
{
|
||||
MountTask.EMountIf mountIf =
|
||||
actualDistance > distance && Step.Fly == true &&
|
||||
gameFunctions.IsFlyingUnlocked(Step.TerritoryId)
|
||||
? MountTask.EMountIf.Always
|
||||
: MountTask.EMountIf.AwayFromPosition;
|
||||
yield return serviceProvider.GetRequiredService<MountTask>()
|
||||
.With(Step.TerritoryId, MountTask.EMountIf.AwayFromPosition, Destination);
|
||||
.With(Step.TerritoryId, mountIf, Destination);
|
||||
}
|
||||
|
||||
if (actualDistance > distance)
|
||||
{
|
@ -11,7 +11,7 @@ using Microsoft.Extensions.Logging;
|
||||
using Questionable.Model;
|
||||
using Questionable.Model.V1;
|
||||
|
||||
namespace Questionable.Controller.Steps.BaseFactory;
|
||||
namespace Questionable.Controller.Steps.Shared;
|
||||
|
||||
internal static class SkipCondition
|
||||
{
|
@ -4,7 +4,7 @@ using Microsoft.Extensions.Logging;
|
||||
using Questionable.Model;
|
||||
using Questionable.Model.V1;
|
||||
|
||||
namespace Questionable.Controller.Steps.BaseFactory;
|
||||
namespace Questionable.Controller.Steps.Shared;
|
||||
|
||||
internal static class StepDisabled
|
||||
{
|
@ -8,12 +8,12 @@ using Dalamud.Plugin.Services;
|
||||
using FFXIVClientStructs.FFXIV.Application.Network.WorkDefinitions;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Questionable.Controller.Steps.BaseTasks;
|
||||
using Questionable.Controller.Steps.Common;
|
||||
using Questionable.Data;
|
||||
using Questionable.Model;
|
||||
using Questionable.Model.V1;
|
||||
|
||||
namespace Questionable.Controller.Steps.BaseFactory;
|
||||
namespace Questionable.Controller.Steps.Shared;
|
||||
|
||||
internal static class WaitAtEnd
|
||||
{
|
@ -1,10 +1,10 @@
|
||||
using System;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Questionable.Controller.Steps.BaseTasks;
|
||||
using Questionable.Controller.Steps.Common;
|
||||
using Questionable.Model;
|
||||
using Questionable.Model.V1;
|
||||
|
||||
namespace Questionable.Controller.Steps.BaseFactory;
|
||||
namespace Questionable.Controller.Steps.Shared;
|
||||
|
||||
internal static class WaitAtStart
|
||||
{
|
@ -2,7 +2,7 @@
|
||||
"Name": "Questionable",
|
||||
"Author": "Liza Carvelli",
|
||||
"Punchline": "A tiny quest helper plugin.",
|
||||
"Description": "A tiny quest helper plugin.",
|
||||
"Description": "A tiny little quest helper plugin, which does quests for you automatically where possible. Uses navmesh to automatically walk to all quest waypoints, and tries to automatically complete all steps along the way (excluding dungeons, single player duties and combat).\n\nNot all quests are supported, check the discord or git repository for an up-to-date list.\n\nRequired Plugins: vnavmesh, TextAdvance, Lifestream",
|
||||
"Tags": [
|
||||
"quests",
|
||||
"msq"
|
||||
|
@ -11,13 +11,13 @@ using Microsoft.Extensions.Logging;
|
||||
using Questionable.Controller;
|
||||
using Questionable.Controller.NavigationOverrides;
|
||||
using Questionable.Controller.Steps;
|
||||
using Questionable.Controller.Steps.BaseFactory;
|
||||
using Questionable.Controller.Steps.BaseTasks;
|
||||
using Questionable.Controller.Steps.InteractionFactory;
|
||||
using Questionable.Controller.Steps.Shared;
|
||||
using Questionable.Controller.Steps.Common;
|
||||
using Questionable.Controller.Steps.Interactions;
|
||||
using Questionable.Data;
|
||||
using Questionable.External;
|
||||
using Questionable.Windows;
|
||||
using Action = Questionable.Controller.Steps.InteractionFactory.Action;
|
||||
using Action = Questionable.Controller.Steps.Interactions.Action;
|
||||
|
||||
namespace Questionable;
|
||||
|
||||
|
@ -41,7 +41,11 @@ internal sealed class DebugOverlay : Window
|
||||
|
||||
public ushort? HighlightedQuest { get; set; }
|
||||
|
||||
public override bool DrawConditions() => _configuration.Advanced.DebugOverlay;
|
||||
public override bool DrawConditions()
|
||||
{
|
||||
return _configuration.Advanced.DebugOverlay && _clientState is
|
||||
{ IsLoggedIn: true, LocalPlayer: not null, IsPvPExcludingDen: false };
|
||||
}
|
||||
|
||||
public override void PreDraw()
|
||||
{
|
||||
|
@ -19,7 +19,7 @@ using ImGuiNET;
|
||||
using LLib.ImGui;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Questionable.Controller;
|
||||
using Questionable.Controller.Steps.BaseFactory;
|
||||
using Questionable.Controller.Steps.Shared;
|
||||
using Questionable.Data;
|
||||
using Questionable.External;
|
||||
using Questionable.Model;
|
||||
@ -96,7 +96,7 @@ internal sealed class QuestWindow : LWindow, IPersistableWindowConfig
|
||||
|
||||
public override bool DrawConditions()
|
||||
{
|
||||
if (!_clientState.IsLoggedIn || _clientState.LocalPlayer == null)
|
||||
if (!_clientState.IsLoggedIn || _clientState.LocalPlayer == null || _clientState.IsPvPExcludingDen)
|
||||
return false;
|
||||
|
||||
if (_configuration.General.HideInAllInstances && _territoryData.IsDutyInstance(_clientState.TerritoryType))
|
||||
|
Loading…
Reference in New Issue
Block a user