mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-26 14:00:21 +00:00
Add slot-set Count update bypass setting
This commit is contained in:
parent
4974371100
commit
4f568b1497
8 changed files with 20 additions and 7 deletions
|
@ -142,6 +142,7 @@ public abstract class SAV6 : SAV_BEEF, ITrainerStatRecord, ISaveBlock6Core, IReg
|
||||||
}
|
}
|
||||||
|
|
||||||
pk.RefreshChecksum();
|
pk.RefreshChecksum();
|
||||||
|
if (SetUpdateRecords != PKMImportSetting.Skip)
|
||||||
AddCountAcquired(pk);
|
AddCountAcquired(pk);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -183,6 +183,7 @@ public abstract class SAV7 : SAV_BEEF, ITrainerStatRecord, ISaveBlock7Main, IReg
|
||||||
pk7.FormArgumentRemain = (byte)GetFormArgument(pk);
|
pk7.FormArgumentRemain = (byte)GetFormArgument(pk);
|
||||||
|
|
||||||
pk.RefreshChecksum();
|
pk.RefreshChecksum();
|
||||||
|
if (SetUpdateRecords != PKMImportSetting.Skip)
|
||||||
AddCountAcquired(pk);
|
AddCountAcquired(pk);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -308,7 +308,8 @@ public sealed class SAV8BS : SaveFile, ISaveFileRevision, ITrainerStatRecord, IE
|
||||||
pb8.Trade(this, now.Day, now.Month, now.Year);
|
pb8.Trade(this, now.Day, now.Month, now.Year);
|
||||||
|
|
||||||
pb8.RefreshChecksum();
|
pb8.RefreshChecksum();
|
||||||
AddCountAcquired(pb8);
|
if (SetUpdateRecords != PKMImportSetting.Skip)
|
||||||
|
AddCountAcquired(pk);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void AddCountAcquired(PKM pk)
|
private void AddCountAcquired(PKM pk)
|
||||||
|
|
|
@ -201,6 +201,7 @@ public sealed class SAV8SWSH : SaveFile, ISaveBlock8SWSH, ITrainerStatRecord, IS
|
||||||
}
|
}
|
||||||
|
|
||||||
pk8.RefreshChecksum();
|
pk8.RefreshChecksum();
|
||||||
|
if (SetUpdateRecords != PKMImportSetting.Skip)
|
||||||
AddCountAcquired(pk8);
|
AddCountAcquired(pk8);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -207,6 +207,7 @@ public sealed class SAV9SV : SaveFile, ISaveBlock9Main, ISCBlockArray, ISaveFile
|
||||||
}
|
}
|
||||||
|
|
||||||
pk9.RefreshChecksum();
|
pk9.RefreshChecksum();
|
||||||
|
if (SetUpdateRecords != PKMImportSetting.Skip)
|
||||||
AddCountAcquired(pk9);
|
AddCountAcquired(pk9);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -318,6 +318,7 @@ public abstract class SaveFile : ITrainerInfo, IGameValueLimit, IBoxDetailWallpa
|
||||||
#region Slot Storing
|
#region Slot Storing
|
||||||
public static PKMImportSetting SetUpdateDex { protected get; set; } = PKMImportSetting.Update;
|
public static PKMImportSetting SetUpdateDex { protected get; set; } = PKMImportSetting.Update;
|
||||||
public static PKMImportSetting SetUpdatePKM { protected get; set; } = PKMImportSetting.Update;
|
public static PKMImportSetting SetUpdatePKM { protected get; set; } = PKMImportSetting.Update;
|
||||||
|
public static PKMImportSetting SetUpdateRecords { protected get; set; } = PKMImportSetting.Update;
|
||||||
|
|
||||||
public abstract Type PKMType { get; }
|
public abstract Type PKMType { get; }
|
||||||
protected abstract PKM GetPKM(byte[] data);
|
protected abstract PKM GetPKM(byte[] data);
|
||||||
|
|
|
@ -411,8 +411,12 @@ public partial class Main : Form
|
||||||
PKME_Tabs.UpdateUnicode(GenderSymbols);
|
PKME_Tabs.UpdateUnicode(GenderSymbols);
|
||||||
SpriteName.AllowShinySprite = settings.Sprite.ShinySprites;
|
SpriteName.AllowShinySprite = settings.Sprite.ShinySprites;
|
||||||
SpriteBuilderUtil.SpriterPreference = settings.Sprite.SpritePreference;
|
SpriteBuilderUtil.SpriterPreference = settings.Sprite.SpritePreference;
|
||||||
SaveFile.SetUpdateDex = settings.SlotWrite.SetUpdateDex ? PKMImportSetting.Update : PKMImportSetting.Skip;
|
|
||||||
SaveFile.SetUpdatePKM = settings.SlotWrite.SetUpdatePKM ? PKMImportSetting.Update : PKMImportSetting.Skip;
|
var write = settings.SlotWrite;
|
||||||
|
SaveFile.SetUpdateDex = write.SetUpdateDex ? PKMImportSetting.Update : PKMImportSetting.Skip;
|
||||||
|
SaveFile.SetUpdatePKM = write.SetUpdatePKM ? PKMImportSetting.Update : PKMImportSetting.Skip;
|
||||||
|
SaveFile.SetUpdateRecords = write.SetUpdateRecords ? PKMImportSetting.Update : PKMImportSetting.Skip;
|
||||||
|
|
||||||
C_SAV.ModifyPKM = PKME_Tabs.ModifyPKM = settings.SlotWrite.SetUpdatePKM;
|
C_SAV.ModifyPKM = PKME_Tabs.ModifyPKM = settings.SlotWrite.SetUpdatePKM;
|
||||||
CommonEdits.ShowdownSetIVMarkings = settings.Import.ApplyMarkings;
|
CommonEdits.ShowdownSetIVMarkings = settings.Import.ApplyMarkings;
|
||||||
CommonEdits.ShowdownSetBehaviorNature = settings.Import.ApplyNature;
|
CommonEdits.ShowdownSetBehaviorNature = settings.Import.ApplyNature;
|
||||||
|
|
|
@ -383,6 +383,9 @@ public sealed class SlotWriteSettings
|
||||||
[LocalizedDescription("Automatically adapt the PKM Info to the Save File (Handler, Format)")]
|
[LocalizedDescription("Automatically adapt the PKM Info to the Save File (Handler, Format)")]
|
||||||
public bool SetUpdatePKM { get; set; } = true;
|
public bool SetUpdatePKM { get; set; } = true;
|
||||||
|
|
||||||
|
[LocalizedDescription("Automatically increment the Save File's counters for obtained Pokémon (eggs/captures) when injecting a PKM.")]
|
||||||
|
public bool SetUpdateRecords { get; set; } = true;
|
||||||
|
|
||||||
[LocalizedDescription("When enabled and closing/loading a save file, the program will alert if the current save file has been modified without saving.")]
|
[LocalizedDescription("When enabled and closing/loading a save file, the program will alert if the current save file has been modified without saving.")]
|
||||||
public bool ModifyUnset { get; set; } = true;
|
public bool ModifyUnset { get; set; } = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue