forked from liza/Questionable
Rename beast tribe to allied society in code
This commit is contained in:
parent
4acf4b0d13
commit
179e6e341f
@ -5,7 +5,7 @@ namespace Questionable.Model;
|
|||||||
|
|
||||||
[SuppressMessage("Design", "CA1028", Justification = "Game type")]
|
[SuppressMessage("Design", "CA1028", Justification = "Game type")]
|
||||||
[UsedImplicitly(ImplicitUseTargetFlags.Members)]
|
[UsedImplicitly(ImplicitUseTargetFlags.Members)]
|
||||||
public enum EBeastTribe : byte
|
public enum EAlliedSociety : byte
|
||||||
{
|
{
|
||||||
None = 0,
|
None = 0,
|
||||||
Amaljaa = 1,
|
Amaljaa = 1,
|
@ -13,7 +13,7 @@ public interface IQuestInfo
|
|||||||
public uint IssuerDataId { get; }
|
public uint IssuerDataId { get; }
|
||||||
public bool IsRepeatable { get; }
|
public bool IsRepeatable { get; }
|
||||||
public ushort Level { get; }
|
public ushort Level { get; }
|
||||||
public EBeastTribe BeastTribe { get; }
|
public EAlliedSociety AlliedSociety { get; }
|
||||||
public uint? JournalGenre { get; }
|
public uint? JournalGenre { get; }
|
||||||
public ushort SortKey { get; }
|
public ushort SortKey { get; }
|
||||||
public bool IsMainScenarioQuest { get; }
|
public bool IsMainScenarioQuest { get; }
|
||||||
|
@ -24,7 +24,7 @@ internal sealed class LeveInfo : IQuestInfo
|
|||||||
public uint IssuerDataId { get; }
|
public uint IssuerDataId { get; }
|
||||||
public bool IsRepeatable => true;
|
public bool IsRepeatable => true;
|
||||||
public ushort Level { get; }
|
public ushort Level { get; }
|
||||||
public EBeastTribe BeastTribe => EBeastTribe.None;
|
public EAlliedSociety AlliedSociety => EAlliedSociety.None;
|
||||||
public uint? JournalGenre { get; }
|
public uint? JournalGenre { get; }
|
||||||
public ushort SortKey { get; }
|
public ushort SortKey { get; }
|
||||||
public bool IsMainScenarioQuest => false;
|
public bool IsMainScenarioQuest => false;
|
||||||
|
@ -51,7 +51,7 @@ internal sealed class QuestInfo : IQuestInfo
|
|||||||
PreviousInstanceContent = quest.InstanceContent.Select(x => (ushort)x.Row).Where(x => x != 0).ToList();
|
PreviousInstanceContent = quest.InstanceContent.Select(x => (ushort)x.Row).Where(x => x != 0).ToList();
|
||||||
PreviousInstanceContentJoin = (QuestJoin)quest.InstanceContentJoin;
|
PreviousInstanceContentJoin = (QuestJoin)quest.InstanceContentJoin;
|
||||||
GrandCompany = (GrandCompany)quest.GrandCompany.Row;
|
GrandCompany = (GrandCompany)quest.GrandCompany.Row;
|
||||||
BeastTribe = (EBeastTribe)quest.BeastTribe.Row;
|
AlliedSociety = (EAlliedSociety)quest.BeastTribe.Row;
|
||||||
ClassJobs = QuestInfoUtils.AsList(quest.ClassJobCategory0.Value!);
|
ClassJobs = QuestInfoUtils.AsList(quest.ClassJobCategory0.Value!);
|
||||||
IsSeasonalEvent = quest.Festival.Row != 0;
|
IsSeasonalEvent = quest.Festival.Row != 0;
|
||||||
NewGamePlusChapter = newGamePlusChapter;
|
NewGamePlusChapter = newGamePlusChapter;
|
||||||
@ -75,7 +75,7 @@ internal sealed class QuestInfo : IQuestInfo
|
|||||||
public bool IsMainScenarioQuest { get; }
|
public bool IsMainScenarioQuest { get; }
|
||||||
public bool CompletesInstantly { get; }
|
public bool CompletesInstantly { get; }
|
||||||
public GrandCompany GrandCompany { get; }
|
public GrandCompany GrandCompany { get; }
|
||||||
public EBeastTribe BeastTribe { get; }
|
public EAlliedSociety AlliedSociety { get; }
|
||||||
public IReadOnlyList<EClassJob> ClassJobs { get; }
|
public IReadOnlyList<EClassJob> ClassJobs { get; }
|
||||||
public bool IsSeasonalEvent { get; }
|
public bool IsSeasonalEvent { get; }
|
||||||
public ushort NewGamePlusChapter { get; }
|
public ushort NewGamePlusChapter { get; }
|
||||||
|
@ -22,7 +22,7 @@ internal sealed class SatisfactionSupplyInfo : IQuestInfo
|
|||||||
public uint IssuerDataId { get; }
|
public uint IssuerDataId { get; }
|
||||||
public bool IsRepeatable => true;
|
public bool IsRepeatable => true;
|
||||||
public ushort Level { get; }
|
public ushort Level { get; }
|
||||||
public EBeastTribe BeastTribe => EBeastTribe.None;
|
public EAlliedSociety AlliedSociety => EAlliedSociety.None;
|
||||||
public uint? JournalGenre => null;
|
public uint? JournalGenre => null;
|
||||||
public ushort SortKey { get; }
|
public ushort SortKey { get; }
|
||||||
public bool IsMainScenarioQuest => false;
|
public bool IsMainScenarioQuest => false;
|
||||||
|
@ -44,7 +44,7 @@ internal sealed class QuestValidator
|
|||||||
_validationIssues.Clear();
|
_validationIssues.Clear();
|
||||||
|
|
||||||
List<ValidationIssue> issues = [];
|
List<ValidationIssue> issues = [];
|
||||||
Dictionary<EBeastTribe, int> disabledTribeQuests = new();
|
Dictionary<EAlliedSociety, int> disabledTribeQuests = new();
|
||||||
foreach (var quest in quests)
|
foreach (var quest in quests)
|
||||||
{
|
{
|
||||||
foreach (var validator in _validators)
|
foreach (var validator in _validators)
|
||||||
@ -57,10 +57,10 @@ internal sealed class QuestValidator
|
|||||||
_logger.Log(level,
|
_logger.Log(level,
|
||||||
"Validation failed: {QuestId} ({QuestName}) / {QuestSequence} / {QuestStep} - {Description}",
|
"Validation failed: {QuestId} ({QuestName}) / {QuestSequence} / {QuestStep} - {Description}",
|
||||||
issue.ElementId, quest.Info.Name, issue.Sequence, issue.Step, issue.Description);
|
issue.ElementId, quest.Info.Name, issue.Sequence, issue.Step, issue.Description);
|
||||||
if (issue.Type == EIssueType.QuestDisabled && quest.Info.BeastTribe != EBeastTribe.None)
|
if (issue.Type == EIssueType.QuestDisabled && quest.Info.AlliedSociety != EAlliedSociety.None)
|
||||||
{
|
{
|
||||||
disabledTribeQuests.TryAdd(quest.Info.BeastTribe, 0);
|
disabledTribeQuests.TryAdd(quest.Info.AlliedSociety, 0);
|
||||||
disabledTribeQuests[quest.Info.BeastTribe]++;
|
disabledTribeQuests[quest.Info.AlliedSociety]++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
issues.Add(issue);
|
issues.Add(issue);
|
||||||
@ -89,7 +89,7 @@ internal sealed class QuestValidator
|
|||||||
}, CancellationToken.None, TaskCreationOptions.LongRunning, TaskScheduler.Default);
|
}, CancellationToken.None, TaskCreationOptions.LongRunning, TaskScheduler.Default);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static IEnumerable<ValidationIssue> DisabledTribesAsIssues(Dictionary<EBeastTribe, int> disabledTribeQuests)
|
private static IEnumerable<ValidationIssue> DisabledTribesAsIssues(Dictionary<EAlliedSociety, int> disabledTribeQuests)
|
||||||
{
|
{
|
||||||
return disabledTribeQuests
|
return disabledTribeQuests
|
||||||
.OrderBy(x => x.Key)
|
.OrderBy(x => x.Key)
|
||||||
@ -98,7 +98,7 @@ internal sealed class QuestValidator
|
|||||||
ElementId = null,
|
ElementId = null,
|
||||||
Sequence = null,
|
Sequence = null,
|
||||||
Step = null,
|
Step = null,
|
||||||
BeastTribe = x.Key,
|
AlliedSociety = x.Key,
|
||||||
Type = EIssueType.QuestDisabled,
|
Type = EIssueType.QuestDisabled,
|
||||||
Severity = EIssueSeverity.None,
|
Severity = EIssueSeverity.None,
|
||||||
Description = $"{x.Value} disabled quest(s)",
|
Description = $"{x.Value} disabled quest(s)",
|
||||||
|
@ -8,7 +8,7 @@ internal sealed record ValidationIssue
|
|||||||
public required ElementId? ElementId { get; init; }
|
public required ElementId? ElementId { get; init; }
|
||||||
public required byte? Sequence { get; init; }
|
public required byte? Sequence { get; init; }
|
||||||
public required int? Step { get; init; }
|
public required int? Step { get; init; }
|
||||||
public EBeastTribe BeastTribe { get; init; } = EBeastTribe.None;
|
public EAlliedSociety AlliedSociety { get; init; } = EAlliedSociety.None;
|
||||||
public required EIssueType Type { get; init; }
|
public required EIssueType Type { get; init; }
|
||||||
public required EIssueSeverity Severity { get; init; }
|
public required EIssueSeverity Severity { get; init; }
|
||||||
public required string Description { get; init; }
|
public required string Description { get; init; }
|
||||||
|
@ -61,7 +61,7 @@ internal sealed class QuestValidationWindow : LWindow
|
|||||||
if (ImGui.TableNextColumn())
|
if (ImGui.TableNextColumn())
|
||||||
ImGui.TextUnformatted(validationIssue.ElementId != null
|
ImGui.TextUnformatted(validationIssue.ElementId != null
|
||||||
? _questData.GetQuestInfo(validationIssue.ElementId).Name
|
? _questData.GetQuestInfo(validationIssue.ElementId).Name
|
||||||
: validationIssue.BeastTribe.ToString());
|
: validationIssue.AlliedSociety.ToString());
|
||||||
|
|
||||||
if (ImGui.TableNextColumn())
|
if (ImGui.TableNextColumn())
|
||||||
ImGui.TextUnformatted(validationIssue.Sequence?.ToString(CultureInfo.InvariantCulture) ?? string.Empty);
|
ImGui.TextUnformatted(validationIssue.Sequence?.ToString(CultureInfo.InvariantCulture) ?? string.Empty);
|
||||||
|
Loading…
Reference in New Issue
Block a user