From 15641b7f2d0c842055c42d867f3a5bcf10159791 Mon Sep 17 00:00:00 2001 From: Anuken Date: Fri, 7 Aug 2026 23:26:09 -0400 Subject: [PATCH] Minor cleanup & JSON mod folder loading fix --- .../workflows/gradle-wrapper-validation.yml | 2 +- core/src/mindustry/ClientLauncher.java | 15 +++++++------- core/src/mindustry/mod/Mods.java | 20 +++++++++++-------- gradle.properties | 2 +- 4 files changed, 21 insertions(+), 18 deletions(-) diff --git a/.github/workflows/gradle-wrapper-validation.yml b/.github/workflows/gradle-wrapper-validation.yml index d8bd20638f..6d55eb1d6c 100644 --- a/.github/workflows/gradle-wrapper-validation.yml +++ b/.github/workflows/gradle-wrapper-validation.yml @@ -7,4 +7,4 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - - uses: gradle/wrapper-validation-action@v2 + - uses: gradle/actions/wrapper-validation@v3 diff --git a/core/src/mindustry/ClientLauncher.java b/core/src/mindustry/ClientLauncher.java index 9039e60e06..70fb6a43b7 100644 --- a/core/src/mindustry/ClientLauncher.java +++ b/core/src/mindustry/ClientLauncher.java @@ -68,19 +68,18 @@ public abstract class ClientLauncher extends ApplicationCore implements Platform if(gl30 == null && !isIntel) Log.warn("[GL] Your device or video drivers do not support OpenGL 3. This will cause performance issues."); - if(NvGpuInfo.hasMemoryInfo()) Log.info("[GL] Total available VRAM: @mb", NvGpuInfo.getMaxMemoryKB()/1024); + if(NvGpuInfo.hasMemoryInfo()) Log.info("[GL] Total available VRAM: @", Strings.formatByteCount(NvGpuInfo.getMaxMemoryKB() * 1000L)); if(maxTextureSize < 4096) Log.warn("[GL] Your maximum texture size is below the recommended minimum of 4096. This will cause severe performance issues."); Log.info("[JAVA] Version: @", OS.javaVersion); - if(Core.app.isAndroid()){ - Log.info("[ANDROID] API level: @", Core.app.getVersion()); - } + + if(Core.app.isAndroid()) Log.info("[ANDROID] API level: @", Core.app.getVersion()); + if(Core.app.isIOS()) Log.info("[iOS] OS version: @", Core.app.getVersion()); + long ram = Runtime.getRuntime().maxMemory(); - boolean gb = ram >= 1024 * 1024 * 1024; - if(!OS.isIos){ - Log.info("[RAM] Available: @ @", Strings.fixed(gb ? ram / 1024f / 1024 / 1024f : ram / 1024f / 1024f, 1), gb ? "GB" : "MB"); - } + + if(!OS.isIos) Log.info("[RAM] Available: @", Strings.formatByteCount(ram)); Time.setDeltaProvider(() -> { float result = Core.graphics.getDeltaTime() * 60f; diff --git a/core/src/mindustry/mod/Mods.java b/core/src/mindustry/mod/Mods.java index 7a33c39580..9ce418cab9 100644 --- a/core/src/mindustry/mod/Mods.java +++ b/core/src/mindustry/mod/Mods.java @@ -875,15 +875,19 @@ public class Mods implements Loadable{ Fi contentRoot = mod.root.child("content"); for(ContentType type : ContentType.all){ String lower = type.name().toLowerCase(Locale.ROOT); - Fi folder = contentRoot.child(lower + (lower.endsWith("s") ? "" : "s")); - if(folder.exists()){ - for(Fi file : folder.findAll(f -> f.extension().equals("json") || f.extension().equals("hjson"))){ + //search both the proper folder name (e.g. "weather", "statuses") and the old nonsensical folder names ("weathers", "status") + Fi[] folders = {contentRoot.child(lower + (lower.endsWith("s") ? "" : "s")), contentRoot.child(type.folderName)}; - //if this is part of the ordered content, put it aside to be dealt with later - if(orderSet != null && orderSet.contains(file.nameWithoutExtension())){ - orderedContent.put(file.nameWithoutExtension(), new LoadRun(type, file, mod)); - }else{ - unorderedContent.add(new LoadRun(type, file, mod)); + for(Fi folder : folders){ + if(folder.exists()){ + for(Fi file : folder.findAll(f -> f.extEquals("json") || f.extEquals("hjson"))){ + + //if this is part of the ordered content, put it aside to be dealt with later + if(orderSet != null && orderSet.contains(file.nameWithoutExtension())){ + orderedContent.put(file.nameWithoutExtension(), new LoadRun(type, file, mod)); + }else{ + unorderedContent.add(new LoadRun(type, file, mod)); + } } } } diff --git a/gradle.properties b/gradle.properties index 638dcb2fdf..9689313b69 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=33cbf6381b +archash=e0b1b97768