You've already forked Arcturus-Morningstar-Extended
mirror of
https://github.com/duckietm/Arcturus-Morningstar-Extended.git
synced 2026-06-20 15:36:17 +00:00
fix(gui): require explicit dashboard autostart
This commit is contained in:
@@ -159,6 +159,7 @@ public final class Emulator {
|
||||
Emulator.config.register("camera.render.delay", "5");
|
||||
Emulator.config.register("hotel.timezone", java.time.ZoneId.systemDefault().getId());
|
||||
Emulator.config.register("gui.enabled", "0");
|
||||
Emulator.config.register("gui.autostart.enabled", "0");
|
||||
String hotelTimezoneId = Emulator.getConfig().getValue("hotel.timezone", java.time.ZoneId.systemDefault().getId());
|
||||
System.out.println(startupCard(hotelTimezoneId));
|
||||
Emulator.texts.register("camera.permission", "You don't have permission to use the camera!");
|
||||
@@ -198,7 +199,7 @@ public final class Emulator {
|
||||
Emulator.isReady = true;
|
||||
Emulator.timeStarted = getIntUnixTimestamp();
|
||||
|
||||
if (Emulator.getConfig().getBoolean("gui.enabled", false)) {
|
||||
if (shouldLaunchGui()) {
|
||||
EmulatorDashboard.launch();
|
||||
}
|
||||
|
||||
@@ -388,6 +389,10 @@ public final class Emulator {
|
||||
}
|
||||
}
|
||||
|
||||
static boolean shouldLaunchGui() {
|
||||
return Emulator.getConfig() != null && Emulator.getConfig().getBoolean("gui.autostart.enabled", false);
|
||||
}
|
||||
|
||||
private static String fit(String value, int width) {
|
||||
String safe = value == null ? "" : value;
|
||||
if (safe.length() > width) {
|
||||
|
||||
Reference in New Issue
Block a user