mirror of
https://github.com/kwsch/PKHeX
synced 2024-09-22 15:21:55 +00:00
Misc tweaks
only have one empty forme array object rename method for clarity show version ID for hidden savefile program window titles
This commit is contained in:
parent
eec14645ef
commit
e366f9a93d
4 changed files with 16 additions and 14 deletions
|
@ -82,6 +82,8 @@ namespace PKHeX.Core
|
|||
}
|
||||
}
|
||||
|
||||
private static readonly string[] EMPTY = {""};
|
||||
|
||||
private static string[] GetFormsGen1(int species, IReadOnlyList<string> types, IReadOnlyList<string> forms, int generation)
|
||||
{
|
||||
switch (species)
|
||||
|
@ -107,7 +109,7 @@ namespace PKHeX.Core
|
|||
switch (species)
|
||||
{
|
||||
default:
|
||||
return new[] { "" };
|
||||
return EMPTY;
|
||||
|
||||
case 172:
|
||||
return GetFormsPichu(generation, types, forms);
|
||||
|
@ -121,7 +123,7 @@ namespace PKHeX.Core
|
|||
switch (species)
|
||||
{
|
||||
default:
|
||||
return new[] { "" };
|
||||
return EMPTY;
|
||||
|
||||
case 351: // Casftorm
|
||||
return new[]
|
||||
|
@ -154,7 +156,7 @@ namespace PKHeX.Core
|
|||
switch (species)
|
||||
{
|
||||
default:
|
||||
return new[] { "" };
|
||||
return EMPTY;
|
||||
|
||||
case 412:
|
||||
case 413:
|
||||
|
@ -217,7 +219,7 @@ namespace PKHeX.Core
|
|||
switch (species)
|
||||
{
|
||||
default:
|
||||
return new[] { "" };
|
||||
return EMPTY;
|
||||
|
||||
case 550:
|
||||
return new[]
|
||||
|
@ -291,7 +293,7 @@ namespace PKHeX.Core
|
|||
switch (species)
|
||||
{
|
||||
default:
|
||||
return new[] { "" };
|
||||
return EMPTY;
|
||||
|
||||
case 658:
|
||||
return new[]
|
||||
|
@ -420,7 +422,7 @@ namespace PKHeX.Core
|
|||
switch (species)
|
||||
{
|
||||
default:
|
||||
return new[] { "" };
|
||||
return EMPTY;
|
||||
|
||||
case 741: // Oricorio
|
||||
return new[]
|
||||
|
@ -495,12 +497,12 @@ namespace PKHeX.Core
|
|||
private static string[] GetFormsAlolan (int generation, IReadOnlyList<string> types, IReadOnlyList<string> forms, int species)
|
||||
{
|
||||
if (generation < 7)
|
||||
return new[] { "" };
|
||||
return EMPTY;
|
||||
|
||||
switch (species)
|
||||
{
|
||||
default:
|
||||
return new[] { "" };
|
||||
return EMPTY;
|
||||
|
||||
case 19: // Rattata
|
||||
case 26: // Raichu
|
||||
|
@ -531,7 +533,7 @@ namespace PKHeX.Core
|
|||
switch (generation)
|
||||
{
|
||||
default:
|
||||
return new[] { "" };
|
||||
return EMPTY;
|
||||
|
||||
case 6:
|
||||
return new[]
|
||||
|
@ -570,7 +572,7 @@ namespace PKHeX.Core
|
|||
};
|
||||
}
|
||||
|
||||
return new[] { "" };
|
||||
return EMPTY;
|
||||
}
|
||||
|
||||
private static string[] GetFormsArceus (int generation, IReadOnlyList<string> types)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
{
|
||||
public static class BoxWallpaper
|
||||
{
|
||||
public static string GetWallpaper(SaveFile SAV, int index)
|
||||
public static string GetWallpaperResourceName(SaveFile SAV, int index)
|
||||
{
|
||||
index++;
|
||||
string s = $"box_wp{index:00}";
|
||||
|
|
|
@ -822,9 +822,9 @@ namespace PKHeX.WinForms
|
|||
|
||||
private static string GetProgramTitle(SaveFile sav)
|
||||
{
|
||||
if (Settings.Default.HideSAVDetails)
|
||||
return GetProgramTitle() + $" - {sav.GetType().Name}";
|
||||
string title = GetProgramTitle() + $" - {sav.GetType().Name}: ";
|
||||
if (Settings.Default.HideSAVDetails)
|
||||
return title + $"[{sav.Version}]";
|
||||
if (!sav.Exportable) // Blank save file
|
||||
return title + $"{sav.FileName} [{sav.OT} ({sav.Version})]";
|
||||
return title + Path.GetFileNameWithoutExtension(Util.CleanFileName(sav.BAKName)); // more descriptive
|
||||
|
|
|
@ -96,7 +96,7 @@ namespace PKHeX.WinForms
|
|||
|
||||
private static Image GetWallpaper(SaveFile SAV, int box)
|
||||
{
|
||||
string s = BoxWallpaper.GetWallpaper(SAV, box);
|
||||
string s = BoxWallpaper.GetWallpaperResourceName(SAV, box);
|
||||
return (Bitmap)(Resources.ResourceManager.GetObject(s) ?? Resources.box_wp16xy);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue