begin basic object structure and configuration i/o

This commit is contained in:
Downforce Agent 2024-04-10 03:49:21 -05:00
parent 0aae30f60e
commit a74ce96920
3 changed files with 37 additions and 4 deletions

View File

@ -50,7 +50,7 @@ public class Kermit implements ActionListener {
}
}
JDialog frame = new JDialog();;
JDialog frame = new JDialog();
JButton button = new JButton("Next");
JButton button2 = new JButton("Quit");
JButton button3 = new JButton("Cancel");

View File

@ -21,19 +21,35 @@ import org.json.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.*;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.List;
import javax.swing.*;
public class Main {
public static String vstr = "debug";
public static String vcode = "Natasha";
public static int vint = 0;
// Build Information
public static final String vstr = "debug";
public static final String vcode = "Natasha";
public static final int vint = 0;
// User Settings
public static String outpath; //game assets location
public static String inpath = System.getProperty("user.home") + "/.firestar/"; //game assets location
public static boolean repatch; //are we in compat mode?
public static boolean wine; //are we on Linux, MINIX, BSD?
//public static String psarc; //sdk location
public class Mod {
public String path;
public int version = 1;
//public int gameversion; //TODO detect a game version and compatibility? // no
public int priority = 0;
public String friendlyName;
}
// Mods
public static List<Mod> Mods;
public static void main(String[] args) {
// license string
System.out.printf("FIRESTAR MOD MANAGER for WipEout 2048\nversion " + vstr + " (codename " + vcode + ")\n" +
@ -63,7 +79,19 @@ public class Main {
}
public static void writeConf(){
JSONObject container = new JSONObject();
container.put("version", vint);
container.put("2048path", outpath);
container.put("HDpath", "TODO"); // proposed hd/fury support for ps3, will use very simplified Fast Mode due to less difficulty installing
container.put("safemode", repatch);
container.put("isUnix", wine);
container.put("currentPlaylist", "TODO"); // proposed feature: store separate mod lists in lists/ to load/save later?
try {
Files.write(Paths.get(System.getProperty("user.home") + "/.firestar/firestar.conf"), container.toString().getBytes());
} catch (IOException e) {
throw new RuntimeException(e);
}
}
public static void loadConf(){

View File

@ -16,9 +16,14 @@
* along with this program. If not, see https://www.gnu.org/licenses/.
*/
import javax.swing.*;
public class MissPiggy {
JDialog frame = new JDialog();
public void MissPiggy() {
// todo construct contents
// todo display modlist
}
}