mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-04-24 23:57:12 -05:00
Add slot-set Count update bypass setting
This commit is contained in:
parent
4974371100
commit
4f568b1497
|
|
@ -142,7 +142,8 @@ protected override void SetPKM(PKM pk, bool isParty = false)
|
|||
}
|
||||
|
||||
pk.RefreshChecksum();
|
||||
AddCountAcquired(pk);
|
||||
if (SetUpdateRecords != PKMImportSetting.Skip)
|
||||
AddCountAcquired(pk);
|
||||
}
|
||||
|
||||
private void AddCountAcquired(PKM pk)
|
||||
|
|
|
|||
|
|
@ -183,7 +183,8 @@ protected override void SetPKM(PKM pk, bool isParty = false)
|
|||
pk7.FormArgumentRemain = (byte)GetFormArgument(pk);
|
||||
|
||||
pk.RefreshChecksum();
|
||||
AddCountAcquired(pk);
|
||||
if (SetUpdateRecords != PKMImportSetting.Skip)
|
||||
AddCountAcquired(pk);
|
||||
}
|
||||
|
||||
private void AddCountAcquired(PKM pk)
|
||||
|
|
|
|||
|
|
@ -308,7 +308,8 @@ protected override void SetPKM(PKM pk, bool isParty = false)
|
|||
pb8.Trade(this, now.Day, now.Month, now.Year);
|
||||
|
||||
pb8.RefreshChecksum();
|
||||
AddCountAcquired(pb8);
|
||||
if (SetUpdateRecords != PKMImportSetting.Skip)
|
||||
AddCountAcquired(pk);
|
||||
}
|
||||
|
||||
private void AddCountAcquired(PKM pk)
|
||||
|
|
|
|||
|
|
@ -201,7 +201,8 @@ protected override void SetPKM(PKM pk, bool isParty = false)
|
|||
}
|
||||
|
||||
pk8.RefreshChecksum();
|
||||
AddCountAcquired(pk8);
|
||||
if (SetUpdateRecords != PKMImportSetting.Skip)
|
||||
AddCountAcquired(pk8);
|
||||
}
|
||||
|
||||
private static uint GetFormArgument(PKM pk)
|
||||
|
|
|
|||
|
|
@ -207,7 +207,8 @@ protected override void SetPKM(PKM pk, bool isParty = false)
|
|||
}
|
||||
|
||||
pk9.RefreshChecksum();
|
||||
AddCountAcquired(pk9);
|
||||
if (SetUpdateRecords != PKMImportSetting.Skip)
|
||||
AddCountAcquired(pk9);
|
||||
}
|
||||
|
||||
private static uint GetFormArgument(PKM pk)
|
||||
|
|
|
|||
|
|
@ -318,6 +318,7 @@ public void DeletePartySlot(int slot)
|
|||
#region Slot Storing
|
||||
public static PKMImportSetting SetUpdateDex { 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; }
|
||||
protected abstract PKM GetPKM(byte[] data);
|
||||
|
|
|
|||
|
|
@ -411,8 +411,12 @@ private void ReloadProgramSettings(PKHeXSettings settings)
|
|||
PKME_Tabs.UpdateUnicode(GenderSymbols);
|
||||
SpriteName.AllowShinySprite = settings.Sprite.ShinySprites;
|
||||
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;
|
||||
CommonEdits.ShowdownSetIVMarkings = settings.Import.ApplyMarkings;
|
||||
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)")]
|
||||
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.")]
|
||||
public bool ModifyUnset { get; set; } = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user