Automatically close Cosmic Exploration tutorial v5.10
authorLiza Carvelli <liza@carvel.li>
Tue, 22 Apr 2025 18:16:33 +0000 (20:16 +0200)
committerLiza Carvelli <liza@carvel.li>
Tue, 22 Apr 2025 18:16:33 +0000 (20:16 +0200)
Directory.Build.targets
Questionable/Controller/GameUi/HelpUiController.cs

index 3630c3c..e639b5b 100644 (file)
@@ -1,5 +1,5 @@
 <Project>
     <PropertyGroup Condition="$(MSBuildProjectName) != 'GatheringPathRenderer'">
-        <Version>5.9</Version>
+        <Version>5.10</Version>
     </PropertyGroup>
 </Project>
index 504f8cd..7fd9d07 100644 (file)
@@ -46,6 +46,12 @@ internal sealed class HelpUiController : IDisposable
             GuidePostSetup(addonGuide);
         }
 
+        if (_gameGui.TryGetAddonByName("ContentsTutorial", out AtkUnitBase* addonContentsTutorial))
+        {
+            _logger.LogInformation("ContentsTutorial window is open");
+            ContentsTutorialPostSetup(addonContentsTutorial);
+        }
+
         if (_gameGui.TryGetAddonByName("JobHudNotice", out AtkUnitBase* addonJobHudNotice))
         {
             _logger.LogInformation("JobHudNotice window is open");
@@ -65,12 +71,14 @@ internal sealed class HelpUiController : IDisposable
 
     private unsafe void ContentsTutorialPostSetup(AddonEvent type, AddonArgs args)
     {
-        if (_questController.StartedQuest?.Quest.Id.Value is 245 or 3872)
-        {
-            _logger.LogInformation("Closing ContentsTutorial");
-            AtkUnitBase* addon = (AtkUnitBase*)args.Addon;
-            addon->FireCallbackInt(13);
-        }
+        if (_questController.StartedQuest?.Quest.Id.Value is 245 or 3872 or 5253)
+            ContentsTutorialPostSetup((AtkUnitBase*)args.Addon);
+    }
+
+    private unsafe void ContentsTutorialPostSetup(AtkUnitBase* addon)
+    {
+        _logger.LogInformation("Closing ContentsTutorial");
+        addon->FireCallbackInt(13);
     }
 
     /// <summary>