Version bump, remove redundant nullability checks, minor cleanup v4.2
authorLiza Carvelli <liza@carvel.li>
Mon, 18 Nov 2024 19:56:13 +0000 (20:56 +0100)
committerLiza Carvelli <liza@carvel.li>
Mon, 18 Nov 2024 19:56:13 +0000 (20:56 +0100)
Directory.Build.targets
LLib
Questionable/Controller/GameUi/InteractionUiController.cs
Questionable/Data/AetherCurrentData.cs
Questionable/Data/QuestData.cs
Questionable/Functions/ChatFunctions.cs
Questionable/Functions/QuestFunctions.cs
Questionable/Model/SatisfactionSupplyInfo.cs
Questionable/Windows/JournalComponents/GatheringJournalComponent.cs

index ae3c9a423f2cd2bf91e4e3cd965a1ea1b1121ad4..ca80e97a38a7dc39357873d394c15563e93ae581 100644 (file)
@@ -1,5 +1,5 @@
 <Project>
     <PropertyGroup>
-        <Version>4.1</Version>
+        <Version>4.2</Version>
     </PropertyGroup>
 </Project>
diff --git a/LLib b/LLib
index 70b0bef2459898a70f7b34b4d196bbaeb72397b1..e4bbc05ede6f6f01e7028b24614ed8cb333e909c 160000 (submodule)
--- a/LLib
+++ b/LLib
@@ -1 +1 @@
-Subproject commit 70b0bef2459898a70f7b34b4d196bbaeb72397b1
+Subproject commit e4bbc05ede6f6f01e7028b24614ed8cb333e909c
index 797093dd65671d34d80a66f14e13e1a8e8cb01bb..1ea849281608b3c7659758f0271e576dff29c48d 100644 (file)
@@ -756,12 +756,12 @@ internal sealed class InteractionUiController : IDisposable
     private bool TryFindWarp(ushort targetTerritoryId, string actualPrompt, [NotNullWhen(true)] out uint? warpId,
         [NotNullWhen(true)] out string? warpText)
     {
-        var warps = _dataManager.GetExcelSheet<Warp>()!
+        var warps = _dataManager.GetExcelSheet<Warp>()
             .Where(x => x.RowId > 0 && x.TerritoryType.RowId == targetTerritoryId);
         foreach (var entry in warps)
         {
-            string? excelName = entry.Name.ToString();
-            string? excelQuestion = entry.Question.ToString();
+            string excelName = entry.Name.ToString();
+            string excelQuestion = entry.Question.ToString();
 
             if (!string.IsNullOrEmpty(excelQuestion) && GameFunctions.GameStringEquals(excelQuestion, actualPrompt))
             {
index 04bb7c37727fbbbe6a8c518551588a5004180598..ac9bb4141e677ff66d56bc1fb94e1d0246c64c9a 100644 (file)
@@ -11,7 +11,7 @@ internal sealed class AetherCurrentData
 
     public AetherCurrentData(IDataManager dataManager)
     {
-        _overworldCurrents = dataManager.GetExcelSheet<AetherCurrentCompFlgSet>()!
+        _overworldCurrents = dataManager.GetExcelSheet<AetherCurrentCompFlgSet>()
             .Where(x => x.RowId > 0)
             .Where(x => x.Territory.IsValid)
             .ToImmutableDictionary(
index 0bc96b55d3e58b9e39cb4b16b538e2dd902b6045..77b20e016939ed9d5e22d11287f8133cd9a0e4b5 100644 (file)
@@ -40,7 +40,7 @@ internal sealed class QuestData
     public QuestData(IDataManager dataManager)
     {
         Dictionary<uint, uint> questChapters =
-            dataManager.GetExcelSheet<QuestChapter>()!
+            dataManager.GetExcelSheet<QuestChapter>()
                 .Where(x => x.RowId > 0 && x.Quest.RowId > 0)
                 .ToDictionary(x => x.Quest.RowId, x => x.Redo.RowId);
 
index d53ed9bee014a33ab5f0f4dd95ae406b3da3fc7b..a0f935ab24766c810cace617f2388a468801eb14 100644 (file)
@@ -46,7 +46,7 @@ internal sealed unsafe class ChatFunctions
             .Where(x => x.TextCommand.IsValid)
             .Select(x => (x.RowId, Command: x.TextCommand.Value.Command.ToString()))
             .Where(x => !string.IsNullOrEmpty(x.Command) && x.Command.StartsWith('/'))
-            .ToDictionary(x => (EEmote)x.RowId, x => x.Command!)
+            .ToDictionary(x => (EEmote)x.RowId, x => x.Command)
             .AsReadOnly();
     }
 
index fa837cac8221b1d54f19e465402fc0ba22e5cb37..1ef56c4e42d3e59d2f4e451eed2a369900229a43 100644 (file)
@@ -129,9 +129,6 @@ internal sealed unsafe class QuestFunctions
                 var trackedQuest = questManager->TrackedQuests[i];
                 switch (trackedQuest.QuestType)
                 {
-                    default:
-                        break;
-
                     case 1: // normal quest
                         currentQuest = new QuestId(questManager->NormalQuests[trackedQuest.Index].QuestId);
                         if (_questRegistry.IsKnownQuest(currentQuest))
@@ -629,7 +626,7 @@ internal sealed unsafe class QuestFunctions
 
     public bool IsClassJobUnlocked(EClassJob classJob)
     {
-        var classJobRow = _dataManager.GetExcelSheet<ClassJob>()!.GetRow((uint)classJob)!;
+        var classJobRow = _dataManager.GetExcelSheet<ClassJob>().GetRow((uint)classJob);
         var questId = (ushort)classJobRow.UnlockQuest.RowId;
         if (questId != 0)
             return IsQuestComplete(new QuestId(questId));
@@ -640,7 +637,7 @@ internal sealed unsafe class QuestFunctions
 
     public bool IsJobUnlocked(EClassJob classJob)
     {
-        var classJobRow = _dataManager.GetExcelSheet<ClassJob>()!.GetRow((uint)classJob)!;
+        var classJobRow = _dataManager.GetExcelSheet<ClassJob>().GetRow((uint)classJob);
         return IsClassJobUnlocked((EClassJob)classJobRow.ClassJobParent.RowId);
     }
 
index e2c25ad880f5687075900c2b21e848fa21222aff..21c92936406160da13adaa4eb2852acb4db75f10 100644 (file)
@@ -15,7 +15,7 @@ internal sealed class SatisfactionSupplyInfo : IQuestInfo
         IssuerDataId = npc.Npc.RowId;
         Level = npc.LevelUnlock;
         SortKey = QuestId.Value;
-        Expansion = (EExpansionVersion)npc.QuestRequired.Value!.Expansion.RowId;
+        Expansion = (EExpansionVersion)npc.QuestRequired.Value.Expansion.RowId;
         PreviousQuests = [new PreviousQuestInfo(new QuestId((ushort)(npc.QuestRequired.RowId & 0xFFFF)))];
     }
 
index 53b1576e8bf4e303ce004e7064869610ce469112..daac30a4b79cbefc559a56567baa7eebba772359 100644 (file)
@@ -108,9 +108,9 @@ internal sealed class GatheringJournalComponent
             .GroupBy(x => x.GatheringPointId)
             .ToDictionary(x => x.Key, x => x.First());
 
-        var itemSheet = dataManager.GetExcelSheet<Item>()!;
+        var itemSheet = dataManager.GetExcelSheet<Item>();
 
-        _gatheringItems = dataManager.GetExcelSheet<GatheringItem>()!
+        _gatheringItems = dataManager.GetExcelSheet<GatheringItem>()
             .Where(x => x.RowId != 0 && x.GatheringItemLevel.RowId != 0)
             .Select(x => new
             {
@@ -120,7 +120,7 @@ internal sealed class GatheringJournalComponent
             .Where(x => !string.IsNullOrEmpty(x.Name))
             .ToDictionary(x => x.GatheringItemId, x => x.Name!);
 
-        _gatheringPointsByExpansion = dataManager.GetExcelSheet<GatheringPoint>()!
+        _gatheringPointsByExpansion = dataManager.GetExcelSheet<GatheringPoint>()
             .Where(x => x.GatheringPointBase.RowId != 0)
             .Where(x => x.GatheringPointBase.RowId is < 653 or > 680) // exclude ishgard restoration phase 1
             .DistinctBy(x => x.GatheringPointBase.RowId)
@@ -128,7 +128,7 @@ internal sealed class GatheringJournalComponent
             {
                 GatheringPointId = x.RowId,
                 Point = new DefaultGatheringPoint(new GatheringPointId((ushort)x.GatheringPointBase.RowId),
-                    x.GatheringPointBase.Value!.GatheringType.RowId switch
+                    x.GatheringPointBase.Value.GatheringType.RowId switch
                     {
                         0 or 1 => EClassJob.Miner,
                         2 or 3 => EClassJob.Botanist,
@@ -159,7 +159,7 @@ internal sealed class GatheringJournalComponent
                          _gatheringPointRegistry.TryGetGatheringPoint(x.Point.Id, out GatheringRoot? gatheringRoot))
                 {
                     // for some reason the game doesn't know where this gathering location is
-                    var territoryType = territoryTypeSheet.GetRow(gatheringRoot.Steps.Last().TerritoryId)!;
+                    var territoryType = territoryTypeSheet.GetRow(gatheringRoot.Steps.Last().TerritoryId);
                     return x.Point with
                     {
                         Expansion = (EExpansionVersion)territoryType.ExVersion.RowId,