From 014f23c7a0df17e5b4625aefab7c6e4ae44a04cc Mon Sep 17 00:00:00 2001 From: Anuken Date: Sun, 5 Jul 2026 14:01:04 -0400 Subject: [PATCH] v9 setup (no, there is no new content) --- build.gradle | 4 ++-- core/src/mindustry/Vars.java | 2 +- core/src/mindustry/core/Control.java | 30 +++++++++++++++++++++++++++- gradle.properties | 2 +- 4 files changed, 33 insertions(+), 5 deletions(-) diff --git a/build.gradle b/build.gradle index 83af20dcca..c560efff88 100644 --- a/build.gradle +++ b/build.gradle @@ -38,8 +38,8 @@ allprojects{ group = 'com.github.Anuken' ext{ - versionNumber = '8' - if(!project.hasProperty("versionModifier")) versionModifier = 'release' + versionNumber = '9' + if(!project.hasProperty("versionModifier")) versionModifier = 'alpha' if(!project.hasProperty("versionType")) versionType = 'official' appName = 'Mindustry' steamworksVersion = '0b86023401880bb5e586bc404bedbaae9b1f1c94' diff --git a/core/src/mindustry/Vars.java b/core/src/mindustry/Vars.java index dd0ea1d149..6ccc8e5a35 100644 --- a/core/src/mindustry/Vars.java +++ b/core/src/mindustry/Vars.java @@ -52,7 +52,7 @@ public class Vars implements Loadable{ /** Min game version for all mods. */ public static final int minModGameVersion = 136; /** Min game version for java mods specifically - this is higher, as Java mods have more breaking changes. */ - public static final int minJavaModGameVersion = 154; + public static final int minJavaModGameVersion = 159; /** If true, a button to view sector submission threads is shown. */ public static boolean showSectorSubmissions = false; /** If true, the BE server list is always used. */ diff --git a/core/src/mindustry/core/Control.java b/core/src/mindustry/core/Control.java index 557351b094..13e1138861 100644 --- a/core/src/mindustry/core/Control.java +++ b/core/src/mindustry/core/Control.java @@ -8,6 +8,7 @@ import arc.input.*; import arc.math.*; import arc.scene.style.*; import arc.scene.ui.*; +import arc.scene.ui.layout.*; import arc.struct.*; import arc.util.*; import mindustry.*; @@ -73,12 +74,39 @@ public class Control implements ApplicationListener, Loadable{ //show dialog saying that mod loading was skipped. Events.on(ClientLoadEvent.class, e -> { + checkAutoUnlocks(); + if(Vars.mods.skipModLoading() && Vars.mods.list().any()){ Time.runTask(4f, () -> { ui.showInfo("@mods.initfailed"); }); } - checkAutoUnlocks(); + + Time.runTask(5f, () -> { + String key = "v9-warning-alpha1"; + + if(!settings.getBool(key)){ + //I am not bothering to localize this since it will be removed and rewritten eventually + BaseDialog diag = new BaseDialog("Alpha Version Warning"); + diag.cont.add( + """ + You are playing the [accent]alpha[] version of Mindustry v9. There is [accent]no new content[], only internal changes. + + You will experience crashes and other unstable behavior. Most Java mods will not work. + + Save data may randomly get deleted or corrupted. [accent]Make sure you back up your save before playing.[] + Unless you know what you're doing, play the stable (v8) version instead. + """).growX().maxWidth(Math.min(graphics.getWidth() / Scl.scl(1f), 600f)).labelAlign(Align.center); + diag.cont.row(); + diag.cont.check("@dontshowagain", v -> settings.put(key, v)); + + diag.buttons.button("@ok", Icon.ok, () -> { + diag.hide(); + }).size(200f, 64f); + + diag.show(); + } + }); }); Events.on(StateChangeEvent.class, event -> { diff --git a/gradle.properties b/gradle.properties index 35dba5583e..64f2cd484f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -26,4 +26,4 @@ org.gradle.caching=true org.gradle.internal.http.socketTimeout=100000 org.gradle.internal.http.connectionTimeout=100000 android.enableR8.fullMode=false -archash=359e2b01bf +archash=18e528df02