mirror of
https://github.com/AdAstra-LD/DS-Pokemon-Rom-Editor.git
synced 2026-05-09 12:51:54 -05:00
Learnset Editor can handle extra entries
This commit is contained in:
parent
2043abf821
commit
669e6bb3c5
|
|
@ -49,9 +49,14 @@ namespace DSPRE {
|
|||
List<string> fileNames = new List<string>(count);
|
||||
fileNames.AddRange(pokenames);
|
||||
|
||||
for(int i = 0; i < count-pokenames.Length; i++) {
|
||||
PokeDatabase.PersonalData.PersonalExtraFiles extraEntry = PokeDatabase.PersonalData.personalExtraFiles[i];
|
||||
fileNames.Add(fileNames[extraEntry.monId] + " - " + extraEntry.description);
|
||||
for (int i = 0; i < PokeDatabase.PersonalData.personalExtraFiles.Length; i++) {
|
||||
PokeDatabase.PersonalData.PersonalExtraFiles altFormEntry = PokeDatabase.PersonalData.personalExtraFiles[i];
|
||||
fileNames.Add(fileNames[altFormEntry.monId] + " - " + altFormEntry.description);
|
||||
}
|
||||
|
||||
int extraEntries = fileNames.Count;
|
||||
for (int i = 0; i < count - extraEntries; i++) {
|
||||
fileNames.Add($"Extra entry {fileNames.Count}");
|
||||
}
|
||||
|
||||
this.fileNames = fileNames.ToArray();
|
||||
|
|
@ -101,11 +106,15 @@ namespace DSPRE {
|
|||
UpdateButtonsOnMoveSelection();
|
||||
|
||||
int excess = toLoad - pokenames.Length;
|
||||
if (excess >= 0) {
|
||||
toLoad = PokeDatabase.PersonalData.personalExtraFiles[excess].iconId;
|
||||
try {
|
||||
if (excess >= 0) {
|
||||
toLoad = PokeDatabase.PersonalData.personalExtraFiles[excess].iconId;
|
||||
}
|
||||
} catch (IndexOutOfRangeException) {
|
||||
toLoad = 0;
|
||||
} finally {
|
||||
pokemonPictureBox.Image = DSUtils.GetPokePic(toLoad, pokemonPictureBox.Width, pokemonPictureBox.Height);
|
||||
}
|
||||
pokemonPictureBox.Image = DSUtils.GetPokePic(toLoad, pokemonPictureBox.Width, pokemonPictureBox.Height);
|
||||
|
||||
setDirty(false);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user