From e8a924b161cf0c9b6606bd0e265fcbfde079803d Mon Sep 17 00:00:00 2001 From: WorstPirateYouEverSeen Date: Sun, 21 Dec 2025 14:23:47 -0800 Subject: [PATCH] API14 --- ResizableHUD/AddonManager.cs | 10 +++++----- ResizableHUD/ConfigWindow.cs | 2 +- ResizableHUD/Configuration.cs | 15 ++++++--------- ResizableHUD/ResizableHUD.csproj | 4 ++-- ResizableHUD/packages.lock.json | 16 ++++++++-------- 5 files changed, 22 insertions(+), 25 deletions(-) diff --git a/ResizableHUD/AddonManager.cs b/ResizableHUD/AddonManager.cs index 6811bf4..f0f05b2 100644 --- a/ResizableHUD/AddonManager.cs +++ b/ResizableHUD/AddonManager.cs @@ -26,7 +26,7 @@ internal class AddonManager private static Vector2 LastMousePos = Vector2.Zero; public static unsafe bool CheckIfInConfig(AtkUnitBase* unit) { - List config = Globals.Config.GetCurrentNodeConfig(); + List config = Globals.Config.GetCurrentNodeConfig()!; return config.Any(node => node.Name == unit->NameString); } @@ -65,7 +65,7 @@ public static unsafe void AddToConfig(AtkUnitBase* unit) { return; } - List config = Globals.Config.GetCurrentNodeConfig(); + List config = Globals.Config.GetCurrentNodeConfig()!; config.Add(GetAddonConfig(unit)); config.Sort((x, y) => string.Compare(x.Name, y.Name, StringComparison.OrdinalIgnoreCase)); } @@ -118,7 +118,7 @@ public static unsafe void UpdateAddon(ref ResNodeConfig node) { } public static void UpdateAddons() { - List config = Globals.Config.GetCurrentNodeConfig(); + List config = Globals.Config.GetCurrentNodeConfig()!; if (config == null) { return; @@ -131,7 +131,7 @@ public static void UpdateAddons() { } public static void DrawAddonNodes() { - List config = Globals.Config.GetCurrentNodeConfig(); + List config = Globals.Config.GetCurrentNodeConfig()!; if (config == null) { return; @@ -200,7 +200,7 @@ public static void DrawAddonNodes() { } private static string FindClosestMatch(string input) { - List config = Globals.Config.GetCurrentNodeConfig(); + List config = Globals.Config.GetCurrentNodeConfig()!; string closestMatch = ""; int minDifference = int.MaxValue; diff --git a/ResizableHUD/ConfigWindow.cs b/ResizableHUD/ConfigWindow.cs index deb33cf..a382400 100644 --- a/ResizableHUD/ConfigWindow.cs +++ b/ResizableHUD/ConfigWindow.cs @@ -113,7 +113,7 @@ public override unsafe void Draw() { } WindowDrawHelpers.DrawTooltip("Save config"); - WindowDrawHelpers.DrawCheckboxTooltip("Draw Addon Inspector", ref Globals.Config.DrawAddonInspector, "When enabled, you will see an overlay of addons (UI elements). Pressing Right Mouse will bring up a context menu with the addons that are under your mouse. Clicking on one of these will add it to the list"); + WindowDrawHelpers.DrawCheckboxTooltip("Draw Addon Inspector", ref Globals.Config!.DrawAddonInspector, "When enabled, you will see an overlay of addons (UI elements). Pressing Right Mouse will bring up a context menu with the addons that are under your mouse. Clicking on one of these will add it to the list"); if (Globals.Config.DrawAddonInspector) { WindowDrawHelpers.DrawCheckboxTooltip("Draw Only Visible", ref Globals.Config.OnlyPeekVisible, "When enabled, the addon inspector will only draw addons that are marked as visible"); } diff --git a/ResizableHUD/Configuration.cs b/ResizableHUD/Configuration.cs index e66c0ac..6a660b1 100644 --- a/ResizableHUD/Configuration.cs +++ b/ResizableHUD/Configuration.cs @@ -52,7 +52,7 @@ public class Configuration : IPluginConfiguration { #endregion public List? GetCurrentNodeConfig() { - ulong cid = Service.ClientState.LocalContentId; + ulong cid = Service.PlayerState.ContentId; if (CIDNodeConfigMap.ContainsKey(cid)) { return CIDNodeConfigMap[cid]; } @@ -62,7 +62,7 @@ public class Configuration : IPluginConfiguration { } public void Initialize() { - ulong cid = Service.ClientState.LocalContentId; + ulong cid = Service.PlayerState.ContentId; if (nodeConfigs != null) { CIDNodeConfigMap.Add(cid, nodeConfigs); @@ -79,13 +79,10 @@ public void Initialize() { foreach (List node_config in CIDNodeConfigMap.Values) { // upgrade old config foreach (ResNodeConfig config in node_config) { - if (config != null) { - if (config.DoNotPosition == null) { - config.DoNotPosition = false; - } - if (config.DoNotScale == null) { - config.DoNotScale = false; - } + if (config != null) + { + config.DoNotPosition = false; + config.DoNotScale = false; if (config.Attachment == null) { config.Attachment = ""; diff --git a/ResizableHUD/ResizableHUD.csproj b/ResizableHUD/ResizableHUD.csproj index 6df700a..ab59df3 100644 --- a/ResizableHUD/ResizableHUD.csproj +++ b/ResizableHUD/ResizableHUD.csproj @@ -1,7 +1,7 @@ - + - net9.0 + net10.0 preview 1701;1702;CA1416 diff --git a/ResizableHUD/packages.lock.json b/ResizableHUD/packages.lock.json index 3facbaa..3ceb898 100644 --- a/ResizableHUD/packages.lock.json +++ b/ResizableHUD/packages.lock.json @@ -1,23 +1,23 @@ { "version": 1, "dependencies": { - "net9.0": { + "net10.0": { "DalamudPackager": { "type": "Direct", - "requested": "[13.0.0, )", - "resolved": "13.0.0", - "contentHash": "Mb3cUDSK/vDPQ8gQIeuCw03EMYrej1B4J44a1AvIJ9C759p9XeqdU9Hg4WgOmlnlPe0G7ILTD32PKSUpkQNa8w==" + "requested": "[14.0.1, )", + "resolved": "14.0.1", + "contentHash": "y0WWyUE6dhpGdolK3iKgwys05/nZaVf4ZPtIjpLhJBZvHxkkiE23zYRo7K7uqAgoK/QvK5cqF6l3VG5AbgC6KA==" }, "DotNet.ReproducibleBuilds": { "type": "Direct", - "requested": "[1.2.25, )", - "resolved": "1.2.25", - "contentHash": "xCXiw7BCxHJ8pF6wPepRUddlh2dlQlbr81gXA72hdk4FLHkKXas7EH/n+fk5UCA/YfMqG1Z6XaPiUjDbUNBUzg==" + "requested": "[1.2.39, )", + "resolved": "1.2.39", + "contentHash": "fcFN01tDTIQqDuTwr1jUQK/geofiwjG5DycJQOnC72i1SsLAk1ELe+apBOuZ11UMQG8YKFZG1FgvjZPbqHyatg==" }, "drahsidlib": { "type": "Project", "dependencies": { - "DalamudPackager": "[13.0.0, )" + "DalamudPackager": "[14.0.1, )" } } }