{
try
{
+ QuestRoot emptyQuest = new();
return ObjectCreationExpression(
IdentifierName(nameof(QuestRoot)))
.WithInitializer(
SyntaxNodeList(
AssignmentList(nameof(QuestRoot.Author), quest.Author)
.AsSyntaxNodeOrToken(),
- Assignment(nameof(QuestRoot.Disabled), quest.Disabled, false).AsSyntaxNodeOrToken(),
- Assignment(nameof(QuestRoot.Comment), quest.Comment, null)
+ Assignment(nameof(QuestRoot.Disabled), quest.Disabled, emptyQuest.Disabled).AsSyntaxNodeOrToken(),
+ Assignment(nameof(QuestRoot.Interruptible), quest.Interruptible, emptyQuest.Interruptible).AsSyntaxNodeOrToken(),
+ Assignment(nameof(QuestRoot.Comment), quest.Comment, emptyQuest.Comment)
.AsSyntaxNodeOrToken(),
AssignmentExpression(
SyntaxKind.SimpleAssignmentExpression,
{
"$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json",
"Author": "JerryWester",
+ "Interruptible": false,
"QuestSequence": [
{
"Sequence": 0,
"Disabled": {
"type": "boolean"
},
+ "Interruptible": {
+ "type": "boolean",
+ "description": "If set to false, no priority quest (e.g. class quests) will be done while this is the currently active quest"
+ },
"Comment": {
"type": "string"
},
]
}
}
-}
\ No newline at end of file
+}
/// </summary>
public bool Disabled { get; set; }
+ public bool Interruptible { get; set; } = true;
public string? Comment { get; set; }
public List<QuestSequence> QuestSequence { get; set; } = new();
}
using Dalamud.Game.Text.SeStringHandling;
using Dalamud.Plugin.Services;
using FFXIVClientStructs.FFXIV.Client.Game;
-using Lumina.Excel.Sheets;
using Microsoft.Extensions.Logging;
using Questionable.Controller.Steps;
using Questionable.Controller.Steps.Interactions;
using Questionable.Controller.Steps.Shared;
using Questionable.Data;
-using Questionable.External;
using Questionable.Functions;
using Questionable.Model;
using Questionable.Model.Questing;
return false;
var (currentQuest, type) = details.Value;
- if (type != ECurrentQuestType.Normal || currentQuest.Sequence == 0)
+ if (type != ECurrentQuestType.Normal || !currentQuest.Quest.Root.Interruptible || currentQuest.Sequence == 0)
return false;
if (ManualPriorityQuests.Contains(currentQuest.Quest))