Better access

This commit is contained in:
Anuken
2019-11-30 17:45:02 -05:00
parent 57f9aeee86
commit 3abcdf2063
5 changed files with 13 additions and 7 deletions

View File

@@ -24,7 +24,7 @@ public class ScriptStubGenerator{
"import io.anuke.arc.collection.*;\n" +
"//obviously autogenerated, do not touch\n" +
"class ClassAccess{\n" +
"\tstatic final Array<Class<?>> allowedClasses = Array.with($ALLOWED_CLASSES$);\n" +
//"\tstatic final Array<Class<?>> allowedClasses = Array.with($ALLOWED_CLASSES$);\n" +
"\tstatic final ObjectSet<String> allowedClassNames = ObjectSet.with($ALLOWED_CLASS_NAMES$);\n" +
"}";
@@ -50,6 +50,8 @@ public class ScriptStubGenerator{
result.append("const ").append(type.getSimpleName()).append(" = ").append("Java.type('").append(type.getCanonicalName()).append("')\n");
}
result.append("\n").append(new FileHandle("core/assets/scripts/base.js").readString()).append("\n");
//Log.info(result);
new FileHandle("core/assets/scripts/global.js").writeString(result.toString());