Check for missing ExeFS or main executable in SWSH shiny editor (#216)

* Fix Shiny Rate Editor

This fixes the broken shiny rate editor that hasn't been re-implemented.

* Check for missing ExeFS or `main` executable in SWSH shiny editor
This commit is contained in:
Philip Woolford
2022-09-11 04:08:27 +09:30
committed by GitHub
parent 4272253790
commit d692d957d4

View File

@@ -112,7 +112,17 @@ public void NotWorking_EditMoves()
public void EditShinyRate()
{
if (ROM.PathExeFS == null) {
WinFormsUtil.Alert("ExeFS not detected.");
return;
}
var path = Path.Combine(ROM.PathExeFS, "main");
if (!File.Exists(path)) {
WinFormsUtil.Alert("Not able to find `main` file in ExeFS.");
return;
}
var data = FileMitm.ReadAllBytes(path);
var nso = new NSO(data);