mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-25 21:40:21 +00:00
Add setting to retain met date on 4->5 transfer
This commit is contained in:
parent
093264bc24
commit
9ff94455b9
4 changed files with 13 additions and 3 deletions
|
@ -316,9 +316,9 @@ public sealed class PK4 : G4PKM
|
|||
{
|
||||
JunkByte = 0,
|
||||
OriginalTrainerFriendship = 70,
|
||||
// Apply new met date
|
||||
MetDate = EncounterDate.GetDateNDS(),
|
||||
};
|
||||
if (!EntityConverter.RetainMetDateTransfer45)
|
||||
EncounterDate.GetDateNDS(); // Apply new met date
|
||||
pk5.HeldMail.Clear();
|
||||
|
||||
// Arceus Type Changing -- Plate forcibly removed.
|
||||
|
@ -327,7 +327,7 @@ public sealed class PK4 : G4PKM
|
|||
pk5.Form = 0;
|
||||
pk5.HeldItem = 0;
|
||||
}
|
||||
else if (Array.IndexOf(Legal.HeldItems_BW, (ushort)HeldItem) == -1)
|
||||
else if (!Legal.HeldItems_BW.AsSpan().Contains((ushort)HeldItem))
|
||||
{
|
||||
pk5.HeldItem = 0; // if valid, it's already copied
|
||||
}
|
||||
|
|
|
@ -51,6 +51,12 @@ public static class EntityConverter
|
|||
set => _vc2 = (value is GD or SI or C) ? value : SI;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retain the Met Date when transferring from Gen4 to Gen5.
|
||||
/// </summary>
|
||||
/// <remarks>Default behavior is to update it with a new date based on the time of transfer.</remarks>
|
||||
public static bool RetainMetDateTransfer45 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Checks if the input <see cref="PKM"/> file is capable of being converted to the desired format.
|
||||
/// </summary>
|
||||
|
|
|
@ -433,6 +433,7 @@ public partial class Main : Form
|
|||
EntityConverter.RejuvenateHOME = converter.AllowGuessRejuvenateHOME;
|
||||
EntityConverter.VirtualConsoleSourceGen1 = converter.VirtualConsoleSourceGen1;
|
||||
EntityConverter.VirtualConsoleSourceGen2 = converter.VirtualConsoleSourceGen2;
|
||||
EntityConverter.RetainMetDateTransfer45 = converter.RetainMetDateTransfer45;
|
||||
|
||||
SpriteBuilder.LoadSettings(settings.Sprite);
|
||||
}
|
||||
|
|
|
@ -259,6 +259,9 @@ public sealed class EntityConverterSettings
|
|||
|
||||
[LocalizedDescription("Default version to set when transferring from Generation 2 3DS Virtual Console to Generation 7.")]
|
||||
public GameVersion VirtualConsoleSourceGen2 { get; set; } = GameVersion.SI;
|
||||
|
||||
[LocalizedDescription("Retain the Met Date when transferring from Generation 4 to Generation 5.")]
|
||||
public bool RetainMetDateTransfer45 { get; set; }
|
||||
}
|
||||
|
||||
public sealed class AdvancedSettings
|
||||
|
|
Loading…
Reference in a new issue