From 179e6e341f83e607d9e2913ce5dd4d6acba70952 Mon Sep 17 00:00:00 2001 From: Liza Carvelli Date: Sat, 17 Aug 2024 19:16:33 +0200 Subject: [PATCH] Rename beast tribe to allied society in code --- .../Model/{EBeastTribe.cs => EAlliedSociety.cs} | 2 +- Questionable/Model/IQuestInfo.cs | 2 +- Questionable/Model/LeveInfo.cs | 2 +- Questionable/Model/QuestInfo.cs | 4 ++-- Questionable/Model/SatisfactionSupplyInfo.cs | 2 +- Questionable/Validation/QuestValidator.cs | 12 ++++++------ Questionable/Validation/ValidationIssue.cs | 2 +- Questionable/Windows/QuestValidationWindow.cs | 2 +- 8 files changed, 14 insertions(+), 14 deletions(-) rename Questionable/Model/{EBeastTribe.cs => EAlliedSociety.cs} (93%) diff --git a/Questionable/Model/EBeastTribe.cs b/Questionable/Model/EAlliedSociety.cs similarity index 93% rename from Questionable/Model/EBeastTribe.cs rename to Questionable/Model/EAlliedSociety.cs index e26fb6725..2f7281f76 100644 --- a/Questionable/Model/EBeastTribe.cs +++ b/Questionable/Model/EAlliedSociety.cs @@ -5,7 +5,7 @@ namespace Questionable.Model; [SuppressMessage("Design", "CA1028", Justification = "Game type")] [UsedImplicitly(ImplicitUseTargetFlags.Members)] -public enum EBeastTribe : byte +public enum EAlliedSociety : byte { None = 0, Amaljaa = 1, diff --git a/Questionable/Model/IQuestInfo.cs b/Questionable/Model/IQuestInfo.cs index 1a2f557a0..5bc8d5f98 100644 --- a/Questionable/Model/IQuestInfo.cs +++ b/Questionable/Model/IQuestInfo.cs @@ -13,7 +13,7 @@ public interface IQuestInfo public uint IssuerDataId { get; } public bool IsRepeatable { get; } public ushort Level { get; } - public EBeastTribe BeastTribe { get; } + public EAlliedSociety AlliedSociety { get; } public uint? JournalGenre { get; } public ushort SortKey { get; } public bool IsMainScenarioQuest { get; } diff --git a/Questionable/Model/LeveInfo.cs b/Questionable/Model/LeveInfo.cs index 8d454e5b1..b446da9a7 100644 --- a/Questionable/Model/LeveInfo.cs +++ b/Questionable/Model/LeveInfo.cs @@ -24,7 +24,7 @@ internal sealed class LeveInfo : IQuestInfo public uint IssuerDataId { get; } public bool IsRepeatable => true; public ushort Level { get; } - public EBeastTribe BeastTribe => EBeastTribe.None; + public EAlliedSociety AlliedSociety => EAlliedSociety.None; public uint? JournalGenre { get; } public ushort SortKey { get; } public bool IsMainScenarioQuest => false; diff --git a/Questionable/Model/QuestInfo.cs b/Questionable/Model/QuestInfo.cs index e9a70ea3a..2c9c29517 100644 --- a/Questionable/Model/QuestInfo.cs +++ b/Questionable/Model/QuestInfo.cs @@ -51,7 +51,7 @@ internal sealed class QuestInfo : IQuestInfo PreviousInstanceContent = quest.InstanceContent.Select(x => (ushort)x.Row).Where(x => x != 0).ToList(); PreviousInstanceContentJoin = (QuestJoin)quest.InstanceContentJoin; GrandCompany = (GrandCompany)quest.GrandCompany.Row; - BeastTribe = (EBeastTribe)quest.BeastTribe.Row; + AlliedSociety = (EAlliedSociety)quest.BeastTribe.Row; ClassJobs = QuestInfoUtils.AsList(quest.ClassJobCategory0.Value!); IsSeasonalEvent = quest.Festival.Row != 0; NewGamePlusChapter = newGamePlusChapter; @@ -75,7 +75,7 @@ internal sealed class QuestInfo : IQuestInfo public bool IsMainScenarioQuest { get; } public bool CompletesInstantly { get; } public GrandCompany GrandCompany { get; } - public EBeastTribe BeastTribe { get; } + public EAlliedSociety AlliedSociety { get; } public IReadOnlyList ClassJobs { get; } public bool IsSeasonalEvent { get; } public ushort NewGamePlusChapter { get; } diff --git a/Questionable/Model/SatisfactionSupplyInfo.cs b/Questionable/Model/SatisfactionSupplyInfo.cs index 17c56772f..9b3a7a6d6 100644 --- a/Questionable/Model/SatisfactionSupplyInfo.cs +++ b/Questionable/Model/SatisfactionSupplyInfo.cs @@ -22,7 +22,7 @@ internal sealed class SatisfactionSupplyInfo : IQuestInfo public uint IssuerDataId { get; } public bool IsRepeatable => true; public ushort Level { get; } - public EBeastTribe BeastTribe => EBeastTribe.None; + public EAlliedSociety AlliedSociety => EAlliedSociety.None; public uint? JournalGenre => null; public ushort SortKey { get; } public bool IsMainScenarioQuest => false; diff --git a/Questionable/Validation/QuestValidator.cs b/Questionable/Validation/QuestValidator.cs index 44f952f34..c91f0df2f 100644 --- a/Questionable/Validation/QuestValidator.cs +++ b/Questionable/Validation/QuestValidator.cs @@ -44,7 +44,7 @@ internal sealed class QuestValidator _validationIssues.Clear(); List issues = []; - Dictionary disabledTribeQuests = new(); + Dictionary disabledTribeQuests = new(); foreach (var quest in quests) { foreach (var validator in _validators) @@ -57,10 +57,10 @@ internal sealed class QuestValidator _logger.Log(level, "Validation failed: {QuestId} ({QuestName}) / {QuestSequence} / {QuestStep} - {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[quest.Info.BeastTribe]++; + disabledTribeQuests.TryAdd(quest.Info.AlliedSociety, 0); + disabledTribeQuests[quest.Info.AlliedSociety]++; } else issues.Add(issue); @@ -89,7 +89,7 @@ internal sealed class QuestValidator }, CancellationToken.None, TaskCreationOptions.LongRunning, TaskScheduler.Default); } - private static IEnumerable DisabledTribesAsIssues(Dictionary disabledTribeQuests) + private static IEnumerable DisabledTribesAsIssues(Dictionary disabledTribeQuests) { return disabledTribeQuests .OrderBy(x => x.Key) @@ -98,7 +98,7 @@ internal sealed class QuestValidator ElementId = null, Sequence = null, Step = null, - BeastTribe = x.Key, + AlliedSociety = x.Key, Type = EIssueType.QuestDisabled, Severity = EIssueSeverity.None, Description = $"{x.Value} disabled quest(s)", diff --git a/Questionable/Validation/ValidationIssue.cs b/Questionable/Validation/ValidationIssue.cs index 654ac514b..b77c21fe9 100644 --- a/Questionable/Validation/ValidationIssue.cs +++ b/Questionable/Validation/ValidationIssue.cs @@ -8,7 +8,7 @@ internal sealed record ValidationIssue public required ElementId? ElementId { get; init; } public required byte? Sequence { 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 EIssueSeverity Severity { get; init; } public required string Description { get; init; } diff --git a/Questionable/Windows/QuestValidationWindow.cs b/Questionable/Windows/QuestValidationWindow.cs index 8f3eb3ac5..173c82f37 100644 --- a/Questionable/Windows/QuestValidationWindow.cs +++ b/Questionable/Windows/QuestValidationWindow.cs @@ -61,7 +61,7 @@ internal sealed class QuestValidationWindow : LWindow if (ImGui.TableNextColumn()) ImGui.TextUnformatted(validationIssue.ElementId != null ? _questData.GetQuestInfo(validationIssue.ElementId).Name - : validationIssue.BeastTribe.ToString()); + : validationIssue.AlliedSociety.ToString()); if (ImGui.TableNextColumn()) ImGui.TextUnformatted(validationIssue.Sequence?.ToString(CultureInfo.InvariantCulture) ?? string.Empty);