From bba41efb2804a109b75ed16225b3cc4c7be2a0b2 Mon Sep 17 00:00:00 2001 From: Anuken Date: Mon, 21 Oct 2024 12:23:26 -0400 Subject: [PATCH] More JS package conflict fixes --- core/assets/scripts/global.js | 1 + tools/src/mindustry/tools/ScriptMainGenerator.java | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/core/assets/scripts/global.js b/core/assets/scripts/global.js index 16c1ee106e..d91fe9950c 100755 --- a/core/assets/scripts/global.js +++ b/core/assets/scripts/global.js @@ -44,6 +44,7 @@ function extend(/*Base, ..., def*/){ importPackage(Packages.arc) importPackage(Packages.arc.audio) importPackage(Packages.arc.files) +importPackage(Packages.arc.flabel) importPackage(Packages.arc.func) importPackage(Packages.arc.graphics) importPackage(Packages.arc.graphics.g2d) diff --git a/tools/src/mindustry/tools/ScriptMainGenerator.java b/tools/src/mindustry/tools/ScriptMainGenerator.java index e0e5bcc6ff..4b0fdac9e5 100644 --- a/tools/src/mindustry/tools/ScriptMainGenerator.java +++ b/tools/src/mindustry/tools/ScriptMainGenerator.java @@ -24,7 +24,7 @@ public class ScriptMainGenerator{ public static void main(String[] args) throws Exception{ String base = "mindustry"; - Seq blacklist = Seq.with("tools"); + Seq blacklist = Seq.with("tools", "arc.flabel.effects"); Seq nameBlacklist = Seq.with(); Seq> whitelist = Seq.with(Draw.class, Fill.class, Lines.class, Core.class, TextureAtlas.class, TextureRegion.class, Time.class, System.class, PrintStream.class, AtlasRegion.class, String.class, Mathf.class, Angles.class, Color.class, Runnable.class, Object.class, Icon.class, Tex.class, Shader.class, @@ -42,13 +42,14 @@ public class ScriptMainGenerator{ getClasses("arc.input"), getClasses("arc.util"), getClasses("arc.files"), + getClasses("arc.flabel"), getClasses("arc.struct") ); classes.addAll(whitelist); classes.sort(Structs.comparing(Class::getName)); classes.removeAll(type -> type.isSynthetic() || type.isAnonymousClass() || type.getCanonicalName() == null || Modifier.isPrivate(type.getModifiers()) - || blacklist.contains(s -> type.getName().startsWith(base + "." + s + ".")) || nameBlacklist.contains(type.getSimpleName())); + || blacklist.contains(s -> type.getName().startsWith(base + "." + s + ".")) || nameBlacklist.contains(type.getSimpleName()) || blacklist.contains(type.getPackage().getName())); classes.add(NetConnection.class, SaveIO.class, SystemCursor.class); classes.distinct();