From 1acc06cf8acea7192aaccd7a11798377a9324e24 Mon Sep 17 00:00:00 2001 From: UltiNaruto Date: Thu, 9 May 2024 22:24:49 +0200 Subject: [PATCH] Version 2.9.1 Added Progressive Suit as alternative to Dark Suit/Light Suit being both displayed Fixed the type of the application to be a Windows application instead of console application --- MPItemTracker2/MPItemTracker2.csproj | 2 +- MPItemTracker2/Wrapper/Dolphin.cs | 2 +- MPItemTracker2/Wrapper/Echoes/Echoes.cs | 20 +++++++++++++++++++- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/MPItemTracker2/MPItemTracker2.csproj b/MPItemTracker2/MPItemTracker2.csproj index e775300..124b167 100644 --- a/MPItemTracker2/MPItemTracker2.csproj +++ b/MPItemTracker2/MPItemTracker2.csproj @@ -4,7 +4,7 @@ WinExe net48 Debug_Windows;Release_Windows;Debug_Linux;Release_Linux - 2.9 + 2.9.1 MPItemTracker MPItemTracker MPItemTracker diff --git a/MPItemTracker2/Wrapper/Dolphin.cs b/MPItemTracker2/Wrapper/Dolphin.cs index 26f38d1..beccc92 100644 --- a/MPItemTracker2/Wrapper/Dolphin.cs +++ b/MPItemTracker2/Wrapper/Dolphin.cs @@ -451,7 +451,7 @@ internal static void DrawUpgradeIcon(Graphics g, Font _Font, String upgrade_titl } } - if (str != "x0" && str != "x1") + if (str != "x0" && str != "x1" && !upgrade_title.StartsWith("Progressive ")) { str_width = (int)g.MeasureString(str, _Font).Width; g.DrawString(str, _Font, Brushes.White, x + imgSize - str_width, y + imgSize); diff --git a/MPItemTracker2/Wrapper/Echoes/Echoes.cs b/MPItemTracker2/Wrapper/Echoes/Echoes.cs index 6523ae3..8ee44d9 100644 --- a/MPItemTracker2/Wrapper/Echoes/Echoes.cs +++ b/MPItemTracker2/Wrapper/Echoes/Echoes.cs @@ -303,6 +303,8 @@ public override bool HasPickup(string pickup) return HaveDarkSuit; case "Light Suit": return HaveLightSuit; + case "Progressive Suit": + return HaveDarkBeam || HaveLightSuit; case "Gravity Boost": return HaveGravityBoost; case "Scan Visor": @@ -405,6 +407,12 @@ public override int GetPickupCount(string pickup) return HaveDarkSuit ? 1 : 0; case "Light Suit": return HaveLightSuit ? 1 : 0; + case "Progressive Suit": + if (HaveLightSuit) + return 2; + if (HaveDarkSuit) + return 1; + return 0; case "Gravity Boost": return HaveGravityBoost ? 1 : 0; case "Scan Visor": @@ -516,7 +524,17 @@ public override Image GetIcon(string pickup) { try { - return img[pickup]; + switch (pickup) + { + case "Progressive Suit": + if (HaveLightSuit) + return img["Light Suit"]; + if (HaveDarkSuit) + return img["Dark Suit"]; + return null; + default: + return img[pickup]; + } } catch {