mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-09-11 02:05:32 -05:00
Sort blocks by initial value
allows some lumping of similar-value blocks for easier analysis
This commit is contained in:
@@ -44,10 +44,16 @@ private static string GetSortKey(in ComboItem item)
|
||||
private string GetBlockHint(SCBlock z, int i)
|
||||
{
|
||||
var blockName = GetBlockName(z, out _);
|
||||
var type = (z.Type.IsBoolean() ? "Bool" : z.Type.ToString());
|
||||
var isBool = z.Type.IsBoolean();
|
||||
var type = (isBool ? "Bool" : z.Type.ToString());
|
||||
if (blockName != null)
|
||||
return $"*{type} {blockName}";
|
||||
return $"{z.Key:X8} - {i:0000} {type}";
|
||||
var result = $"{z.Key:X8} - {i:0000} {type}";
|
||||
if (z.Type == SCTypeCode.Object || z.Type == SCTypeCode.Array)
|
||||
result += $" 0x{z.Data.Length:X3}";
|
||||
else if (!isBool)
|
||||
result += $" {z.GetValue()}";
|
||||
return result;
|
||||
}
|
||||
|
||||
public string? GetBlockName(SCBlock block, out SaveBlock? saveBlock)
|
||||
|
||||
Reference in New Issue
Block a user