Fixed certain teams not attacking other units

This commit is contained in:
Anuken
2020-09-05 15:03:13 -04:00
parent 09e34da880
commit c483ae2c23
3 changed files with 19 additions and 4 deletions

View File

@@ -11,6 +11,7 @@ import arc.struct.*;
import arc.util.*;
import mindustry.game.*;
import mindustry.gen.*;
import mindustry.net.*;
import java.io.*;
import java.lang.reflect.*;
@@ -41,6 +42,8 @@ public class ScriptMainGenerator{
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()));
classes.add(NetConnection.class);
classes.distinct();
classes.sortComparing(Class::getName);
ObjectSet<String> used = ObjectSet.with();
@@ -53,12 +56,12 @@ public class ScriptMainGenerator{
used.add(type.getPackage().getName());
}
Log.info("Imported @ packages.", used.size);
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());
}