Handle ZA's EOL revision (2)

When throwing arg out of range, pass the value so it's obvious the number
This commit is contained in:
Kurt
2026-03-19 15:39:07 -05:00
parent 3ad376be44
commit 56ba92b68b
4 changed files with 7 additions and 6 deletions

View File

@@ -36,7 +36,7 @@ public SAV8LA()
{
0 => "-Base", // Vanilla
1 => "-DB", // DLC 1: Daybreak
_ => throw new ArgumentOutOfRangeException(nameof(SaveRevision)),
_ => throw new ArgumentOutOfRangeException(nameof(SaveRevision), SaveRevision, null),
};
public override string GetString(ReadOnlySpan<byte> data)

View File

@@ -45,7 +45,7 @@ public override void CopyChangesFrom(SaveFile sav)
0 => "-Base", // Vanilla
1 => "-IoA", // DLC 1: Isle of Armor
2 => "-CT", // DLC 2: Crown Tundra
_ => throw new ArgumentOutOfRangeException(nameof(SaveRevision)),
_ => throw new ArgumentOutOfRangeException(nameof(SaveRevision), SaveRevision, null),
};
public override bool ChecksumsValid => true;
@@ -111,7 +111,7 @@ private void Initialize()
0 => (Legal.MaxMoveID_8_O0, Legal.MaxSpeciesID_8_O0, Legal.MaxItemID_8_O0, Legal.MaxAbilityID_8_O0),
1 => (Legal.MaxMoveID_8_R1, Legal.MaxSpeciesID_8_R1, Legal.MaxItemID_8_R1, Legal.MaxAbilityID_8_R1),
2 => (Legal.MaxMoveID_8_R2, Legal.MaxSpeciesID_8_R2, Legal.MaxItemID_8_R2, Legal.MaxAbilityID_8_R2),
_ => throw new ArgumentOutOfRangeException(nameof(SaveRevision)),
_ => throw new ArgumentOutOfRangeException(nameof(SaveRevision), SaveRevision, null),
};
}

View File

@@ -50,7 +50,7 @@ public override void CopyChangesFrom(SaveFile sav)
0 => "-Base", // Vanilla
1 => "-TM", // Teal Mask
2 => "-ID", // Indigo Disk
_ => throw new ArgumentOutOfRangeException(nameof(SaveRevision)),
_ => throw new ArgumentOutOfRangeException(nameof(SaveRevision), SaveRevision, null),
};
public override bool ChecksumsValid => true;
@@ -118,7 +118,7 @@ private void Initialize()
0 => (Legal.MaxMoveID_9_T0, Legal.MaxSpeciesID_9_T0, Legal.MaxItemID_9_T0, Legal.MaxAbilityID_9_T0),
1 => (Legal.MaxMoveID_9_T1, Legal.MaxSpeciesID_9_T1, Legal.MaxItemID_9_T1, Legal.MaxAbilityID_9_T1),
2 => (Legal.MaxMoveID_9_T2, Legal.MaxSpeciesID_9_T2, Legal.MaxItemID_9_T2, Legal.MaxAbilityID_9_T2),
_ => throw new ArgumentOutOfRangeException(nameof(SaveRevision)),
_ => throw new ArgumentOutOfRangeException(nameof(SaveRevision), SaveRevision, null),
};
}

View File

@@ -48,7 +48,8 @@ public override void CopyChangesFrom(SaveFile sav)
{
0 => "-Base", // Vanilla
1 => "-MD", // Mega Dimension
_ => throw new ArgumentOutOfRangeException(nameof(SaveRevision)),
2 => "-EOL", // End of Life
_ => throw new ArgumentOutOfRangeException(nameof(SaveRevision), SaveRevision, null),
};
public override bool ChecksumsValid => true;