From bf023781d2a6069c5435239ed9ad09e32a5fdcdc Mon Sep 17 00:00:00 2001 From: Downforce Agent Date: Tue, 9 Jul 2024 23:39:59 -0500 Subject: [PATCH] add forceNag for future setup screen rework --- firestar/src/main/java/Bert.java | 2 +- firestar/src/main/java/Kermit.java | 6 +++++- firestar/src/main/java/MissPiggy.java | 8 ++++++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/firestar/src/main/java/Bert.java b/firestar/src/main/java/Bert.java index 7a56a0e..1cb832d 100644 --- a/firestar/src/main/java/Bert.java +++ b/firestar/src/main/java/Bert.java @@ -177,7 +177,7 @@ public class Bert implements ActionListener { } else if (type == Main.ArcTarget.ADDON_HD) { extracted = "addcont/PCSA00015/DLC1W2048PACKAGE"; name = "dlc1.psarc"; - } else if (type == Main.ArcTarget.ADDON_HD_FURY) { + } else if (type == Main.ArcTarget.ADDON_HD_FURY) { // this is not "always true" - intellij is actually very dumj extracted = "addcont/PCSA00015/DLC2W2048PACKAGE"; name = "dlc2.psarc"; } else { diff --git a/firestar/src/main/java/Kermit.java b/firestar/src/main/java/Kermit.java index a64eb3f..9b71751 100644 --- a/firestar/src/main/java/Kermit.java +++ b/firestar/src/main/java/Kermit.java @@ -132,7 +132,11 @@ public class Kermit implements ActionListener { changePage(Pages.DONE); break; case DONE: - new MissPiggy().Action(); + if (new File(Main.inpath + "psp2psarc.exe").exists()) { // we may have been here before + new MissPiggy().Action(false); + } else { + new MissPiggy().Action(true); + } page = Pages.AGREEMENT; //set it here since we're disposing of the entire thing frame.dispose(); diff --git a/firestar/src/main/java/MissPiggy.java b/firestar/src/main/java/MissPiggy.java index c85ba2c..765c65b 100644 --- a/firestar/src/main/java/MissPiggy.java +++ b/firestar/src/main/java/MissPiggy.java @@ -79,8 +79,12 @@ public class MissPiggy implements ActionListener { public boolean listenersAlreadySet = false; // was written to troubleshoot a bug but this wasn't actually the cause + public void Action() { + Action(false); + } + // Initialize the main window - public void Action(/*Main entryPoint*/) { + public void Action(boolean forceNag) { System.out.println("Main window created"); System.out.println("Loading program configuration"); Main.loadConf(this); @@ -177,7 +181,7 @@ public class MissPiggy implements ActionListener { frame.setLayout(new GridLayout()); frame.setLocationRelativeTo(null); - if (Main.confvint == 0){ // nag + if (Main.confvint == 0 || forceNag){ // nag int result = JOptionPane.showConfirmDialog(frame, "Firestar needs to download additional software to function. Setup is automatic and will only take a few minutes.\nIf you select NO, you will have to download additional dependencies later on.\n\nContinue?", "Firestar Setup", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); if (result == JOptionPane.YES_OPTION) { Thread downloaderPopupThread = new Thread(new Runnable() {