mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-04-25 08:10:48 -05:00
Misc tweaks
no functional change
This commit is contained in:
parent
cc7f96951f
commit
95eb008125
|
|
@ -35,7 +35,7 @@ public static string[] GetQRLines(this PKM pk)
|
|||
|
||||
return
|
||||
[
|
||||
string.Join(" ", header),
|
||||
string.Join(' ', header),
|
||||
sb.ToString(),
|
||||
IVs + " " + EVs,
|
||||
];
|
||||
|
|
|
|||
|
|
@ -17,11 +17,16 @@ public PokeBlock3Case(ReadOnlySpan<byte> data, int offset)
|
|||
public byte[] Write()
|
||||
{
|
||||
byte[] result = new byte[Count*PokeBlock3.SIZE];
|
||||
for (int i = 0; i < Blocks.Length; i++)
|
||||
Blocks[i].SetBlock(result.AsSpan(i * PokeBlock3.SIZE));
|
||||
Write(result);
|
||||
return result;
|
||||
}
|
||||
|
||||
public void Write(Span<byte> result)
|
||||
{
|
||||
for (int i = 0; i < Blocks.Length; i++)
|
||||
Blocks[i].SetBlock(result.Slice(i * PokeBlock3.SIZE, PokeBlock3.SIZE));
|
||||
}
|
||||
|
||||
public void DeleteAll()
|
||||
{
|
||||
foreach (var b in Blocks)
|
||||
|
|
|
|||
|
|
@ -916,8 +916,7 @@ private static bool SanityCheckSAV(ref SaveFile sav)
|
|||
{
|
||||
if (ModifierKeys == Keys.Control || s3.IsCorruptPokedexFF())
|
||||
{
|
||||
GameVersion[] g = [GameVersion.R, GameVersion.S, GameVersion.E, GameVersion.FR, GameVersion.LG];
|
||||
var games = g.Select(z => GameInfo.VersionDataSource.First(v => v.Value == (int)z));
|
||||
var games = GetGameList([GameVersion.R, GameVersion.S, GameVersion.E, GameVersion.FR, GameVersion.LG]);
|
||||
var msg = string.Format(MsgFileLoadVersionDetect, $"3 ({s3.Version})");
|
||||
using var dialog = new SAV_GameSelect(games, msg, MsgFileLoadSaveSelectVersion);
|
||||
dialog.ShowDialog();
|
||||
|
|
@ -941,8 +940,7 @@ private static bool SanityCheckSAV(ref SaveFile sav)
|
|||
string fr = GameInfo.GetVersionName(GameVersion.FR);
|
||||
string lg = GameInfo.GetVersionName(GameVersion.LG);
|
||||
string dual = "{1}/{2} " + MsgFileLoadVersionDetect;
|
||||
GameVersion[] g = [GameVersion.FR, GameVersion.LG];
|
||||
var games = g.Select(z => GameInfo.VersionDataSource.First(v => v.Value == (int)z));
|
||||
var games = GetGameList([GameVersion.FR, GameVersion.LG]);
|
||||
var msg = string.Format(dual, "3", fr, lg);
|
||||
using var dialog = new SAV_GameSelect(games, msg, MsgFileLoadSaveSelectVersion);
|
||||
dialog.ShowDialog();
|
||||
|
|
@ -953,6 +951,17 @@ private static bool SanityCheckSAV(ref SaveFile sav)
|
|||
}
|
||||
|
||||
return true;
|
||||
|
||||
static ComboItem[] GetGameList(ReadOnlySpan<GameVersion> g)
|
||||
{
|
||||
var result = new ComboItem[g.Length];
|
||||
for (int i = 0; i < g.Length; i++)
|
||||
{
|
||||
int id = (int)g[i];
|
||||
result[i] = GameInfo.VersionDataSource.First(v => v.Value == id);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
public static void SetCountrySubRegion(ComboBox CB, string type)
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ private void UpdateBlockSummaryControls()
|
|||
{
|
||||
var block = CurrentBlock;
|
||||
L_Detail_R.Text = GetBlockSummary(block);
|
||||
RTB_Hex.Text = string.Join(" ", block.Data.Select(z => $"{z:X2}"));
|
||||
RTB_Hex.Text = string.Join(' ', block.Data.Select(z => $"{z:X2}"));
|
||||
|
||||
var blockName = Metadata.GetBlockName(block, out var obj);
|
||||
if (blockName != null)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user