From 583979ab48e9c954eaee17d169be21756ca2347c Mon Sep 17 00:00:00 2001 From: Downforce Agent Date: Sat, 13 Jul 2024 17:51:32 -0500 Subject: [PATCH] reimplement arc cleanup to be manual --- firestar/src/main/java/Bert.java | 9 ----- firestar/src/main/java/Main.java | 2 ++ firestar/src/main/java/Waldorf.form | 56 +++++++++++++++++++++-------- firestar/src/main/java/Waldorf.java | 13 +++++++ 4 files changed, 57 insertions(+), 23 deletions(-) diff --git a/firestar/src/main/java/Bert.java b/firestar/src/main/java/Bert.java index cbca71b..321ecbe 100644 --- a/firestar/src/main/java/Bert.java +++ b/firestar/src/main/java/Bert.java @@ -99,15 +99,6 @@ public class Bert implements ActionListener { invoker.setEnabled(true); frame.dispose(); } else if (actionEvent.getSource() == downloadbtn) { - int result = JOptionPane.showConfirmDialog(frame, "All existing PSARC dumps will be deleted and replaced by the new ones.\nThis download could take several minutes. Do you want to continue?", "Download Game Assets", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); - if (result == JOptionPane.NO_OPTION) {return;} - System.out.println("User requested download of assets. Deleting existing PSARCs"); - new File(Main.inpath + "data.psarc").delete(); - new File(Main.inpath + "data1.psarc").delete(); - new File(Main.inpath + "data2.psarc").delete(); - new File(Main.inpath + "dlc1.psarc").delete(); - new File(Main.inpath + "dlc2.psarc").delete(); - ArrayList arcs = new ArrayList(); ArrayList keys = new ArrayList(); if (baseCheck.isSelected()) { diff --git a/firestar/src/main/java/Main.java b/firestar/src/main/java/Main.java index 3c4a6bf..e758ece 100644 --- a/firestar/src/main/java/Main.java +++ b/firestar/src/main/java/Main.java @@ -83,6 +83,8 @@ public class Main { public int loaderversion = 0; //minimum required vint or feature level from Firestar public String author; // if null, "Author is unknown." public boolean enabled = true; + public boolean[] requires = new boolean[]{false, false, false, false}; // TODO: load optional "requires" array from mod meta if it exists. it will be base, patches, hd dlc, and fury dlc in that order. + // TODO: save 'true true false false' in ost gen if neccessary (patches change localization) } // Mods diff --git a/firestar/src/main/java/Waldorf.form b/firestar/src/main/java/Waldorf.form index 9e94cf7..49d89bb 100644 --- a/firestar/src/main/java/Waldorf.form +++ b/firestar/src/main/java/Waldorf.form @@ -73,20 +73,6 @@ - - - - - - - - - - - - @@ -187,6 +173,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/firestar/src/main/java/Waldorf.java b/firestar/src/main/java/Waldorf.java index 81ab593..508fc3b 100644 --- a/firestar/src/main/java/Waldorf.java +++ b/firestar/src/main/java/Waldorf.java @@ -41,6 +41,7 @@ public class Waldorf implements ActionListener { private JButton dwnARCbtn; private JButton fOutpathChangebtn; private JCheckBox checkUpdatesToggle; + private JButton bDelArcs; MissPiggy invoker; private String tOutPath = Main.outpath; @@ -68,6 +69,7 @@ public class Waldorf implements ActionListener { okbtn.addActionListener(this); resetbtn.addActionListener(this); bOpenFolder.addActionListener(this); + bDelArcs.addActionListener(this); dwnARCbtn.addActionListener(this); dwnSDKbtn.addActionListener(this); fOutpathChangebtn.addActionListener(this); @@ -125,6 +127,17 @@ public class Waldorf implements ActionListener { throw new RuntimeException(e); } } else + if (actionEvent.getSource() == bDelArcs) { + int result = JOptionPane.showConfirmDialog(frame, "All existing PSARC dumps will be deleted.\nDo you want to continue?", "Delete PSARCs", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE); + if (result == JOptionPane.NO_OPTION) {return;} + System.out.println("User requested arc wipe, deleting existing PSARCs"); + new File(Main.inpath + "data.psarc").delete(); + new File(Main.inpath + "data1.psarc").delete(); + new File(Main.inpath + "data2.psarc").delete(); + new File(Main.inpath + "dlc1.psarc").delete(); + new File(Main.inpath + "dlc2.psarc").delete(); + JOptionPane.showMessageDialog(frame, "PSARC files purged.", "Delete PSARCs", JOptionPane.INFORMATION_MESSAGE); + } else if (actionEvent.getSource() == dwnARCbtn) { new Bert(invoker.frame); frame.dispose();