From 5b5418cd3f58c879628a1e77b47ff2a765a7f72f Mon Sep 17 00:00:00 2001 From: Kurt Date: Mon, 23 Sep 2024 15:27:27 -0500 Subject: [PATCH] Update EncounterText.cs --- .../Legality/Encounters/Information/EncounterText.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/PKHeX.Core/Legality/Encounters/Information/EncounterText.cs b/PKHeX.Core/Legality/Encounters/Information/EncounterText.cs index c71bcdfee..8f0695d93 100644 --- a/PKHeX.Core/Legality/Encounters/Information/EncounterText.cs +++ b/PKHeX.Core/Legality/Encounters/Information/EncounterText.cs @@ -9,9 +9,9 @@ namespace PKHeX.Core; /// public static class EncounterText { - public static IReadOnlyList GetTextLines(this IEncounterInfo enc) => GetTextLines(enc, GameInfo.Strings); + public static IReadOnlyList GetTextLines(this IEncounterInfo enc, bool verbose = false) => GetTextLines(enc, GameInfo.Strings, verbose); - public static IReadOnlyList GetTextLines(this IEncounterInfo enc, GameStrings strings) + public static IReadOnlyList GetTextLines(this IEncounterInfo enc, GameStrings strings, bool verbose = false) { var lines = new List(); var str = strings.Species; @@ -42,7 +42,9 @@ public static IReadOnlyList GetTextLines(this IEncounterInfo enc, GameSt ? $"Level: {enc.LevelMin}" : $"Level: {enc.LevelMin}-{enc.LevelMax}"); -#if DEBUG + if (!verbose) + return lines; + // Record types! Can get a nice summary. // Won't work neatly for Mystery Gift types since those aren't record types. if (enc is not MysteryGift) @@ -51,7 +53,6 @@ public static IReadOnlyList GetTextLines(this IEncounterInfo enc, GameSt var raw = enc.ToString() ?? throw new ArgumentNullException(nameof(enc)); lines.AddRange(raw.Split(',', '}', '{')); } -#endif return lines; } }