mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-26 22:10:21 +00:00
Add prompt for loading new save with unsaved changes
Closes #2823 remove old gen6 powersaves decrypted-xorpad strings (unused logic) remove gen8 save fixing beta-pkhex-caused corruption (behaved for 6months)
This commit is contained in:
parent
d8cd75908b
commit
c4326698a5
10 changed files with 18 additions and 31 deletions
|
@ -4,6 +4,7 @@ MsgProgramIllegalModeActive = Illegal mode activated.
|
|||
MsgProgramUpdateAvailable = New Update Available!
|
||||
MsgProgramCloseUnsaved = Any unsaved changes will be lost.
|
||||
MsgProgramCloseConfirm = Are you sure you want to close PKHeX?
|
||||
MsgProgramSaveFileConfirm = Are you sure you want to load a new save file?
|
||||
MsgProgramError = ERROR
|
||||
MsgProgramErrorExpectedHex = Expected Text containing only the following characters (0-9, A-F).
|
||||
MsgSettingsLoadFail = Unable to load settings.
|
||||
|
@ -30,8 +31,6 @@ MsgFileLoadFailAutoCause = This is likely caused by Homebrew creating invalid fi
|
|||
MsgFileLoadVersionDetect = Generation {0} Save File detected.
|
||||
MsgFileLoadEncrypted = PKHeX only edits decrypted save files.
|
||||
MsgFileLoadEncryptedFail = This save file is not decrypted.
|
||||
MsgFileLoadXorpad1 = Press Yes to load the sav at 0x3000.
|
||||
MsgFileLoadXorpad2 = Press No to load the sav at 0x82000.
|
||||
MsgFileLoadIncompatible = Binary is not compatible with save file.
|
||||
MsgFileLoadSaveFail = The data file is not a valid save file.
|
||||
MsgFileLoadSaveLoadFail = Invalid save file loaded. Aborting.
|
||||
|
|
|
@ -4,6 +4,7 @@ MsgProgramIllegalModeActive = Illegal mode activated.
|
|||
MsgProgramUpdateAvailable = New Update Available!
|
||||
MsgProgramCloseUnsaved = Any unsaved changes will be lost.
|
||||
MsgProgramCloseConfirm = Are you sure you want to close PKHeX?
|
||||
MsgProgramSaveFileConfirm = Are you sure you want to load a new save file?
|
||||
MsgProgramError = ERROR
|
||||
MsgProgramErrorExpectedHex = Expected Text containing only the following characters (0-9, A-F).
|
||||
MsgSettingsLoadFail = Unable to load settings.
|
||||
|
@ -30,8 +31,6 @@ MsgFileLoadFailAutoCause = This is likely caused by Homebrew creating invalid fi
|
|||
MsgFileLoadVersionDetect = Generation {0} Save File detected.
|
||||
MsgFileLoadEncrypted = PKHeX only edits decrypted save files.
|
||||
MsgFileLoadEncryptedFail = This save file is not decrypted.
|
||||
MsgFileLoadXorpad1 = Press Yes to load the sav at 0x3000.
|
||||
MsgFileLoadXorpad2 = Press No to load the sav at 0x82000.
|
||||
MsgFileLoadIncompatible = Binary is not compatible with save file.
|
||||
MsgFileLoadSaveFail = The data file is not a valid save file.
|
||||
MsgFileLoadSaveLoadFail = Invalid save file loaded. Aborting.
|
||||
|
|
|
@ -4,6 +4,7 @@ MsgProgramIllegalModeActive = Modo Ilegal activado.
|
|||
MsgProgramUpdateAvailable = ¡Actualización disponible!
|
||||
MsgProgramCloseUnsaved = Cualquier cambio no guardado se perderá.
|
||||
MsgProgramCloseConfirm = ¿Estás seguro de que quieres cerrar PKHeX?
|
||||
MsgProgramSaveFileConfirm = Are you sure you want to load a new save file?
|
||||
MsgProgramError = ERROR
|
||||
MsgProgramErrorExpectedHex = Se esperaba texto conteniendo solamente los siguiente caracteres (0-9, A-F).
|
||||
MsgSettingsLoadFail = No se ha podido cargar la configuración.
|
||||
|
@ -30,8 +31,6 @@ MsgFileLoadFailAutoCause = Esto parece ser causado por el Homebrew creando nobre
|
|||
MsgFileLoadVersionDetect = Archivo de guardado de la Generación {0} detectado.
|
||||
MsgFileLoadEncrypted = PKHeX solo edita archivos de guardado desencriptados.
|
||||
MsgFileLoadEncryptedFail = Este archivo de guardado no está desencriptado.
|
||||
MsgFileLoadXorpad1 = Pulsa Sí para cargar el sav en 0x3000.
|
||||
MsgFileLoadXorpad2 = Pulsa No para cargar el sav en 0x82000.
|
||||
MsgFileLoadIncompatible = Binario no es compatible con el archivo de guardado.
|
||||
MsgFileLoadSaveFail = El archivo de datos no es archivo de guardado válido.
|
||||
MsgFileLoadSaveLoadFail = Archivo de guardado no válido cargado. Abortando.
|
||||
|
|
|
@ -4,6 +4,7 @@ MsgProgramIllegalModeActive = Mode illégal activé.
|
|||
MsgProgramUpdateAvailable = Nouvelle mise à jour disponible !
|
||||
MsgProgramCloseUnsaved = Tout changement non sauvegardé sera perdu.
|
||||
MsgProgramCloseConfirm = Êtes-vous sûr de vouloir fermer PKHeX ?
|
||||
MsgProgramSaveFileConfirm = Are you sure you want to load a new save file ?
|
||||
MsgProgramError = Erreur
|
||||
MsgProgramErrorExpectedHex = Le texte ne doit contenir que les caractères suivants (0-9, A-F).
|
||||
MsgSettingsLoadFail = Impossible de charger les paramètres.
|
||||
|
@ -30,8 +31,6 @@ MsgFileLoadFailAutoCause = This is likely caused by Homebrew creating invalid fi
|
|||
MsgFileLoadVersionDetect = Fichier de sauvegarde de génération {0} détecté.
|
||||
MsgFileLoadEncrypted = PKHeX n'édite que des fichiers de sauvegarde décryptés.
|
||||
MsgFileLoadEncryptedFail = Cette sauvegarde n'est pas décryptée.
|
||||
MsgFileLoadXorpad1 = Appuyer sur Oui pour charger la sav à l'emplacement 0x3000.
|
||||
MsgFileLoadXorpad2 = Appuyer sur Non pour charger la sav à l'emplacement 0x2000.
|
||||
MsgFileLoadIncompatible = Binary is not compatible with save file.
|
||||
MsgFileLoadSaveFail = Le fichier n'est pas une sauvegarde valide.
|
||||
MsgFileLoadSaveLoadFail = Sauvegarde invalide chargée. Abandon.
|
||||
|
|
|
@ -4,6 +4,7 @@ MsgProgramIllegalModeActive = Illegal mode activated.
|
|||
MsgProgramUpdateAvailable = New Update Available!
|
||||
MsgProgramCloseUnsaved = Any unsaved changes will be lost.
|
||||
MsgProgramCloseConfirm = Are you sure you want to close PKHeX?
|
||||
MsgProgramSaveFileConfirm = Are you sure you want to load a new save file?
|
||||
MsgProgramError = ERROR
|
||||
MsgProgramErrorExpectedHex = Expected Text containing only the following characters (0-9, A-F).
|
||||
MsgSettingsLoadFail = Unable to load settings.
|
||||
|
@ -30,8 +31,6 @@ MsgFileLoadFailAutoCause = This is likely caused by Homebrew creating invalid fi
|
|||
MsgFileLoadVersionDetect = Generation {0} Save File detected.
|
||||
MsgFileLoadEncrypted = PKHeX only edits decrypted save files.
|
||||
MsgFileLoadEncryptedFail = This save file is not decrypted.
|
||||
MsgFileLoadXorpad1 = Press Yes to load the sav at 0x3000.
|
||||
MsgFileLoadXorpad2 = Press No to load the sav at 0x82000.
|
||||
MsgFileLoadIncompatible = Binary is not compatible with save file.
|
||||
MsgFileLoadSaveFail = The data file is not a valid save file.
|
||||
MsgFileLoadSaveLoadFail = Invalid save file loaded. Aborting.
|
||||
|
|
|
@ -4,6 +4,7 @@ MsgProgramIllegalModeActive = Illegal mode activated.
|
|||
MsgProgramUpdateAvailable = New Update Available!
|
||||
MsgProgramCloseUnsaved = Any unsaved changes will be lost.
|
||||
MsgProgramCloseConfirm = Are you sure you want to close PKHeX?
|
||||
MsgProgramSaveFileConfirm = Are you sure you want to load a new save file?
|
||||
MsgProgramError = ERROR
|
||||
MsgProgramErrorExpectedHex = Expected Text containing only the following characters (0-9, A-F).
|
||||
MsgSettingsLoadFail = Unable to load settings.
|
||||
|
@ -30,8 +31,6 @@ MsgFileLoadFailAutoCause = This is likely caused by Homebrew creating invalid fi
|
|||
MsgFileLoadVersionDetect = Generation {0} Save File detected.
|
||||
MsgFileLoadEncrypted = PKHeX only edits decrypted save files.
|
||||
MsgFileLoadEncryptedFail = This save file is not decrypted.
|
||||
MsgFileLoadXorpad1 = Press Yes to load the sav at 0x3000.
|
||||
MsgFileLoadXorpad2 = Press No to load the sav at 0x82000.
|
||||
MsgFileLoadIncompatible = Binary is not compatible with save file.
|
||||
MsgFileLoadSaveFail = The data file is not a valid save file.
|
||||
MsgFileLoadSaveLoadFail = Invalid save file loaded. Aborting.
|
||||
|
|
|
@ -4,6 +4,7 @@ MsgProgramIllegalModeActive = 불법 모드를 사용합니다.
|
|||
MsgProgramUpdateAvailable = 새 업데이트가 있습니다!
|
||||
MsgProgramCloseUnsaved = 저장하지 않은 변경 사항은 손실됩니다.
|
||||
MsgProgramCloseConfirm = 정말 PKHeX를 종료하시겠습니까?
|
||||
MsgProgramSaveFileConfirm = Are you sure you want to load a new save file?
|
||||
MsgProgramError = 오류
|
||||
MsgProgramErrorExpectedHex = 숫자(0-9)와 일부 알파벳(A-F)만 사용할 수 있습니다.
|
||||
MsgSettingsLoadFail = 설정을 불러올 수 없습니다.
|
||||
|
@ -30,8 +31,6 @@ MsgFileLoadFailAutoCause = 홈브류가 이름이 잘못된 파일을 만들었
|
|||
MsgFileLoadVersionDetect = {0}세대 세이브 파일을 감지했습니다.
|
||||
MsgFileLoadEncrypted = PKHeX는 복호화된 세이브 파일만 지원합니다.
|
||||
MsgFileLoadEncryptedFail = 이 세이브 파일은 복호화되어 있지 않습니다.
|
||||
MsgFileLoadXorpad1 = 예를 선택하면 세이브 파일을 0x3000에서 불러옵니다.
|
||||
MsgFileLoadXorpad2 = 아니오를 선택하면 세이브를 0x82000에서 불러옵니다.
|
||||
MsgFileLoadIncompatible = 바이너리가 세이브 파일과 호환되지 않습니다.
|
||||
MsgFileLoadSaveFail = 이 데이터 파일은 정상적인 세이브 파일이 아닙니다.
|
||||
MsgFileLoadSaveLoadFail = 잘못된 세이브 파일을 불러왔습니다. 작업을 중단합니다.
|
||||
|
|
|
@ -4,6 +4,7 @@ MsgProgramIllegalModeActive = 不合法模式启动。
|
|||
MsgProgramUpdateAvailable = 有新版本!
|
||||
MsgProgramCloseUnsaved = 未保存的更改将会丢失。
|
||||
MsgProgramCloseConfirm = 你确定要关闭 PKHeX 吗?
|
||||
MsgProgramSaveFileConfirm = Are you sure you want to load a new save file?
|
||||
MsgProgramError = 错误
|
||||
MsgProgramErrorExpectedHex = 文本仅能包含以下字符(0-9, A-F)。
|
||||
MsgSettingsLoadFail = 无法加载设置。
|
||||
|
@ -30,8 +31,6 @@ MsgFileLoadFailAutoCause = This is likely caused by Homebrew creating invalid fi
|
|||
MsgFileLoadVersionDetect = 检测到第 {0} 世代的存档文件。
|
||||
MsgFileLoadEncrypted = PKHeX 只能编辑解码后的存档文件。
|
||||
MsgFileLoadEncryptedFail = 该存档文件未解码。
|
||||
MsgFileLoadXorpad1 = 按"是"从 0x3000 开始载入存档。
|
||||
MsgFileLoadXorpad2 = 按"否"从 0x82000 开始载入存档。
|
||||
MsgFileLoadIncompatible = 二进制文件与存档不兼容。
|
||||
MsgFileLoadSaveFail = 该文件不是一个有效的存档文件。
|
||||
MsgFileLoadSaveLoadFail = 加载了无效的存档文件。退出中。
|
||||
|
|
|
@ -15,6 +15,7 @@ namespace PKHeX.Core
|
|||
public static string MsgProgramUpdateAvailable { get; set; } = "New Update Available!";
|
||||
public static string MsgProgramCloseUnsaved { get; set; } = "Any unsaved changes will be lost.";
|
||||
public static string MsgProgramCloseConfirm { get; set; } = "Are you sure you want to close PKHeX?";
|
||||
public static string MsgProgramSaveFileConfirm { get; set; } = "Are you sure you want to load a new save file?";
|
||||
public static string MsgProgramError { get; set; } = "ERROR";
|
||||
public static string MsgProgramErrorExpectedHex { get; set; } = "Expected Text containing only the following characters (0-9, A-F).";
|
||||
|
||||
|
@ -51,8 +52,6 @@ namespace PKHeX.Core
|
|||
public static string MsgFileLoadVersionDetect { get; set; } = "Generation {0} Save File detected.";
|
||||
public static string MsgFileLoadEncrypted { get; set; } = "PKHeX only edits decrypted save files.";
|
||||
public static string MsgFileLoadEncryptedFail { get; set; } = "This save file is not decrypted.";
|
||||
public static string MsgFileLoadXorpad1 { get; set; } = "Press Yes to load the sav at 0x3000.";
|
||||
public static string MsgFileLoadXorpad2 { get; set; } = "Press No to load the sav at 0x82000.";
|
||||
public static string MsgFileLoadIncompatible { get; set; } = "Binary is not compatible with save file.";
|
||||
|
||||
public static string MsgFileLoadSaveFail { get; set; } = "The data file is not a valid save file.";
|
||||
|
|
|
@ -716,26 +716,22 @@ namespace PKHeX.WinForms
|
|||
private bool OpenSAV(SaveFile sav, string path)
|
||||
{
|
||||
if (sav == null || sav.Version == GameVersion.Invalid)
|
||||
{
|
||||
// temporary swsh fix for initial release broken saves
|
||||
// remove any time after November
|
||||
if (sav is SAV8SWSH z)
|
||||
{
|
||||
var shift = z.Game + (GameVersion.SW - GameVersion.SN);
|
||||
if (shift == (int) GameVersion.SW || shift == (int) GameVersion.SH)
|
||||
z.Game = shift;
|
||||
}
|
||||
else
|
||||
{
|
||||
WinFormsUtil.Error(MsgFileLoadSaveLoadFail, path);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
sav.SetFileInfo(path);
|
||||
if (!SanityCheckSAV(ref sav))
|
||||
return true;
|
||||
|
||||
if (C_SAV.SAV?.Edited == true && Settings.Default.ModifyUnset)
|
||||
{
|
||||
var prompt = WinFormsUtil.Prompt(MessageBoxButtons.YesNo, MsgProgramCloseUnsaved, MsgProgramSaveFileConfirm);
|
||||
if (prompt != DialogResult.Yes)
|
||||
return true;
|
||||
}
|
||||
|
||||
PKME_Tabs.Focus(); // flush any pending changes
|
||||
StoreLegalSaveGameData(sav);
|
||||
PKMConverter.SetPrimaryTrainer(sav);
|
||||
|
|
Loading…
Reference in a new issue