muffin v7.4.19

This commit is contained in:
alydev 2026-03-26 14:57:15 +10:00
parent f82b9ce2a2
commit afafd5e377
9 changed files with 896 additions and 796 deletions

View file

@ -1054,7 +1054,7 @@ internal sealed class InteractionUiController : IDisposable
private unsafe void EasterMowingResultPostSetup(AddonEvent type, AddonArgs args) private unsafe void EasterMowingResultPostSetup(AddonEvent type, AddonArgs args)
{ {
if (_seasonalDutyController.IsRunning) if (_seasonalDutyController.IsRunning || ShouldHandleUiInteractions)
{ {
_logger.LogInformation("Dismissing EasterMowingResult"); _logger.LogInformation("Dismissing EasterMowingResult");
AtkUnitBase* address = (AtkUnitBase*)args.Addon.Address; AtkUnitBase* address = (AtkUnitBase*)args.Addon.Address;

View file

@ -101,6 +101,8 @@ internal sealed class QuestController : MiniTaskController<QuestController>
private readonly FateController _fateController; private readonly FateController _fateController;
private readonly SeasonalDutyController _seasonalDutyController;
private readonly QuestRegistry _questRegistry; private readonly QuestRegistry _questRegistry;
private readonly JournalData _journalData; private readonly JournalData _journalData;
@ -246,7 +248,7 @@ internal sealed class QuestController : MiniTaskController<QuestController>
public event AutomationTypeChangedEventHandler? AutomationTypeChanged; public event AutomationTypeChangedEventHandler? AutomationTypeChanged;
public QuestController(IClientState clientState, IObjectTable objectTable, GameFunctions gameFunctions, QuestFunctions questFunctions, MovementController movementController, CombatController combatController, GatheringController gatheringController, FateController fateController, ILogger<QuestController> logger, QuestRegistry questRegistry, JournalData journalData, IKeyState keyState, IChatGui chatGui, ICondition condition, IToastGui toastGui, Configuration configuration, TaskCreator taskCreator, IServiceProvider serviceProvider, InterruptHandler interruptHandler, IDataManager dataManager, SinglePlayerDutyConfigComponent singlePlayerDutyConfigComponent, AutoDutyIpc autoDutyIpc, IDalamudPluginInterface pluginInterface) public QuestController(IClientState clientState, IObjectTable objectTable, GameFunctions gameFunctions, QuestFunctions questFunctions, MovementController movementController, CombatController combatController, GatheringController gatheringController, FateController fateController, SeasonalDutyController seasonalDutyController, ILogger<QuestController> logger, QuestRegistry questRegistry, JournalData journalData, IKeyState keyState, IChatGui chatGui, ICondition condition, IToastGui toastGui, Configuration configuration, TaskCreator taskCreator, IServiceProvider serviceProvider, InterruptHandler interruptHandler, IDataManager dataManager, SinglePlayerDutyConfigComponent singlePlayerDutyConfigComponent, AutoDutyIpc autoDutyIpc, IDalamudPluginInterface pluginInterface)
: base(chatGui, condition, serviceProvider, interruptHandler, dataManager, logger) : base(chatGui, condition, serviceProvider, interruptHandler, dataManager, logger)
{ {
_clientState = clientState; _clientState = clientState;
@ -257,6 +259,7 @@ internal sealed class QuestController : MiniTaskController<QuestController>
_combatController = combatController; _combatController = combatController;
_gatheringController = gatheringController; _gatheringController = gatheringController;
_fateController = fateController; _fateController = fateController;
_seasonalDutyController = seasonalDutyController;
_questRegistry = questRegistry; _questRegistry = questRegistry;
_journalData = journalData; _journalData = journalData;
_keyState = keyState; _keyState = keyState;
@ -922,6 +925,7 @@ internal sealed class QuestController : MiniTaskController<QuestController>
_combatController.Stop("ClearTasksInternal"); _combatController.Stop("ClearTasksInternal");
_gatheringController.Stop("ClearTasksInternal"); _gatheringController.Stop("ClearTasksInternal");
_fateController.Stop("ClearTasksInternal"); _fateController.Stop("ClearTasksInternal");
_seasonalDutyController.Stop("ClearTasksInternal");
} }
public override void Stop(string label) public override void Stop(string label)
@ -949,6 +953,7 @@ internal sealed class QuestController : MiniTaskController<QuestController>
_combatController.Stop(label); _combatController.Stop(label);
_gatheringController.Stop(label); _gatheringController.Stop(label);
_fateController.Stop(label); _fateController.Stop(label);
_seasonalDutyController.Stop(label);
} }
private void CheckNextTasks(string label) private void CheckNextTasks(string label)
@ -1248,6 +1253,7 @@ internal sealed class QuestController : MiniTaskController<QuestController>
_combatController.Stop("Execute next step"); _combatController.Stop("Execute next step");
_gatheringController.Stop("Execute next step"); _gatheringController.Stop("Execute next step");
_fateController.Stop("Execute next step"); _fateController.Stop("Execute next step");
_seasonalDutyController.Stop("Execute next step");
try try
{ {
foreach (ITask item5 in _taskCreator.CreateTasks(CurrentQuest.Quest, CurrentQuest.Sequence, questSequence, step)) foreach (ITask item5 in _taskCreator.CreateTasks(CurrentQuest.Quest, CurrentQuest.Sequence, questSequence, step))

View file

@ -9,6 +9,7 @@ using Questionable.Controller.Steps.Common;
using Questionable.Controller.Steps.Interactions; using Questionable.Controller.Steps.Interactions;
using Questionable.Controller.Steps.Movement; using Questionable.Controller.Steps.Movement;
using Questionable.Controller.Steps.Shared; using Questionable.Controller.Steps.Shared;
using Questionable.Functions;
using Questionable.Model.Questing; using Questionable.Model.Questing;
namespace Questionable.Controller; namespace Questionable.Controller;
@ -17,6 +18,8 @@ internal sealed class SeasonalDutyController : MiniTaskController<SeasonalDutyCo
{ {
private readonly MovementController _movementController; private readonly MovementController _movementController;
private readonly GameFunctions _gameFunctions;
private readonly IClientState _clientState; private readonly IClientState _clientState;
private readonly ILogger<SeasonalDutyController> _logger; private readonly ILogger<SeasonalDutyController> _logger;
@ -49,10 +52,11 @@ internal sealed class SeasonalDutyController : MiniTaskController<SeasonalDutyCo
} }
} }
public SeasonalDutyController(IChatGui chatGui, ICondition condition, IServiceProvider serviceProvider, InterruptHandler interruptHandler, IDataManager dataManager, ILogger<SeasonalDutyController> logger, MovementController movementController, IClientState clientState) public SeasonalDutyController(IChatGui chatGui, ICondition condition, IServiceProvider serviceProvider, InterruptHandler interruptHandler, IDataManager dataManager, ILogger<SeasonalDutyController> logger, MovementController movementController, GameFunctions gameFunctions, IClientState clientState)
: base(chatGui, condition, serviceProvider, interruptHandler, dataManager, logger) : base(chatGui, condition, serviceProvider, interruptHandler, dataManager, logger)
{ {
_movementController = movementController; _movementController = movementController;
_gameFunctions = gameFunctions;
_clientState = clientState; _clientState = clientState;
_logger = logger; _logger = logger;
} }
@ -89,26 +93,41 @@ internal sealed class SeasonalDutyController : MiniTaskController<SeasonalDutyCo
private void EnqueueDutyCycle() private void EnqueueDutyCycle()
{ {
if (_currentDuty != null) if (_currentDuty == null)
{ {
SeasonalDutyDefinition currentDuty = _currentDuty; return;
_logger.LogInformation("Enqueuing seasonal duty cycle for {DutyName}", currentDuty.Name);
if (_clientState.TerritoryType != currentDuty.TerritoryId && _clientState.TerritoryType != currentDuty.DutyTerritoryId)
{
_taskQueue.Enqueue(new AetheryteShortcut.Task(null, null, currentDuty.Aetheryte, currentDuty.TerritoryId));
}
if (currentDuty.AethernetShortcut != null)
{
_taskQueue.Enqueue(new AethernetShortcut.Task(currentDuty.AethernetShortcut.From, currentDuty.AethernetShortcut.To));
}
_taskQueue.Enqueue(new MoveTask(currentDuty.TerritoryId, currentDuty.NpcPosition, null, 3f));
_taskQueue.Enqueue(new Mount.UnmountTask());
_taskQueue.Enqueue(new Interact.Task(currentDuty.NpcDataId, null, EInteractionType.Interact, SkipMarkerCheck: true));
_taskQueue.Enqueue(new WaitCondition.Task(() => _clientState.TerritoryType == _currentDuty.DutyTerritoryId, $"Wait(territory: {currentDuty.DutyTerritoryId})"));
_taskQueue.Enqueue(new ClearObjectsWithAction.ClearTask(currentDuty.DataIds, currentDuty.Action, currentDuty.DutyTerritoryId, currentDuty.StopDistance, currentDuty.WaypointPositions));
_taskQueue.Enqueue(new WaitCondition.Task(() => _clientState.TerritoryType != _currentDuty.DutyTerritoryId, "Wait(duty end)"));
_taskQueue.Enqueue(new WaitAtEnd.WaitDelay(TimeSpan.FromSeconds(3L)));
} }
SeasonalDutyDefinition duty = _currentDuty;
_logger.LogInformation("Enqueuing seasonal duty cycle for {DutyName}", duty.Name);
if (_clientState.TerritoryType != duty.DutyTerritoryId)
{
if (_clientState.TerritoryType != duty.TerritoryId)
{
_taskQueue.Enqueue(new AetheryteShortcut.Task(null, null, duty.Aetheryte, duty.TerritoryId));
}
if (duty.AethernetShortcut != null)
{
_taskQueue.Enqueue(new AethernetShortcut.Task(duty.AethernetShortcut.From, duty.AethernetShortcut.To));
}
_taskQueue.Enqueue(new MoveTask(duty.TerritoryId, duty.NpcPosition, null, 3f));
_taskQueue.Enqueue(new Mount.UnmountTask());
bool interacted = false;
_taskQueue.Enqueue(new WaitCondition.Task(delegate
{
if (_clientState.TerritoryType == _currentDuty.DutyTerritoryId)
{
return true;
}
if (!interacted)
{
interacted = _gameFunctions.InteractWith(duty.NpcDataId);
}
return false;
}, $"InteractAndWait(territory: {duty.DutyTerritoryId})"));
}
_taskQueue.Enqueue(new ClearObjectsWithAction.ClearTask(duty.DataIds, duty.Action, duty.DutyTerritoryId, duty.StopDistance, duty.WaypointPositions));
_taskQueue.Enqueue(new WaitCondition.Task(() => _clientState.TerritoryType != _currentDuty.DutyTerritoryId, "Wait(duty end)"));
_taskQueue.Enqueue(new WaitAtEnd.WaitDelay(TimeSpan.FromSeconds(3L)));
} }
public override void Stop(string label) public override void Stop(string label)

File diff suppressed because it is too large Load diff

View file

@ -28,6 +28,8 @@ internal sealed class AutomatonIpc : IDisposable
private readonly FateController _fateController; private readonly FateController _fateController;
private readonly SeasonalDutyController _seasonalDutyController;
private readonly TerritoryData _territoryData; private readonly TerritoryData _territoryData;
private readonly IClientState _clientState; private readonly IClientState _clientState;
@ -44,11 +46,12 @@ internal sealed class AutomatonIpc : IDisposable
private bool _wasFateRunning; private bool _wasFateRunning;
public AutomatonIpc(Configuration configuration, IDalamudPluginInterface pluginInterface, QuestController questController, FateController fateController, TerritoryData territoryData, IClientState clientState, IFramework framework, ILogger<AutomatonIpc> logger) public AutomatonIpc(Configuration configuration, IDalamudPluginInterface pluginInterface, QuestController questController, FateController fateController, SeasonalDutyController seasonalDutyController, TerritoryData territoryData, IClientState clientState, IFramework framework, ILogger<AutomatonIpc> logger)
{ {
_configuration = configuration; _configuration = configuration;
_questController = questController; _questController = questController;
_fateController = fateController; _fateController = fateController;
_seasonalDutyController = seasonalDutyController;
_territoryData = territoryData; _territoryData = territoryData;
_clientState = clientState; _clientState = clientState;
_framework = framework; _framework = framework;
@ -65,7 +68,7 @@ internal sealed class AutomatonIpc : IDisposable
{ {
Task.Run((Action)DisableConflictingTweaks); Task.Run((Action)DisableConflictingTweaks);
} }
else if (!_fateController.IsRunning) else if (!_fateController.IsRunning && !_seasonalDutyController.IsRunning)
{ {
Task.Run((Action)RestoreConflictingTweaks); Task.Run((Action)RestoreConflictingTweaks);
} }
@ -73,11 +76,11 @@ internal sealed class AutomatonIpc : IDisposable
private void OnFrameworkUpdate(IFramework framework) private void OnFrameworkUpdate(IFramework framework)
{ {
bool isRunning = _fateController.IsRunning; bool flag = _fateController.IsRunning || _seasonalDutyController.IsRunning;
if (isRunning != _wasFateRunning) if (flag != _wasFateRunning)
{ {
_wasFateRunning = isRunning; _wasFateRunning = flag;
if (isRunning && !_territoryData.IsDutyInstance(_clientState.TerritoryType)) if (flag && !_territoryData.IsDutyInstance(_clientState.TerritoryType))
{ {
Task.Run((Action)DisableConflictingTweaks); Task.Run((Action)DisableConflictingTweaks);
} }

View file

@ -29,6 +29,8 @@ internal sealed class PandorasBoxIpc : IDisposable
private readonly FateController _fateController; private readonly FateController _fateController;
private readonly SeasonalDutyController _seasonalDutyController;
private readonly TerritoryData _territoryData; private readonly TerritoryData _territoryData;
private readonly IClientState _clientState; private readonly IClientState _clientState;
@ -45,11 +47,12 @@ internal sealed class PandorasBoxIpc : IDisposable
private bool _wasFateRunning; private bool _wasFateRunning;
public PandorasBoxIpc(Configuration configuration, IDalamudPluginInterface pluginInterface, QuestController questController, FateController fateController, TerritoryData territoryData, IClientState clientState, IFramework framework, ILogger<PandorasBoxIpc> logger) public PandorasBoxIpc(Configuration configuration, IDalamudPluginInterface pluginInterface, QuestController questController, FateController fateController, SeasonalDutyController seasonalDutyController, TerritoryData territoryData, IClientState clientState, IFramework framework, ILogger<PandorasBoxIpc> logger)
{ {
_configuration = configuration; _configuration = configuration;
_questController = questController; _questController = questController;
_fateController = fateController; _fateController = fateController;
_seasonalDutyController = seasonalDutyController;
_territoryData = territoryData; _territoryData = territoryData;
_clientState = clientState; _clientState = clientState;
_framework = framework; _framework = framework;
@ -66,7 +69,7 @@ internal sealed class PandorasBoxIpc : IDisposable
{ {
Task.Run((Action)DisableConflictingFeatures); Task.Run((Action)DisableConflictingFeatures);
} }
else if (!_fateController.IsRunning) else if (!_fateController.IsRunning && !_seasonalDutyController.IsRunning)
{ {
Task.Run((Action)RestoreConflictingFeatures); Task.Run((Action)RestoreConflictingFeatures);
} }
@ -74,11 +77,11 @@ internal sealed class PandorasBoxIpc : IDisposable
private void OnFrameworkUpdate(IFramework framework) private void OnFrameworkUpdate(IFramework framework)
{ {
bool isRunning = _fateController.IsRunning; bool flag = _fateController.IsRunning || _seasonalDutyController.IsRunning;
if (isRunning != _wasFateRunning) if (flag != _wasFateRunning)
{ {
_wasFateRunning = isRunning; _wasFateRunning = flag;
if (isRunning && !_territoryData.IsDutyInstance(_clientState.TerritoryType)) if (flag && !_territoryData.IsDutyInstance(_clientState.TerritoryType))
{ {
Task.Run((Action)DisableConflictingFeatures); Task.Run((Action)DisableConflictingFeatures);
} }

View file

@ -40,6 +40,8 @@ internal sealed class TextAdvanceIpc : IDisposable
private readonly FateController _fateController; private readonly FateController _fateController;
private readonly SeasonalDutyController _seasonalDutyController;
private readonly Configuration _configuration; private readonly Configuration _configuration;
private readonly ICondition _condition; private readonly ICondition _condition;
@ -54,11 +56,12 @@ internal sealed class TextAdvanceIpc : IDisposable
private readonly string _pluginName; private readonly string _pluginName;
public TextAdvanceIpc(IDalamudPluginInterface pluginInterface, IFramework framework, QuestController questController, FateController fateController, Configuration configuration, ICondition condition) public TextAdvanceIpc(IDalamudPluginInterface pluginInterface, IFramework framework, QuestController questController, FateController fateController, SeasonalDutyController seasonalDutyController, Configuration configuration, ICondition condition)
{ {
_framework = framework; _framework = framework;
_questController = questController; _questController = questController;
_fateController = fateController; _fateController = fateController;
_seasonalDutyController = seasonalDutyController;
_configuration = configuration; _configuration = configuration;
_condition = condition; _condition = condition;
_isInExternalControl = pluginInterface.GetIpcSubscriber<bool>("TextAdvance.IsInExternalControl"); _isInExternalControl = pluginInterface.GetIpcSubscriber<bool>("TextAdvance.IsInExternalControl");
@ -79,7 +82,7 @@ internal sealed class TextAdvanceIpc : IDisposable
private void OnUpdate(IFramework framework) private void OnUpdate(IFramework framework)
{ {
bool flag = _questController.IsRunning || _questController.AutomationType != QuestController.EAutomationType.Manual || _fateController.IsRunning; bool flag = _questController.IsRunning || _questController.AutomationType != QuestController.EAutomationType.Manual || _fateController.IsRunning || _seasonalDutyController.IsRunning;
if (!_configuration.General.ConfigureTextAdvance || !flag) if (!_configuration.General.ConfigureTextAdvance || !flag)
{ {
if (_isExternalControlActivated && (_disableExternalControl.InvokeFunc(_pluginName) || !_isInExternalControl.InvokeFunc())) if (_isExternalControlActivated && (_disableExternalControl.InvokeFunc(_pluginName) || !_isInExternalControl.InvokeFunc()))

View file

@ -34,6 +34,8 @@ internal sealed class ActiveQuestComponent
private readonly FateController _fateController; private readonly FateController _fateController;
private readonly SeasonalDutyController _seasonalDutyController;
private readonly QuestFunctions _questFunctions; private readonly QuestFunctions _questFunctions;
private readonly ICommandManager _commandManager; private readonly ICommandManager _commandManager;
@ -65,13 +67,14 @@ internal sealed class ActiveQuestComponent
return _003CRegexGenerator_g_003EFBB8301322196CF81C64F1652C2FA6E1D6BF3907141F781E9D97ABED51BF056C4__MultipleWhitespaceRegex_0.Instance; return _003CRegexGenerator_g_003EFBB8301322196CF81C64F1652C2FA6E1D6BF3907141F781E9D97ABED51BF056C4__MultipleWhitespaceRegex_0.Instance;
} }
public ActiveQuestComponent(QuestController questController, MovementController movementController, CombatController combatController, GatheringController gatheringController, FateController fateController, QuestFunctions questFunctions, ICommandManager commandManager, Configuration configuration, QuestRegistry questRegistry, PriorityWindow priorityWindow, UiUtils uiUtils, IObjectTable objectTable, IClientState clientState, IChatGui chatGui, AutoDutyIpc autoDutyIpc, ILogger<ActiveQuestComponent> logger) public ActiveQuestComponent(QuestController questController, MovementController movementController, CombatController combatController, GatheringController gatheringController, FateController fateController, SeasonalDutyController seasonalDutyController, QuestFunctions questFunctions, ICommandManager commandManager, Configuration configuration, QuestRegistry questRegistry, PriorityWindow priorityWindow, UiUtils uiUtils, IObjectTable objectTable, IClientState clientState, IChatGui chatGui, AutoDutyIpc autoDutyIpc, ILogger<ActiveQuestComponent> logger)
{ {
_questController = questController; _questController = questController;
_movementController = movementController; _movementController = movementController;
_combatController = combatController; _combatController = combatController;
_gatheringController = gatheringController; _gatheringController = gatheringController;
_fateController = fateController; _fateController = fateController;
_seasonalDutyController = seasonalDutyController;
_questFunctions = questFunctions; _questFunctions = questFunctions;
_commandManager = commandManager; _commandManager = commandManager;
_configuration = configuration; _configuration = configuration;
@ -92,6 +95,11 @@ internal sealed class ActiveQuestComponent
DrawFateActive(isMinimized); DrawFateActive(isMinimized);
return; return;
} }
if (_seasonalDutyController.IsRunning)
{
DrawDutyActive(isMinimized);
return;
}
(QuestController.QuestProgress, QuestController.ECurrentQuestType)? currentQuestDetails = _questController.CurrentQuestDetails; (QuestController.QuestProgress, QuestController.ECurrentQuestType)? currentQuestDetails = _questController.CurrentQuestDetails;
QuestController.QuestProgress questProgress = currentQuestDetails?.Item1; QuestController.QuestProgress questProgress = currentQuestDetails?.Item1;
QuestController.ECurrentQuestType? currentQuestType = currentQuestDetails?.Item2; QuestController.ECurrentQuestType? currentQuestType = currentQuestDetails?.Item2;
@ -136,12 +144,12 @@ internal sealed class ActiveQuestComponent
if (interactionType == EInteractionType.WaitForManualProgress || interactionType == EInteractionType.Snipe || interactionType == EInteractionType.Instruction) if (interactionType == EInteractionType.WaitForManualProgress || interactionType == EInteractionType.Snipe || interactionType == EInteractionType.Instruction)
{ {
flag = true; flag = true;
goto IL_0169; goto IL_017e;
} }
} }
flag = false; flag = false;
goto IL_0169; goto IL_017e;
IL_0169: IL_017e:
if (flag) if (flag)
{ {
color.Push(ImGuiCol.Text, ImGuiColors.DalamudOrange); color.Push(ImGuiCol.Text, ImGuiColors.DalamudOrange);
@ -183,7 +191,7 @@ internal sealed class ActiveQuestComponent
text2.AppendFormatted((item2 == 1) ? string.Empty : "s"); text2.AppendFormatted((item2 == 1) ? string.Empty : "s");
text2.AppendLiteral(" - Leveling mode will start automatically"); text2.AppendLiteral(" - Leveling mode will start automatically");
ImGui.TextColored(in col, text2); ImGui.TextColored(in col, text2);
using (ImRaii.Disabled(_questController.IsRunning || _fateController.IsRunning || !_autoDutyIpc.IsStopped())) using (ImRaii.Disabled(_questController.IsRunning || _fateController.IsRunning || _seasonalDutyController.IsRunning || !_autoDutyIpc.IsStopped()))
{ {
if (ImGuiComponents.IconButton(FontAwesomeIcon.Play)) if (ImGuiComponents.IconButton(FontAwesomeIcon.Play))
{ {
@ -278,6 +286,32 @@ internal sealed class ActiveQuestComponent
} }
} }
private void DrawDutyActive(bool isMinimized)
{
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.ParsedGreen))
{
ImU8String text = new ImU8String(6, 1);
text.AppendLiteral("Duty: ");
text.AppendFormatted(Shorten(_seasonalDutyController.CurrentDuty.Name));
ImGui.TextUnformatted(text);
}
IList<string> remainingTaskNames = _seasonalDutyController.GetRemainingTaskNames();
if (remainingTaskNames.Count > 0)
{
ImGui.TextColored(ImGuiColors.DalamudGrey, remainingTaskNames[0]);
}
if (!isMinimized)
{
string text2 = (_seasonalDutyController.CycleLimit.HasValue ? $"Cycle {_seasonalDutyController.CompletedCycles + 1} / {_seasonalDutyController.CycleLimit}" : $"Cycle {_seasonalDutyController.CompletedCycles + 1}");
ImGui.TextColored(ImGuiColors.DalamudGrey3, text2);
}
if (ImGuiComponents.IconButton(FontAwesomeIcon.Stop))
{
_seasonalDutyController.Stop("UI stop");
_movementController.Stop();
}
}
private void DrawQuestNames(QuestController.QuestProgress currentQuest, QuestController.ECurrentQuestType? currentQuestType) private void DrawQuestNames(QuestController.QuestProgress currentQuest, QuestController.ECurrentQuestType? currentQuestType)
{ {
if (currentQuestType == QuestController.ECurrentQuestType.Simulated) if (currentQuestType == QuestController.ECurrentQuestType.Simulated)
@ -594,7 +628,7 @@ internal sealed class ActiveQuestComponent
private void DrawQuestButtons(QuestController.QuestProgress currentQuest, QuestStep? currentStep, QuestProgressInfo? questProgressInfo, bool isMinimized) private void DrawQuestButtons(QuestController.QuestProgress currentQuest, QuestStep? currentStep, QuestProgressInfo? questProgressInfo, bool isMinimized)
{ {
using (ImRaii.Disabled(_questController.IsRunning || _fateController.IsRunning)) using (ImRaii.Disabled(_questController.IsRunning || _fateController.IsRunning || _seasonalDutyController.IsRunning))
{ {
if (ImGuiComponents.IconButton(FontAwesomeIcon.Play)) if (ImGuiComponents.IconButton(FontAwesomeIcon.Play))
{ {

View file

@ -12,16 +12,19 @@ internal sealed class RemainingTasksComponent
private readonly FateController _fateController; private readonly FateController _fateController;
public RemainingTasksComponent(QuestController questController, GatheringController gatheringController, FateController fateController) private readonly SeasonalDutyController _seasonalDutyController;
public RemainingTasksComponent(QuestController questController, GatheringController gatheringController, FateController fateController, SeasonalDutyController seasonalDutyController)
{ {
_questController = questController; _questController = questController;
_gatheringController = gatheringController; _gatheringController = gatheringController;
_fateController = fateController; _fateController = fateController;
_seasonalDutyController = seasonalDutyController;
} }
public void Draw() public void Draw()
{ {
IList<string> remainingTaskNames = _fateController.GetRemainingTaskNames(); IList<string> remainingTaskNames = _seasonalDutyController.GetRemainingTaskNames();
if (remainingTaskNames.Count > 0) if (remainingTaskNames.Count > 0)
{ {
ImGui.Separator(); ImGui.Separator();
@ -29,14 +32,14 @@ internal sealed class RemainingTasksComponent
foreach (string item in remainingTaskNames) foreach (string item in remainingTaskNames)
{ {
ImU8String text = new ImU8String(3, 1); ImU8String text = new ImU8String(3, 1);
text.AppendLiteral("F: "); text.AppendLiteral("D: ");
text.AppendFormatted(item); text.AppendFormatted(item);
ImGui.TextUnformatted(text); ImGui.TextUnformatted(text);
} }
ImGui.EndDisabled(); ImGui.EndDisabled();
return; return;
} }
IList<string> remainingTaskNames2 = _gatheringController.GetRemainingTaskNames(); IList<string> remainingTaskNames2 = _fateController.GetRemainingTaskNames();
if (remainingTaskNames2.Count > 0) if (remainingTaskNames2.Count > 0)
{ {
ImGui.Separator(); ImGui.Separator();
@ -44,23 +47,38 @@ internal sealed class RemainingTasksComponent
foreach (string item2 in remainingTaskNames2) foreach (string item2 in remainingTaskNames2)
{ {
ImU8String text2 = new ImU8String(3, 1); ImU8String text2 = new ImU8String(3, 1);
text2.AppendLiteral("G: "); text2.AppendLiteral("F: ");
text2.AppendFormatted(item2); text2.AppendFormatted(item2);
ImGui.TextUnformatted(text2); ImGui.TextUnformatted(text2);
} }
ImGui.EndDisabled(); ImGui.EndDisabled();
return; return;
} }
IList<string> remainingTaskNames3 = _questController.GetRemainingTaskNames(); IList<string> remainingTaskNames3 = _gatheringController.GetRemainingTaskNames();
if (remainingTaskNames3.Count <= 0) if (remainingTaskNames3.Count > 0)
{
ImGui.Separator();
ImGui.BeginDisabled();
foreach (string item3 in remainingTaskNames3)
{
ImU8String text3 = new ImU8String(3, 1);
text3.AppendLiteral("G: ");
text3.AppendFormatted(item3);
ImGui.TextUnformatted(text3);
}
ImGui.EndDisabled();
return;
}
IList<string> remainingTaskNames4 = _questController.GetRemainingTaskNames();
if (remainingTaskNames4.Count <= 0)
{ {
return; return;
} }
ImGui.Separator(); ImGui.Separator();
ImGui.BeginDisabled(); ImGui.BeginDisabled();
foreach (string item3 in remainingTaskNames3) foreach (string item4 in remainingTaskNames4)
{ {
ImGui.TextUnformatted(item3); ImGui.TextUnformatted(item4);
} }
ImGui.EndDisabled(); ImGui.EndDisabled();
} }