Removed quote requirement for events
This commit is contained in:
@@ -9,6 +9,7 @@ import arc.graphics.g2d.*;
|
||||
import arc.graphics.g2d.TextureAtlas.*;
|
||||
import arc.math.*;
|
||||
import arc.util.*;
|
||||
import mindustry.game.*;
|
||||
import mindustry.gen.*;
|
||||
import org.reflections.*;
|
||||
import org.reflections.scanners.*;
|
||||
@@ -20,7 +21,7 @@ import java.util.*;
|
||||
|
||||
public class ScriptStubGenerator{
|
||||
|
||||
public static void main(String[] args){
|
||||
public static void main(String[] args) throws Exception{
|
||||
String base = "mindustry";
|
||||
Array<String> blacklist = Array.with("plugin", "mod", "net", "io", "tools");
|
||||
Array<String> nameBlacklist = Array.with("ClassAccess");
|
||||
@@ -63,6 +64,10 @@ public class ScriptStubGenerator{
|
||||
used.add(type.getPackage().getName());
|
||||
}
|
||||
|
||||
for(Class type : EventType.class.getClasses()){
|
||||
result.append("const ").append(type.getSimpleName()).append(" = ").append("Packages.").append(type.getName().replace('$', '.')).append("\n");
|
||||
}
|
||||
|
||||
//Log.info(result);
|
||||
|
||||
new Fi("core/assets/scripts/global.js").writeString(result.toString());
|
||||
|
||||
Reference in New Issue
Block a user