From 4eeb90dd878849073da174fd7e893c37b410d5d6 Mon Sep 17 00:00:00 2001 From: Kaphotics Date: Mon, 3 Oct 2016 19:24:46 -0700 Subject: [PATCH] Fix mega form showdown set Cosmetic text regurgitating replace Mega Y->Mega-Y old method would forget the leading hyphen --- PKHeX/PKM/ShowdownSet.cs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/PKHeX/PKM/ShowdownSet.cs b/PKHeX/PKM/ShowdownSet.cs index aff18a58c..e5b4fefbc 100644 --- a/PKHeX/PKM/ShowdownSet.cs +++ b/PKHeX/PKM/ShowdownSet.cs @@ -145,12 +145,8 @@ namespace PKHeX // First Line: Name, Nickname, Gender, Item string specForm = species[Species]; if (!string.IsNullOrWhiteSpace(Form)) - { - if (Form.Contains("Mega")) - specForm += Form.Replace("Mega ", "Mega-"); - else - specForm += "-" + Form; - } + specForm += "-" + Form.Replace("Mega ", "Mega-"); + string result = Nickname != null && species[Species] != Nickname ? $"{Nickname} ({specForm})" : $"{specForm}"; if (!string.IsNullOrEmpty(Gender)) result += $" ({Gender})";