add post fscript support and change input to fileinput on rizzo

This commit is contained in:
Wirlaburla 2024-07-21 18:36:24 -05:00
parent 1abe9519c8
commit 7b7d4a206e
3 changed files with 11 additions and 2 deletions

View File

@ -170,7 +170,7 @@ public class Gonzo {
File fscript = new File(Main.inpath + "temp/fscript");
if (fscript.exists()) {
new Rizzo(fscript, Main.inpath + "temp/"); // Lets rizz this mod up
new Rizzo(new FileInputStream(fscript), Main.inpath + "temp/"); // Lets rizz this mod up
}
if (new File(System.getProperty("user.home") + "/.firestar/temp/delete.txt").isFile()) {
@ -214,6 +214,13 @@ public class Gonzo {
}
}
}
// Post fscript changes
try (InputStream is = Main.class.getResourceAsStream("/post.fscript")) {
new Rizzo(is, Main.inpath + "temp/");
} catch (IOException ex) {
Logger.getLogger(Gonzo.class.getName()).log(Level.SEVERE, null, ex);
}
// create a list of the contents of data/ for psp2psarc.exe to read from
List<String> oFilesList = new ArrayList<String>();

View File

@ -59,7 +59,7 @@ public class Rizzo {
private int ver = 1;
private String workingDir;
public Rizzo(File infile, String workingDir) throws FileNotFoundException, FirescriptFormatException {
public Rizzo(FileInputStream infile, String workingDir) throws FileNotFoundException, FirescriptFormatException {
if (!workingDir.endsWith("/")) this.workingDir = workingDir + "/";
else this.workingDir = workingDir;
scanner = new Scanner(infile);

View File

@ -0,0 +1,2 @@
# POST INSTALL FSCRIPT
fscript 1