Merge branch 'master' of https://github.com/Anuken/Mindustry into v105
23
.github/workflows/gradle.yml
vendored
@@ -3,15 +3,26 @@ name: Java CI
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
buildJava8:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Set up JDK 1.8
|
||||
- name: Set up JDK 8
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 1.8
|
||||
#- name: Run unit tests with gradle
|
||||
# run: ./gradlew test
|
||||
java-version: 8
|
||||
- name: Run unit tests with gradle and Java 8
|
||||
run: ./gradlew test
|
||||
|
||||
buildJava14:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Set up JDK 14
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 14
|
||||
- name: Run unit tests with gradle and Java 14
|
||||
run: ./gradlew test
|
||||
|
||||
@@ -20,6 +20,12 @@ script:
|
||||
- "./gradlew test"
|
||||
- "./gradlew desktop:dist -Pbuildversion=${TRAVIS_TAG:1}"
|
||||
- "./gradlew server:dist -Pbuildversion=${TRAVIS_TAG:1}"
|
||||
- "./gradlew core:javadoc"
|
||||
- cd ../
|
||||
- git clone --depth=1 https://github.com/MindustryGame/docs.git
|
||||
- cp -a Mindustry/core/build/docs/javadoc/. docs/
|
||||
- cd docs
|
||||
- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then git add .; git commit -m "Update ${TRAVIS_BUILD_NUMBER}"; git push https://Anuken:${GH_PUSH_TOKEN}@github.com/MindustryGame/docs; fi
|
||||
deploy:
|
||||
- provider: releases
|
||||
skip_cleanup: true
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
A sandbox tower defense game written in Java.
|
||||
|
||||
_[Trello Board](https://trello.com/b/aE2tcUwF/mindustry-40-plans)_
|
||||
_[Wiki](https://mindustrygame.github.io/wiki)_
|
||||
_[Wiki](https://mindustrygame.github.io/wiki)_
|
||||
_[Javadoc](https://mindustrygame.github.io/docs/)_
|
||||
|
||||
### Contributing
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ public class AndroidLauncher extends AndroidApplication{
|
||||
}
|
||||
|
||||
@Override
|
||||
public org.mozilla.javascript.Context getScriptContext(){
|
||||
public rhino.Context getScriptContext(){
|
||||
return AndroidRhinoContext.enter(getContext().getCacheDir());
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ import com.android.dx.dex.cf.*;
|
||||
import com.android.dx.dex.file.DexFile;
|
||||
import com.android.dx.merge.*;
|
||||
import dalvik.system.*;
|
||||
import org.mozilla.javascript.*;
|
||||
import rhino.*;
|
||||
|
||||
import java.io.*;
|
||||
import java.nio.*;
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
sourceCompatibility = 1.8
|
||||
sourceSets.main.java.srcDirs = ["src/main/java/"]
|
||||
sourceSets.main.resources.srcDirs = ["src/main/resources/"]
|
||||
@@ -1,7 +1,7 @@
|
||||
package mindustry.annotations;
|
||||
|
||||
import arc.files.*;
|
||||
import arc.struct.Array;
|
||||
import arc.struct.*;
|
||||
import arc.util.*;
|
||||
import arc.util.Log;
|
||||
import arc.util.Log.*;
|
||||
@@ -126,12 +126,12 @@ public abstract class BaseProcessor extends AbstractProcessor{
|
||||
write(builder, null);
|
||||
}
|
||||
|
||||
public static void write(TypeSpec.Builder builder, Array<String> imports) throws Exception{
|
||||
public static void write(TypeSpec.Builder builder, Seq<String> imports) throws Exception{
|
||||
JavaFile file = JavaFile.builder(packageName, builder.build()).skipJavaLangImports(true).build();
|
||||
|
||||
if(imports != null){
|
||||
String rawSource = file.toString();
|
||||
Array<String> result = new Array<>();
|
||||
Seq<String> result = new Seq<>();
|
||||
for (String s : rawSource.split("\n", -1)) {
|
||||
result.add(s);
|
||||
if (s.startsWith("package ")) {
|
||||
@@ -152,22 +152,22 @@ public abstract class BaseProcessor extends AbstractProcessor{
|
||||
}
|
||||
}
|
||||
|
||||
public Array<Selement> elements(Class<? extends Annotation> type){
|
||||
return Array.with(env.getElementsAnnotatedWith(type)).map(Selement::new);
|
||||
public Seq<Selement> elements(Class<? extends Annotation> type){
|
||||
return Seq.with(env.getElementsAnnotatedWith(type)).map(Selement::new);
|
||||
}
|
||||
|
||||
public Array<Stype> types(Class<? extends Annotation> type){
|
||||
return Array.with(env.getElementsAnnotatedWith(type)).select(e -> e instanceof TypeElement)
|
||||
public Seq<Stype> types(Class<? extends Annotation> type){
|
||||
return Seq.with(env.getElementsAnnotatedWith(type)).select(e -> e instanceof TypeElement)
|
||||
.map(e -> new Stype((TypeElement)e));
|
||||
}
|
||||
|
||||
public Array<Svar> fields(Class<? extends Annotation> type){
|
||||
return Array.with(env.getElementsAnnotatedWith(type)).select(e -> e instanceof VariableElement)
|
||||
public Seq<Svar> fields(Class<? extends Annotation> type){
|
||||
return Seq.with(env.getElementsAnnotatedWith(type)).select(e -> e instanceof VariableElement)
|
||||
.map(e -> new Svar((VariableElement)e));
|
||||
}
|
||||
|
||||
public Array<Smethod> methods(Class<? extends Annotation> type){
|
||||
return Array.with(env.getElementsAnnotatedWith(type)).select(e -> e instanceof ExecutableElement)
|
||||
public Seq<Smethod> methods(Class<? extends Annotation> type){
|
||||
return Seq.with(env.getElementsAnnotatedWith(type)).select(e -> e instanceof ExecutableElement)
|
||||
.map(e -> new Smethod((ExecutableElement)e));
|
||||
}
|
||||
|
||||
|
||||
@@ -19,12 +19,14 @@ public class EntityIO{
|
||||
final static Json json = new Json();
|
||||
//suffixes for sync fields
|
||||
final static String targetSuf = "_TARGET_", lastSuf = "_LAST_";
|
||||
//replacements after refactoring
|
||||
final static StringMap replacements = StringMap.of("mindustry.entities.units.BuildRequest", "mindustry.entities.units.BuildPlan");
|
||||
|
||||
final ClassSerializer serializer;
|
||||
final String name;
|
||||
final TypeSpec.Builder type;
|
||||
final Fi directory;
|
||||
final Array<Revision> revisions = new Array<>();
|
||||
final Seq<Revision> revisions = new Seq<>();
|
||||
|
||||
boolean write;
|
||||
MethodSpec.Builder method;
|
||||
@@ -47,7 +49,7 @@ public class EntityIO{
|
||||
int nextRevision = revisions.isEmpty() ? 0 : revisions.max(r -> r.version).version + 1;
|
||||
|
||||
//resolve preferred field order based on fields that fit
|
||||
Array<FieldSpec> fields = Array.with(type.fieldSpecs).select(spec ->
|
||||
Seq<FieldSpec> fields = Seq.with(type.fieldSpecs).select(spec ->
|
||||
!spec.hasModifier(Modifier.TRANSIENT) &&
|
||||
!spec.hasModifier(Modifier.STATIC) &&
|
||||
!spec.hasModifier(Modifier.FINAL)/* &&
|
||||
@@ -110,7 +112,7 @@ public class EntityIO{
|
||||
}
|
||||
}
|
||||
|
||||
void writeSync(MethodSpec.Builder method, boolean write, Array<Svar> syncFields, Array<Svar> allFields) throws Exception{
|
||||
void writeSync(MethodSpec.Builder method, boolean write, Seq<Svar> syncFields, Seq<Svar> allFields) throws Exception{
|
||||
this.method = method;
|
||||
this.write = write;
|
||||
|
||||
@@ -147,7 +149,7 @@ public class EntityIO{
|
||||
}
|
||||
}
|
||||
|
||||
void writeSyncManual(MethodSpec.Builder method, boolean write, Array<Svar> syncFields) throws Exception{
|
||||
void writeSyncManual(MethodSpec.Builder method, boolean write, Seq<Svar> syncFields) throws Exception{
|
||||
this.method = method;
|
||||
this.write = write;
|
||||
|
||||
@@ -170,7 +172,7 @@ public class EntityIO{
|
||||
}
|
||||
}
|
||||
|
||||
void writeInterpolate(MethodSpec.Builder method, Array<Svar> fields) throws Exception{
|
||||
void writeInterpolate(MethodSpec.Builder method, Seq<Svar> fields) throws Exception{
|
||||
this.method = method;
|
||||
|
||||
cont("if(lastUpdated != 0 && updateSpacing != 0)");
|
||||
@@ -197,6 +199,9 @@ public class EntityIO{
|
||||
}
|
||||
|
||||
private void io(String type, String field) throws Exception{
|
||||
type = type.replace("mindustry.gen.", "");
|
||||
type = replacements.get(type, type);
|
||||
|
||||
if(BaseProcessor.isPrimitive(type)){
|
||||
s(type.equals("boolean") ? "bool" : type.charAt(0) + "", field);
|
||||
}else if(instanceOf(type, "mindustry.ctype.Content")){
|
||||
@@ -234,7 +239,7 @@ public class EntityIO{
|
||||
String struct = type.substring(0, type.indexOf("<"));
|
||||
String generic = type.substring(type.indexOf("<") + 1, type.indexOf(">"));
|
||||
|
||||
if(struct.equals("arc.struct.Queue") || struct.equals("arc.struct.Array")){
|
||||
if(struct.equals("arc.struct.Queue") || struct.equals("arc.struct.Seq")){
|
||||
if(write){
|
||||
s("i", field + ".size");
|
||||
cont("for(int INDEX = 0; INDEX < $L.size; INDEX ++)", field);
|
||||
@@ -289,9 +294,9 @@ public class EntityIO{
|
||||
|
||||
public static class Revision{
|
||||
int version;
|
||||
Array<RevisionField> fields;
|
||||
Seq<RevisionField> fields;
|
||||
|
||||
Revision(int version, Array<RevisionField> fields){
|
||||
Revision(int version, Seq<RevisionField> fields){
|
||||
this.version = version;
|
||||
this.fields = fields;
|
||||
}
|
||||
@@ -299,7 +304,7 @@ public class EntityIO{
|
||||
Revision(){}
|
||||
|
||||
/** @return whether these two revisions are compatible */
|
||||
boolean equal(Array<FieldSpec> specs){
|
||||
boolean equal(Seq<FieldSpec> specs){
|
||||
if(fields.size != specs.size) return false;
|
||||
|
||||
for(int i = 0; i < fields.size; i++){
|
||||
|
||||
@@ -30,18 +30,18 @@ import java.lang.annotation.*;
|
||||
"mindustry.annotations.Annotations.TypeIOHandler"
|
||||
})
|
||||
public class EntityProcess extends BaseProcessor{
|
||||
Array<EntityDefinition> definitions = new Array<>();
|
||||
Array<GroupDefinition> groupDefs = new Array<>();
|
||||
Array<Stype> baseComponents;
|
||||
Seq<EntityDefinition> definitions = new Seq<>();
|
||||
Seq<GroupDefinition> groupDefs = new Seq<>();
|
||||
Seq<Stype> baseComponents;
|
||||
ObjectMap<String, Stype> componentNames = new ObjectMap<>();
|
||||
ObjectMap<Stype, Array<Stype>> componentDependencies = new ObjectMap<>();
|
||||
ObjectMap<Selement, Array<Stype>> defComponents = new ObjectMap<>();
|
||||
ObjectMap<Svar, String> varInitializers = new ObjectMap<>();
|
||||
ObjectMap<Smethod, String> methodBlocks = new ObjectMap<>();
|
||||
ObjectMap<Stype, Seq<Stype>> componentDependencies = new ObjectMap<>();
|
||||
ObjectMap<Selement, Seq<Stype>> defComponents = new ObjectMap<>();
|
||||
ObjectMap<String, String> varInitializers = new ObjectMap<>();
|
||||
ObjectMap<String, String> methodBlocks = new ObjectMap<>();
|
||||
ObjectSet<String> imports = new ObjectSet<>();
|
||||
Array<Selement> allGroups = new Array<>();
|
||||
Array<Selement> allDefs = new Array<>();
|
||||
Array<Stype> allInterfaces = new Array<>();
|
||||
Seq<Selement> allGroups = new Seq<>();
|
||||
Seq<Selement> allDefs = new Seq<>();
|
||||
Seq<Stype> allInterfaces = new Seq<>();
|
||||
ClassSerializer serializer;
|
||||
|
||||
{
|
||||
@@ -58,7 +58,7 @@ public class EntityProcess extends BaseProcessor{
|
||||
if(round == 1){
|
||||
serializer = TypeIOResolver.resolve(this);
|
||||
baseComponents = types(BaseComponent.class);
|
||||
Array<Stype> allComponents = types(Component.class);
|
||||
Seq<Stype> allComponents = types(Component.class);
|
||||
|
||||
//store code
|
||||
for(Stype component : allComponents){
|
||||
@@ -68,14 +68,14 @@ public class EntityProcess extends BaseProcessor{
|
||||
//add initializer if it exists
|
||||
if(tree.getInitializer() != null){
|
||||
String init = tree.getInitializer().toString();
|
||||
varInitializers.put(f, init);
|
||||
varInitializers.put(f.descString(), init);
|
||||
}
|
||||
}
|
||||
|
||||
for(Smethod elem : component.methods()){
|
||||
if(elem.is(Modifier.ABSTRACT) || elem.is(Modifier.NATIVE)) continue;
|
||||
//get all statements in the method, store them
|
||||
methodBlocks.put(elem, elem.tree().getBody().toString());
|
||||
methodBlocks.put(elem.descString(), elem.tree().getBody().toString());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ public class EntityProcess extends BaseProcessor{
|
||||
}
|
||||
|
||||
//implement super interfaces
|
||||
Array<Stype> depends = getDependencies(component);
|
||||
Seq<Stype> depends = getDependencies(component);
|
||||
for(Stype type : depends){
|
||||
inter.addSuperinterface(ClassName.get(packageName, interfaceName(type)));
|
||||
}
|
||||
@@ -133,7 +133,7 @@ public class EntityProcess extends BaseProcessor{
|
||||
//getter
|
||||
if(!signatures.contains(cname + "()")){
|
||||
inter.addMethod(MethodSpec.methodBuilder(cname).addModifiers(Modifier.ABSTRACT, Modifier.PUBLIC)
|
||||
.addAnnotations(Array.with(field.annotations()).select(a -> a.toString().contains("Null")).map(AnnotationSpec::get))
|
||||
.addAnnotations(Seq.with(field.annotations()).select(a -> a.toString().contains("Null")).map(AnnotationSpec::get))
|
||||
.addJavadoc(field.doc() == null ? "" : field.doc())
|
||||
.returns(field.tname()).build());
|
||||
}
|
||||
@@ -144,7 +144,7 @@ public class EntityProcess extends BaseProcessor{
|
||||
inter.addMethod(MethodSpec.methodBuilder(cname).addModifiers(Modifier.ABSTRACT, Modifier.PUBLIC)
|
||||
.addJavadoc(field.doc() == null ? "" : field.doc())
|
||||
.addParameter(ParameterSpec.builder(field.tname(), field.name())
|
||||
.addAnnotations(Array.with(field.annotations())
|
||||
.addAnnotations(Seq.with(field.annotations())
|
||||
.select(a -> a.toString().contains("Null")).map(AnnotationSpec::get)).build()).build());
|
||||
}
|
||||
}
|
||||
@@ -161,7 +161,7 @@ public class EntityProcess extends BaseProcessor{
|
||||
|
||||
//log methods generated
|
||||
for(MethodSpec spec : inter.methodSpecs){
|
||||
Log.debug("&g> > &c@ @(@)", simpleName(spec.returnType.toString()), spec.name, Array.with(spec.parameters).toString(", ", p -> simpleName(p.type.toString()) + " " + p.name));
|
||||
Log.debug("&g> > &c@ @(@)", simpleName(spec.returnType.toString()), spec.name, Seq.with(spec.parameters).toString(", ", p -> simpleName(p.type.toString()) + " " + p.name));
|
||||
}
|
||||
|
||||
Log.debug("");
|
||||
@@ -170,9 +170,10 @@ public class EntityProcess extends BaseProcessor{
|
||||
}else if(round == 2){ //round 2: get component classes and generate interfaces for them
|
||||
|
||||
//parse groups
|
||||
//this needs to be done before the entity interfaces are generated, as the entity classes need to know which groups to add themselves to
|
||||
for(Selement<?> group : allGroups){
|
||||
GroupDef an = group.annotation(GroupDef.class);
|
||||
Array<Stype> types = types(an, GroupDef::value).map(this::interfaceToComp);
|
||||
Seq<Stype> types = types(an, GroupDef::value).map(this::interfaceToComp);
|
||||
boolean collides = an.collide();
|
||||
groupDefs.add(new GroupDefinition(group.name().startsWith("g") ? group.name().substring(1) : group.name(),
|
||||
ClassName.bestGuess(packageName + "." + interfaceName(types.first())), types, an.spatial(), an.mapping(), collides));
|
||||
@@ -183,6 +184,7 @@ public class EntityProcess extends BaseProcessor{
|
||||
|
||||
//look at each definition
|
||||
for(Selement<?> type : allDefs){
|
||||
|
||||
EntityDef ann = type.annotation(EntityDef.class);
|
||||
boolean isFinal = ann.isFinal();
|
||||
|
||||
@@ -209,9 +211,9 @@ public class EntityProcess extends BaseProcessor{
|
||||
TypeSpec.Builder builder = TypeSpec.classBuilder(name).addModifiers(Modifier.PUBLIC);
|
||||
if(isFinal) builder.addModifiers(Modifier.FINAL);
|
||||
|
||||
Array<Stype> components = allComponents(type);
|
||||
Array<GroupDefinition> groups = groupDefs.select(g -> (!g.components.isEmpty() && !g.components.contains(s -> !components.contains(s))) || g.manualInclusions.contains(type));
|
||||
ObjectMap<String, Array<Smethod>> methods = new ObjectMap<>();
|
||||
Seq<Stype> components = allComponents(type);
|
||||
Seq<GroupDefinition> groups = groupDefs.select(g -> (!g.components.isEmpty() && !g.components.contains(s -> !components.contains(s))) || g.manualInclusions.contains(type));
|
||||
ObjectMap<String, Seq<Smethod>> methods = new ObjectMap<>();
|
||||
ObjectMap<FieldSpec, Svar> specVariables = new ObjectMap<>();
|
||||
ObjectSet<String> usedFields = new ObjectSet<>();
|
||||
|
||||
@@ -219,8 +221,8 @@ public class EntityProcess extends BaseProcessor{
|
||||
builder.addMethod(MethodSpec.methodBuilder("serialize").addModifiers(Modifier.PUBLIC, Modifier.FINAL).returns(boolean.class).addStatement("return " + ann.serialize()).build());
|
||||
|
||||
//all SyncField fields
|
||||
Array<Svar> syncedFields = new Array<>();
|
||||
Array<Svar> allFields = new Array<>();
|
||||
Seq<Svar> syncedFields = new Seq<>();
|
||||
Seq<Svar> allFields = new Seq<>();
|
||||
|
||||
boolean isSync = components.contains(s -> s.name().contains("Sync"));
|
||||
|
||||
@@ -228,7 +230,7 @@ public class EntityProcess extends BaseProcessor{
|
||||
for(Stype comp : components){
|
||||
|
||||
//write fields to the class; ignoring transient/imported ones
|
||||
Array<Svar> fields = comp.fields().select(f -> !f.has(Import.class));
|
||||
Seq<Svar> fields = comp.fields().select(f -> !f.has(Import.class));
|
||||
for(Svar f : fields){
|
||||
if(!usedFields.add(f.name())){
|
||||
err("Field '" + f.name() + "' of component '" + comp.name() + "' re-defines a field in entity '" + type.name() + "'");
|
||||
@@ -247,8 +249,8 @@ public class EntityProcess extends BaseProcessor{
|
||||
}
|
||||
|
||||
//add initializer if it exists
|
||||
if(varInitializers.containsKey(f)){
|
||||
fbuilder.initializer(varInitializers.get(f));
|
||||
if(varInitializers.containsKey(f.descString())){
|
||||
fbuilder.initializer(varInitializers.get(f.descString()));
|
||||
}
|
||||
|
||||
fbuilder.addModifiers(f.has(ReadOnly.class) ? Modifier.PROTECTED : Modifier.PUBLIC);
|
||||
@@ -277,9 +279,9 @@ public class EntityProcess extends BaseProcessor{
|
||||
}
|
||||
}
|
||||
|
||||
//get all utility methods from components
|
||||
//get all methods from components
|
||||
for(Smethod elem : comp.methods()){
|
||||
methods.get(elem.toString(), Array::new).add(elem);
|
||||
methods.get(elem.toString(), Seq::new).add(elem);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -297,7 +299,7 @@ public class EntityProcess extends BaseProcessor{
|
||||
boolean hasIO = ann.genio() && (components.contains(s -> s.name().contains("Sync")) || ann.serialize());
|
||||
|
||||
//add all methods from components
|
||||
for(ObjectMap.Entry<String, Array<Smethod>> entry : methods){
|
||||
for(ObjectMap.Entry<String, Seq<Smethod>> entry : methods){
|
||||
if(entry.value.contains(m -> m.has(Replace.class))){
|
||||
//check replacements
|
||||
if(entry.value.count(m -> m.has(Replace.class)) > 1){
|
||||
@@ -388,10 +390,12 @@ public class EntityProcess extends BaseProcessor{
|
||||
}
|
||||
|
||||
for(Smethod elem : entry.value){
|
||||
if(elem.is(Modifier.ABSTRACT) || elem.is(Modifier.NATIVE) || !methodBlocks.containsKey(elem)) continue;
|
||||
String descStr = elem.descString();
|
||||
|
||||
if(elem.is(Modifier.ABSTRACT) || elem.is(Modifier.NATIVE) || !methodBlocks.containsKey(descStr)) continue;
|
||||
|
||||
//get all statements in the method, copy them over
|
||||
String str = methodBlocks.get(elem);
|
||||
String str = methodBlocks.get(descStr);
|
||||
//name for code blocks in the methods
|
||||
String blockName = elem.up().getSimpleName().toString().toLowerCase().replace("comp", "");
|
||||
|
||||
@@ -434,13 +438,14 @@ public class EntityProcess extends BaseProcessor{
|
||||
for(FieldSpec spec : builder.fieldSpecs){
|
||||
@Nullable Svar variable = specVariables.get(spec);
|
||||
if(variable != null && variable.isAny(Modifier.STATIC, Modifier.FINAL)) continue;
|
||||
String desc = variable.descString();
|
||||
|
||||
if(spec.type.isPrimitive()){
|
||||
//set to primitive default
|
||||
resetBuilder.addStatement("$L = $L", spec.name, variable != null && varInitializers.containsKey(variable) ? varInitializers.get(variable) : getDefault(spec.type.toString()));
|
||||
resetBuilder.addStatement("$L = $L", spec.name, variable != null && varInitializers.containsKey(desc) ? varInitializers.get(desc) : getDefault(spec.type.toString()));
|
||||
}else{
|
||||
//set to default null
|
||||
if(!varInitializers.containsKey(variable)){
|
||||
if(!varInitializers.containsKey(desc)){
|
||||
resetBuilder.addStatement("$L = null", spec.name);
|
||||
} //else... TODO reset if poolable
|
||||
}
|
||||
@@ -513,7 +518,7 @@ public class EntityProcess extends BaseProcessor{
|
||||
if(!idProps.exists()) idProps.writeString("");
|
||||
PropertiesUtils.load(map, idProps.reader());
|
||||
//next ID to be used in generation
|
||||
Integer max = map.values().toArray().map(Integer::parseInt).max(i -> i);
|
||||
Integer max = map.values().toSeq().map(Integer::parseInt).max(i -> i);
|
||||
int maxID = max == null ? 0 : max + 1;
|
||||
|
||||
//assign IDs
|
||||
@@ -591,7 +596,7 @@ public class EntityProcess extends BaseProcessor{
|
||||
//generate getter/setter for each method
|
||||
for(Smethod method : inter.methods()){
|
||||
String var = method.name();
|
||||
FieldSpec field = Array.with(def.builder.fieldSpecs).find(f -> f.name.equals(var));
|
||||
FieldSpec field = Seq.with(def.builder.fieldSpecs).find(f -> f.name.equals(var));
|
||||
//make sure it's a real variable AND that the component doesn't already implement it somewhere with custom logic
|
||||
if(field == null || methodNames.contains(method.simpleString())) continue;
|
||||
|
||||
@@ -601,7 +606,7 @@ public class EntityProcess extends BaseProcessor{
|
||||
}
|
||||
|
||||
//setter
|
||||
if(method.isVoid() && !Array.with(field.annotations).contains(f -> f.type.toString().equals("@mindustry.annotations.Annotations.ReadOnly"))){
|
||||
if(method.isVoid() && !Seq.with(field.annotations).contains(f -> f.type.toString().equals("@mindustry.annotations.Annotations.ReadOnly"))){
|
||||
def.builder.addMethod(MethodSpec.overriding(method.e).addModifiers(Modifier.FINAL).addStatement("this." + var + " = " + var).build());
|
||||
}
|
||||
}
|
||||
@@ -616,8 +621,8 @@ public class EntityProcess extends BaseProcessor{
|
||||
//create mock types of all components
|
||||
for(Stype interf : allInterfaces){
|
||||
//indirect interfaces to implement methods for
|
||||
Array<Stype> dependencies = interf.allInterfaces().and(interf);
|
||||
Array<Smethod> methods = dependencies.flatMap(Stype::methods);
|
||||
Seq<Stype> dependencies = interf.allInterfaces().and(interf);
|
||||
Seq<Smethod> methods = dependencies.flatMap(Stype::methods);
|
||||
methods.sortComparing(Object::toString);
|
||||
|
||||
//used method signatures
|
||||
@@ -645,10 +650,11 @@ public class EntityProcess extends BaseProcessor{
|
||||
builder.addStatement("return -1");
|
||||
}else{
|
||||
Svar variable = compType == null || method.params().size > 0 ? null : compType.fields().find(v -> v.name().equals(method.name()));
|
||||
if(variable == null || !varInitializers.containsKey(variable)){
|
||||
String desc = variable == null ? null : variable.descString();
|
||||
if(variable == null || !varInitializers.containsKey(desc)){
|
||||
builder.addStatement("return " + getDefault(method.ret().toString()));
|
||||
}else{
|
||||
String init = varInitializers.get(variable);
|
||||
String init = varInitializers.get(desc);
|
||||
builder.addStatement("return " + (init.equals("{}") ? "new " + variable.mirror().toString() : "") + init);
|
||||
}
|
||||
}
|
||||
@@ -668,8 +674,8 @@ public class EntityProcess extends BaseProcessor{
|
||||
}
|
||||
}
|
||||
|
||||
Array<String> getImports(Element elem){
|
||||
return Array.with(trees.getPath(elem).getCompilationUnit().getImports()).map(Object::toString);
|
||||
Seq<String> getImports(Element elem){
|
||||
return Seq.with(trees.getPath(elem).getCompilationUnit().getImports()).map(Object::toString);
|
||||
}
|
||||
|
||||
/** @return interface for a component type */
|
||||
@@ -682,11 +688,11 @@ public class EntityProcess extends BaseProcessor{
|
||||
}
|
||||
|
||||
/** @return all components that a entity def has */
|
||||
Array<Stype> allComponents(Selement<?> type){
|
||||
Seq<Stype> allComponents(Selement<?> type){
|
||||
if(!defComponents.containsKey(type)){
|
||||
//get base defs
|
||||
Array<Stype> interfaces = types(type.annotation(EntityDef.class), EntityDef::value);
|
||||
Array<Stype> components = new Array<>();
|
||||
Seq<Stype> interfaces = types(type.annotation(EntityDef.class), EntityDef::value);
|
||||
Seq<Stype> components = new Seq<>();
|
||||
for(Stype i : interfaces){
|
||||
Stype comp = interfaceToComp(i);
|
||||
if(comp != null){
|
||||
@@ -709,7 +715,7 @@ public class EntityProcess extends BaseProcessor{
|
||||
return defComponents.get(type);
|
||||
}
|
||||
|
||||
Array<Stype> getDependencies(Stype component){
|
||||
Seq<Stype> getDependencies(Stype component){
|
||||
if(!componentDependencies.containsKey(component)){
|
||||
ObjectSet<Stype> out = new ObjectSet<>();
|
||||
//add base component interfaces
|
||||
@@ -746,7 +752,7 @@ public class EntityProcess extends BaseProcessor{
|
||||
}
|
||||
|
||||
String createName(Selement<?> elem){
|
||||
Array<Stype> comps = types(elem.annotation(EntityDef.class), EntityDef::value).map(this::interfaceToComp);;
|
||||
Seq<Stype> comps = types(elem.annotation(EntityDef.class), EntityDef::value).map(this::interfaceToComp);;
|
||||
comps.sortComparing(Selement::name);
|
||||
return comps.toString("", s -> s.name().replace("Comp", "")) + "Entity";
|
||||
}
|
||||
@@ -755,11 +761,11 @@ public class EntityProcess extends BaseProcessor{
|
||||
return type.annotation(Component.class) != null;
|
||||
}
|
||||
|
||||
<T extends Annotation> Array<Stype> types(T t, Cons<T> consumer){
|
||||
<T extends Annotation> Seq<Stype> types(T t, Cons<T> consumer){
|
||||
try{
|
||||
consumer.get(t);
|
||||
}catch(MirroredTypesException e){
|
||||
return Array.with(e.getTypeMirrors()).map(Stype::of);
|
||||
return Seq.with(e.getTypeMirrors()).map(Stype::of);
|
||||
}
|
||||
throw new IllegalArgumentException("Missing types.");
|
||||
}
|
||||
@@ -767,11 +773,11 @@ public class EntityProcess extends BaseProcessor{
|
||||
class GroupDefinition{
|
||||
final String name;
|
||||
final ClassName baseType;
|
||||
final Array<Stype> components;
|
||||
final Seq<Stype> components;
|
||||
final boolean spatial, mapping, collides;
|
||||
final ObjectSet<Selement> manualInclusions = new ObjectSet<>();
|
||||
|
||||
public GroupDefinition(String name, ClassName bestType, Array<Stype> components, boolean spatial, boolean mapping, boolean collides){
|
||||
public GroupDefinition(String name, ClassName bestType, Seq<Stype> components, boolean spatial, boolean mapping, boolean collides){
|
||||
this.baseType = bestType;
|
||||
this.components = components;
|
||||
this.name = name;
|
||||
@@ -787,14 +793,14 @@ public class EntityProcess extends BaseProcessor{
|
||||
}
|
||||
|
||||
class EntityDefinition{
|
||||
final Array<GroupDefinition> groups;
|
||||
final Array<Stype> components;
|
||||
final Seq<GroupDefinition> groups;
|
||||
final Seq<Stype> components;
|
||||
final TypeSpec.Builder builder;
|
||||
final Selement base;
|
||||
final String name;
|
||||
int classID;
|
||||
|
||||
public EntityDefinition(String name, Builder builder, Selement base, Array<Stype> components, Array<GroupDefinition> groups){
|
||||
public EntityDefinition(String name, Builder builder, Selement base, Seq<Stype> components, Seq<GroupDefinition> groups){
|
||||
this.builder = builder;
|
||||
this.name = name;
|
||||
this.base = base;
|
||||
|
||||
@@ -69,7 +69,7 @@ public class AssetsProcess extends BaseProcessor{
|
||||
});
|
||||
|
||||
for(Element elem : elements){
|
||||
Array.with(((TypeElement)elem).getEnclosedElements()).each(e -> e.getKind() == ElementKind.FIELD, field -> {
|
||||
Seq.with(((TypeElement)elem).getEnclosedElements()).each(e -> e.getKind() == ElementKind.FIELD, field -> {
|
||||
String fname = field.getSimpleName().toString();
|
||||
if(fname.startsWith("default")){
|
||||
loadStyles.addStatement("arc.Core.scene.addStyle(" + field.asType().toString() + ".class, mindustry.ui.Styles." + fname + ")");
|
||||
|
||||
@@ -23,17 +23,17 @@ public class LoadRegionProcessor extends BaseProcessor{
|
||||
.addParameter(tname("mindustry.ctype.MappableContent"), "content")
|
||||
.addModifiers(Modifier.STATIC, Modifier.PUBLIC);
|
||||
|
||||
ObjectMap<Stype, Array<Svar>> fieldMap = new ObjectMap<>();
|
||||
ObjectMap<Stype, Seq<Svar>> fieldMap = new ObjectMap<>();
|
||||
|
||||
for(Svar field : fields(Load.class)){
|
||||
if(!field.is(Modifier.PUBLIC)){
|
||||
err("@LoadRegion field must be public", field);
|
||||
}
|
||||
|
||||
fieldMap.get(field.enclosingType(), Array::new).add(field);
|
||||
fieldMap.get(field.enclosingType(), Seq::new).add(field);
|
||||
}
|
||||
|
||||
for(Entry<Stype, Array<Svar>> entry : fieldMap){
|
||||
for(Entry<Stype, Seq<Svar>> entry : fieldMap){
|
||||
method.beginControlFlow("if(content instanceof $T)", entry.key.tname());
|
||||
|
||||
for(Svar field : entry.value){
|
||||
|
||||
@@ -83,7 +83,7 @@ public class RemoteReadGenerator{
|
||||
readBlock.addStatement("$L $L = read.$L()", typeName, varName, pname);
|
||||
}else{
|
||||
//else, try and find a serializer
|
||||
String ser = serializers.readers.get(typeName, SerializerResolver.locate(entry.element, var.asType(), false));
|
||||
String ser = serializers.readers.get(typeName.replace("mindustry.gen.", ""), SerializerResolver.locate(entry.element, var.asType(), false));
|
||||
|
||||
if(ser == null){ //make sure a serializer exists!
|
||||
BaseProcessor.err("No read method to read class type '" + typeName + "' in method " + entry.targetMethod + "; " + serializers.readers, var);
|
||||
|
||||
@@ -139,7 +139,7 @@ public class RemoteWriteGenerator{
|
||||
//reset stream
|
||||
method.addStatement("OUT.reset()");
|
||||
|
||||
method.addTypeVariables(Array.with(elem.getTypeParameters()).map(BaseProcessor::getTVN));
|
||||
method.addTypeVariables(Seq.with(elem.getTypeParameters()).map(BaseProcessor::getTVN));
|
||||
|
||||
for(int i = 0; i < elem.getParameters().size(); i++){
|
||||
//first argument is skipped as it is always the player caller
|
||||
@@ -174,7 +174,7 @@ public class RemoteWriteGenerator{
|
||||
method.addStatement("WRITE.$L($L)", typeName.equals("boolean") ? "bool" : typeName.charAt(0) + "", varName);
|
||||
}else{
|
||||
//else, try and find a serializer
|
||||
String ser = serializers.writers.get(typeName, SerializerResolver.locate(elem, var.asType(), true));
|
||||
String ser = serializers.writers.get(typeName.replace("mindustry.gen.", ""), SerializerResolver.locate(elem, var.asType(), true));
|
||||
|
||||
if(ser == null){ //make sure a serializer exists!
|
||||
BaseProcessor.err("No @WriteClass method to write class type: '" + typeName + "'", var);
|
||||
|
||||
@@ -9,7 +9,7 @@ public class SerializerResolver{
|
||||
|
||||
public static String locate(ExecutableElement elem, TypeMirror mirror, boolean write){
|
||||
//generic type
|
||||
if((mirror.toString().equals("T") && Array.with(elem.getTypeParameters().get(0).getBounds()).contains(SerializerResolver::isEntity)) ||
|
||||
if((mirror.toString().equals("T") && Seq.with(elem.getTypeParameters().get(0).getBounds()).contains(SerializerResolver::isEntity)) ||
|
||||
isEntity(mirror)){
|
||||
return write ? "mindustry.io.TypeIO.writeEntity" : "mindustry.io.TypeIO.readEntity";
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package mindustry.annotations.util;
|
||||
|
||||
import arc.func.*;
|
||||
import com.sun.tools.javac.code.*;
|
||||
import com.sun.tools.javac.code.Attribute.Array;
|
||||
import com.sun.tools.javac.code.Attribute.Enum;
|
||||
@@ -10,16 +11,17 @@ import com.sun.tools.javac.code.Type;
|
||||
import com.sun.tools.javac.code.Symbol.*;
|
||||
import com.sun.tools.javac.code.Type.ArrayType;
|
||||
import com.sun.tools.javac.util.List;
|
||||
import com.sun.tools.javac.util.Name;
|
||||
import com.sun.tools.javac.util.*;
|
||||
import sun.reflect.annotation.*;
|
||||
|
||||
import javax.lang.model.element.*;
|
||||
import javax.lang.model.type.*;
|
||||
import java.io.*;
|
||||
import java.lang.Class;
|
||||
import java.lang.annotation.*;
|
||||
import java.lang.reflect.*;
|
||||
import java.util.*;
|
||||
import java.util.Map.*;
|
||||
import java.lang.Class;
|
||||
|
||||
//replaces the standard Java AnnotationProxyMaker with one that doesn't crash
|
||||
//thanks, oracle.
|
||||
@@ -59,27 +61,58 @@ public class AnnotationProxyMaker{
|
||||
}
|
||||
|
||||
private Map<MethodSymbol, Attribute> getAllValues(){
|
||||
LinkedHashMap var1 = new LinkedHashMap();
|
||||
ClassSymbol var2 = (ClassSymbol)this.anno.type.tsym;
|
||||
LinkedHashMap map = new LinkedHashMap();
|
||||
ClassSymbol cl = (ClassSymbol)this.anno.type.tsym;
|
||||
|
||||
for(com.sun.tools.javac.code.Scope.Entry var3 = var2.members().elems; var3 != null; var3 = var3.sibling){
|
||||
if(var3.sym.kind == 16){
|
||||
MethodSymbol var4 = (MethodSymbol)var3.sym;
|
||||
Attribute var5 = var4.getDefaultValue();
|
||||
if(var5 != null){
|
||||
var1.put(var4, var5);
|
||||
//try to use Java 8 API for this if possible
|
||||
try{
|
||||
Class entryClass = Class.forName("com.sun.tools.javac.code.Scope$Entry");
|
||||
Object members = cl.members();
|
||||
Field field = members.getClass().getField("elems");
|
||||
Object elems = field.get(members);
|
||||
Field siblingField = entryClass.getField("sibling");
|
||||
Field symField = entryClass.getField("sym");
|
||||
for(Object currEntry = elems; currEntry != null; currEntry = siblingField.get(currEntry)){
|
||||
handleSymbol((Symbol)symField.get(currEntry), map);
|
||||
}
|
||||
|
||||
}catch(Throwable e){
|
||||
//otherwise try other API
|
||||
|
||||
try{
|
||||
Class lookupClass = Class.forName("com.sun.tools.javac.code.Scope$LookupKind");
|
||||
Field nonRecField = lookupClass.getField("NON_RECURSIVE");
|
||||
Object nonRec = nonRecField.get(null);
|
||||
Scope scope = cl.members();
|
||||
Method getSyms = scope.getClass().getMethod("getSymbols", lookupClass);
|
||||
Iterable<Symbol> it = (Iterable<Symbol>)getSyms.invoke(scope, nonRec);
|
||||
Iterator<Symbol> i = it.iterator();
|
||||
while(i.hasNext()){
|
||||
handleSymbol(i.next(), map);
|
||||
}
|
||||
|
||||
}catch(Throwable death){
|
||||
//I tried
|
||||
throw new RuntimeException(death);
|
||||
}
|
||||
}
|
||||
|
||||
Iterator var6 = this.anno.values.iterator();
|
||||
|
||||
while(var6.hasNext()){
|
||||
Pair var7 = (Pair)var6.next();
|
||||
var1.put(var7.fst, var7.snd);
|
||||
for(Pair var7 : this.anno.values){
|
||||
map.put(var7.fst, var7.snd);
|
||||
}
|
||||
|
||||
return var1;
|
||||
return map;
|
||||
}
|
||||
|
||||
private void handleSymbol(Symbol sym, LinkedHashMap map){
|
||||
|
||||
if(sym.getKind() == ElementKind.METHOD){
|
||||
MethodSymbol var4 = (MethodSymbol)sym;
|
||||
Attribute var5 = var4.getDefaultValue();
|
||||
if(var5 != null){
|
||||
map.put(var4, var5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private Object generateValue(MethodSymbol var1, Attribute var2){
|
||||
@@ -87,70 +120,6 @@ public class AnnotationProxyMaker{
|
||||
return var3.getValue(var2);
|
||||
}
|
||||
|
||||
private static final class MirroredTypesExceptionProxy extends ExceptionProxy{
|
||||
static final long serialVersionUID = 269L;
|
||||
private transient List<TypeMirror> types;
|
||||
private final String typeStrings;
|
||||
|
||||
MirroredTypesExceptionProxy(List<TypeMirror> var1){
|
||||
this.types = var1;
|
||||
this.typeStrings = var1.toString();
|
||||
}
|
||||
|
||||
public String toString(){
|
||||
return this.typeStrings;
|
||||
}
|
||||
|
||||
public int hashCode(){
|
||||
return (this.types != null ? this.types : this.typeStrings).hashCode();
|
||||
}
|
||||
|
||||
public boolean equals(Object var1){
|
||||
return this.types != null && var1 instanceof AnnotationProxyMaker.MirroredTypesExceptionProxy && this.types.equals(((AnnotationProxyMaker.MirroredTypesExceptionProxy)var1).types);
|
||||
}
|
||||
|
||||
protected RuntimeException generateException(){
|
||||
return new MirroredTypesException(this.types);
|
||||
}
|
||||
|
||||
private void readObject(ObjectInputStream var1) throws IOException, ClassNotFoundException{
|
||||
var1.defaultReadObject();
|
||||
this.types = null;
|
||||
}
|
||||
}
|
||||
|
||||
private static final class MirroredTypeExceptionProxy extends ExceptionProxy{
|
||||
static final long serialVersionUID = 269L;
|
||||
private transient TypeMirror type;
|
||||
private final String typeString;
|
||||
|
||||
MirroredTypeExceptionProxy(TypeMirror var1){
|
||||
this.type = var1;
|
||||
this.typeString = var1.toString();
|
||||
}
|
||||
|
||||
public String toString(){
|
||||
return this.typeString;
|
||||
}
|
||||
|
||||
public int hashCode(){
|
||||
return (this.type != null ? this.type : this.typeString).hashCode();
|
||||
}
|
||||
|
||||
public boolean equals(Object var1){
|
||||
return this.type != null && var1 instanceof AnnotationProxyMaker.MirroredTypeExceptionProxy && this.type.equals(((AnnotationProxyMaker.MirroredTypeExceptionProxy)var1).type);
|
||||
}
|
||||
|
||||
protected RuntimeException generateException(){
|
||||
return new MirroredTypeException(this.type);
|
||||
}
|
||||
|
||||
private void readObject(ObjectInputStream var1) throws IOException, ClassNotFoundException{
|
||||
var1.defaultReadObject();
|
||||
this.type = null;
|
||||
}
|
||||
}
|
||||
|
||||
private class ValueVisitor implements Visitor{
|
||||
private MethodSymbol meth;
|
||||
private Class<?> returnClass;
|
||||
@@ -182,7 +151,7 @@ public class AnnotationProxyMaker{
|
||||
}
|
||||
|
||||
public void visitClass(com.sun.tools.javac.code.Attribute.Class var1){
|
||||
this.value = new AnnotationProxyMaker.MirroredTypeExceptionProxy(var1.classType);
|
||||
this.value = mirrorProxy(var1.classType);
|
||||
}
|
||||
|
||||
public void visitArray(Array var1){
|
||||
@@ -199,7 +168,7 @@ public class AnnotationProxyMaker{
|
||||
var14.append(var8);
|
||||
}
|
||||
|
||||
this.value = new AnnotationProxyMaker.MirroredTypesExceptionProxy(var14.toList());
|
||||
this.value = mirrorProxy(var14.toList());
|
||||
}else{
|
||||
int var3 = var1.values.length;
|
||||
Class var4 = this.returnClass;
|
||||
@@ -236,7 +205,7 @@ public class AnnotationProxyMaker{
|
||||
try{
|
||||
this.value = java.lang.Enum.valueOf((Class)this.returnClass, var2);
|
||||
}catch(IllegalArgumentException var4){
|
||||
this.value = new EnumConstantNotPresentExceptionProxy((Class)this.returnClass, var2);
|
||||
this.value = proxify(() -> new EnumConstantNotPresentException((Class)this.returnClass, var2));
|
||||
}
|
||||
}else{
|
||||
this.value = null;
|
||||
@@ -256,7 +225,7 @@ public class AnnotationProxyMaker{
|
||||
|
||||
public void visitError(Error var1){
|
||||
if(var1 instanceof UnresolvedClass){
|
||||
this.value = new AnnotationProxyMaker.MirroredTypeExceptionProxy(((UnresolvedClass)var1).classType);
|
||||
this.value = mirrorProxy(((UnresolvedClass)var1).classType);
|
||||
}else{
|
||||
this.value = null;
|
||||
}
|
||||
@@ -264,24 +233,30 @@ public class AnnotationProxyMaker{
|
||||
}
|
||||
|
||||
private void typeMismatch(Method var1, final Attribute var2){
|
||||
class AnnotationTypeMismatchExceptionProxy extends ExceptionProxy{
|
||||
static final long serialVersionUID = 269L;
|
||||
final transient Method method;
|
||||
|
||||
AnnotationTypeMismatchExceptionProxy(Method var2x){
|
||||
this.method = var2x;
|
||||
}
|
||||
|
||||
public String toString(){
|
||||
return "<error>";
|
||||
}
|
||||
|
||||
protected RuntimeException generateException(){
|
||||
return new AnnotationTypeMismatchException(this.method, var2.type.toString());
|
||||
}
|
||||
}
|
||||
|
||||
this.value = new AnnotationTypeMismatchExceptionProxy(var1);
|
||||
this.value = proxify(() -> new AnnotationTypeMismatchException(var1, var2.type.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
private static Object mirrorProxy(Type t){
|
||||
return proxify(() -> new MirroredTypeException(t));
|
||||
}
|
||||
|
||||
private static Object mirrorProxy(List<Type> t){
|
||||
return proxify(() -> new MirroredTypesException(t));
|
||||
}
|
||||
|
||||
private static <T extends Throwable> Object proxify(Prov<T> prov){
|
||||
try{
|
||||
|
||||
return new ExceptionProxy(){
|
||||
@Override
|
||||
protected RuntimeException generateException(){
|
||||
return (RuntimeException)prov.get();
|
||||
}
|
||||
};
|
||||
}catch(Throwable t){
|
||||
throw new RuntimeException(t);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package mindustry.annotations.util;
|
||||
|
||||
import arc.struct.Array;
|
||||
import arc.struct.*;
|
||||
import arc.util.ArcAnnotate.*;
|
||||
import com.squareup.javapoet.*;
|
||||
import com.sun.tools.javac.code.Attribute.*;
|
||||
@@ -23,8 +23,8 @@ public class Selement<T extends Element>{
|
||||
return BaseProcessor.elementu.getDocComment(e);
|
||||
}
|
||||
|
||||
public Array<Selement<?>> enclosed(){
|
||||
return Array.with(e.getEnclosedElements()).map(Selement::new);
|
||||
public Seq<Selement<?>> enclosed(){
|
||||
return Seq.with(e.getEnclosedElements()).map(Selement::new);
|
||||
}
|
||||
|
||||
public String fullName(){
|
||||
@@ -55,8 +55,8 @@ public class Selement<T extends Element>{
|
||||
return e instanceof ExecutableElement;
|
||||
}
|
||||
|
||||
public Array<? extends AnnotationMirror> annotations(){
|
||||
return Array.with(e.getAnnotationMirrors());
|
||||
public Seq<? extends AnnotationMirror> annotations(){
|
||||
return Seq.with(e.getAnnotationMirrors());
|
||||
}
|
||||
|
||||
public <A extends Annotation> A annotation(Class<A> annotation){
|
||||
@@ -106,6 +106,6 @@ public class Selement<T extends Element>{
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o){
|
||||
return o != null && o.getClass() == getClass() && e == ((Selement)o).e;
|
||||
return o != null && o.getClass() == getClass() && e.equals(((Selement)o).e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,6 +21,10 @@ public class Smethod extends Selement<ExecutableElement>{
|
||||
return false;
|
||||
}
|
||||
|
||||
public String descString(){
|
||||
return up().asType().toString() + "#" + super.toString().replace("mindustry.gen.", "");
|
||||
}
|
||||
|
||||
public boolean is(Modifier mod){
|
||||
return e.getModifiers().contains(mod);
|
||||
}
|
||||
@@ -29,20 +33,20 @@ public class Smethod extends Selement<ExecutableElement>{
|
||||
return new Stype((TypeElement)up());
|
||||
}
|
||||
|
||||
public Array<TypeMirror> thrown(){
|
||||
return Array.with(e.getThrownTypes()).as();
|
||||
public Seq<TypeMirror> thrown(){
|
||||
return Seq.with(e.getThrownTypes()).as();
|
||||
}
|
||||
|
||||
public Array<TypeName> thrownt(){
|
||||
return Array.with(e.getThrownTypes()).map(TypeName::get);
|
||||
public Seq<TypeName> thrownt(){
|
||||
return Seq.with(e.getThrownTypes()).map(TypeName::get);
|
||||
}
|
||||
|
||||
public Array<TypeParameterElement> typeVariables(){
|
||||
return Array.with(e.getTypeParameters()).as();
|
||||
public Seq<TypeParameterElement> typeVariables(){
|
||||
return Seq.with(e.getTypeParameters()).as();
|
||||
}
|
||||
|
||||
public Array<Svar> params(){
|
||||
return Array.with(e.getParameters()).map(Svar::new);
|
||||
public Seq<Svar> params(){
|
||||
return Seq.with(e.getParameters()).map(Svar::new);
|
||||
}
|
||||
|
||||
public boolean isVoid(){
|
||||
|
||||
@@ -20,19 +20,19 @@ public class Stype extends Selement<TypeElement>{
|
||||
return mirror().toString();
|
||||
}
|
||||
|
||||
public Array<Stype> interfaces(){
|
||||
return Array.with(e.getInterfaces()).map(Stype::of);
|
||||
public Seq<Stype> interfaces(){
|
||||
return Seq.with(e.getInterfaces()).map(Stype::of);
|
||||
}
|
||||
|
||||
public Array<Stype> allInterfaces(){
|
||||
public Seq<Stype> allInterfaces(){
|
||||
return interfaces().flatMap(s -> s.allInterfaces().and(s)).distinct();
|
||||
}
|
||||
|
||||
public Array<Stype> superclasses(){
|
||||
return Array.with(BaseProcessor.typeu.directSupertypes(mirror())).map(Stype::of);
|
||||
public Seq<Stype> superclasses(){
|
||||
return Seq.with(BaseProcessor.typeu.directSupertypes(mirror())).map(Stype::of);
|
||||
}
|
||||
|
||||
public Array<Stype> allSuperclasses(){
|
||||
public Seq<Stype> allSuperclasses(){
|
||||
return superclasses().flatMap(s -> s.allSuperclasses().and(s)).distinct();
|
||||
}
|
||||
|
||||
@@ -40,17 +40,17 @@ public class Stype extends Selement<TypeElement>{
|
||||
return new Stype((TypeElement)BaseProcessor.typeu.asElement(BaseProcessor.typeu.directSupertypes(mirror()).get(0)));
|
||||
}
|
||||
|
||||
public Array<Svar> fields(){
|
||||
return Array.with(e.getEnclosedElements()).select(e -> e instanceof VariableElement).map(e -> new Svar((VariableElement)e));
|
||||
public Seq<Svar> fields(){
|
||||
return Seq.with(e.getEnclosedElements()).select(e -> e instanceof VariableElement).map(e -> new Svar((VariableElement)e));
|
||||
}
|
||||
|
||||
public Array<Smethod> methods(){
|
||||
return Array.with(e.getEnclosedElements()).select(e -> e instanceof ExecutableElement
|
||||
public Seq<Smethod> methods(){
|
||||
return Seq.with(e.getEnclosedElements()).select(e -> e instanceof ExecutableElement
|
||||
&& !e.getSimpleName().toString().contains("<")).map(e -> new Smethod((ExecutableElement)e));
|
||||
}
|
||||
|
||||
public Array<Smethod> constructors(){
|
||||
return Array.with(e.getEnclosedElements()).select(e -> e instanceof ExecutableElement
|
||||
public Seq<Smethod> constructors(){
|
||||
return Seq.with(e.getEnclosedElements()).select(e -> e instanceof ExecutableElement
|
||||
&& e.getSimpleName().toString().contains("<")).map(e -> new Smethod((ExecutableElement)e));
|
||||
}
|
||||
|
||||
|
||||
@@ -12,6 +12,10 @@ public class Svar extends Selement<VariableElement>{
|
||||
super(e);
|
||||
}
|
||||
|
||||
public String descString(){
|
||||
return up().asType().toString() + "#" + super.toString().replace("mindustry.gen.", "");
|
||||
}
|
||||
|
||||
public JCVariableDecl jtree(){
|
||||
return (JCVariableDecl)BaseProcessor.elementu.getTree(e);
|
||||
}
|
||||
|
||||
@@ -19,19 +19,19 @@ public class TypeIOResolver{
|
||||
ClassSerializer out = new ClassSerializer(new ObjectMap<>(), new ObjectMap<>(), new ObjectMap<>());
|
||||
for(Stype type : processor.types(TypeIOHandler.class)){
|
||||
//look at all TypeIOHandler methods
|
||||
Array<Smethod> methods = type.methods();
|
||||
Seq<Smethod> methods = type.methods();
|
||||
for(Smethod meth : methods){
|
||||
if(meth.is(Modifier.PUBLIC) && meth.is(Modifier.STATIC)){
|
||||
Array<Svar> params = meth.params();
|
||||
Seq<Svar> params = meth.params();
|
||||
//2 params, second one is type, first is writer
|
||||
if(params.size == 2 && params.first().tname().toString().equals("arc.util.io.Writes")){
|
||||
out.writers.put(params.get(1).tname().toString(), type.fullName() + "." + meth.name());
|
||||
out.writers.put(fix(params.get(1).tname().toString()), type.fullName() + "." + meth.name());
|
||||
}else if(params.size == 1 && params.first().tname().toString().equals("arc.util.io.Reads") && !meth.isVoid()){
|
||||
//1 param, one is reader, returns type
|
||||
out.readers.put(meth.retn().toString(), type.fullName() + "." + meth.name());
|
||||
out.readers.put(fix(meth.retn().toString()), type.fullName() + "." + meth.name());
|
||||
}else if(params.size == 2 && params.first().tname().toString().equals("arc.util.io.Reads") && !meth.isVoid() && meth.ret() == meth.params().get(1).mirror()){
|
||||
//2 params, one is reader, other is type, returns type - these are made to reduce garbage allocated
|
||||
out.mutatorReaders.put(meth.retn().toString(), type.fullName() + "." + meth.name());
|
||||
out.mutatorReaders.put(fix(meth.retn().toString()), type.fullName() + "." + meth.name());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -40,6 +40,11 @@ public class TypeIOResolver{
|
||||
return out;
|
||||
}
|
||||
|
||||
/** makes sure type names don't contain 'gen' */
|
||||
private static String fix(String str){
|
||||
return str.replace("mindustry.gen", "");
|
||||
}
|
||||
|
||||
/** Information about read/write methods for class types. */
|
||||
public static class ClassSerializer{
|
||||
public final ObjectMap<String, String> writers, readers, mutatorReaders;
|
||||
|
||||
@@ -4,20 +4,21 @@ alpha=0
|
||||
block=1
|
||||
cix=2
|
||||
draug=3
|
||||
mindustry.entities.comp.BulletComp=4
|
||||
mindustry.entities.comp.DecalComp=5
|
||||
mindustry.entities.comp.EffectComp=6
|
||||
mindustry.entities.comp.FireComp=7
|
||||
mindustry.entities.comp.PlayerComp=8
|
||||
mindustry.entities.comp.PuddleComp=9
|
||||
mindustry.entities.comp.TileComp=10
|
||||
mindustry.type.Weather.WeatherComp=11
|
||||
mindustry.world.blocks.campaign.CoreLauncher.LaunchCoreComp=20
|
||||
mindustry.world.blocks.campaign.LaunchPad.LaunchPayloadComp=12
|
||||
oculon=13
|
||||
phantom=14
|
||||
tau=19
|
||||
titan=15
|
||||
mace=4
|
||||
mindustry.entities.comp.BulletComp=5
|
||||
mindustry.entities.comp.DecalComp=6
|
||||
mindustry.entities.comp.EffectComp=7
|
||||
mindustry.entities.comp.FireComp=8
|
||||
mindustry.entities.comp.LaunchCoreComp=21
|
||||
mindustry.entities.comp.PlayerComp=9
|
||||
mindustry.entities.comp.PuddleComp=10
|
||||
mindustry.entities.comp.TileComp=11
|
||||
mindustry.type.Weather.WeatherComp=12
|
||||
mindustry.world.blocks.campaign.CoreLauncher.LaunchCoreComp=13
|
||||
mindustry.world.blocks.campaign.LaunchPad.LaunchPayloadComp=14
|
||||
oculon=15
|
||||
phantom=16
|
||||
tau=17
|
||||
trident=18
|
||||
vanguard=16
|
||||
wraith=17
|
||||
vanguard=19
|
||||
wraith=20
|
||||
@@ -1 +1 @@
|
||||
{fields:[{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Array<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||
{fields:[{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||
@@ -0,0 +1 @@
|
||||
{version:1,fields:[{name:ammo,type:int,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||
@@ -1 +1 @@
|
||||
{fields:[{name:armor,type:float,size:4},{name:baseRotation,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mineTile,type:mindustry.world.Tile,size:-1},{name:requests,type:arc.struct.Queue<mindustry.entities.units.BuildRequest>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Array<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||
{fields:[{name:armor,type:float,size:4},{name:baseRotation,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mineTile,type:mindustry.world.Tile,size:-1},{name:requests,type:arc.struct.Queue<mindustry.entities.units.BuildRequest>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||
@@ -0,0 +1 @@
|
||||
{version:1,fields:[{name:armor,type:float,size:4},{name:baseRotation,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mineTile,type:mindustry.world.Tile,size:-1},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||
@@ -0,0 +1 @@
|
||||
{version:2,fields:[{name:ammo,type:int,size:4},{name:armor,type:float,size:4},{name:baseRotation,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mineTile,type:mindustry.world.Tile,size:-1},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||
@@ -1 +1 @@
|
||||
{fields:[{name:armor,type:float,size:4},{name:baseRotation,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:requests,type:arc.struct.Queue<mindustry.entities.units.BuildRequest>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Array<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||
{fields:[{name:armor,type:float,size:4},{name:baseRotation,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:requests,type:arc.struct.Queue<mindustry.entities.units.BuildRequest>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||
@@ -0,0 +1 @@
|
||||
{version:1,fields:[{name:armor,type:float,size:4},{name:baseRotation,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||
@@ -0,0 +1 @@
|
||||
{version:2,fields:[{name:ammo,type:int,size:4},{name:armor,type:float,size:4},{name:baseRotation,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||
@@ -1 +1 @@
|
||||
{fields:[{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mineTile,type:mindustry.world.Tile,size:-1},{name:payloads,type:arc.struct.Array<mindustry.world.blocks.payloads.Payload>,size:-1},{name:requests,type:arc.struct.Queue<mindustry.entities.units.BuildRequest>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Array<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||
{fields:[{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mineTile,type:mindustry.world.Tile,size:-1},{name:payloads,type:arc.struct.Seq<mindustry.world.blocks.payloads.Payload>,size:-1},{name:requests,type:arc.struct.Queue<mindustry.entities.units.BuildRequest>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||
@@ -0,0 +1 @@
|
||||
{version:1,fields:[{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mineTile,type:mindustry.world.Tile,size:-1},{name:payloads,type:arc.struct.Seq<mindustry.world.blocks.payloads.Payload>,size:-1},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||
@@ -0,0 +1 @@
|
||||
{version:2,fields:[{name:ammo,type:int,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mineTile,type:mindustry.world.Tile,size:-1},{name:payloads,type:arc.struct.Seq<mindustry.world.blocks.payloads.Payload>,size:-1},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||
@@ -1 +1 @@
|
||||
{fields:[{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mineTile,type:mindustry.world.Tile,size:-1},{name:requests,type:arc.struct.Queue<mindustry.entities.units.BuildRequest>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Array<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||
{fields:[{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mineTile,type:mindustry.world.Tile,size:-1},{name:requests,type:arc.struct.Queue<mindustry.entities.units.BuildRequest>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||
@@ -0,0 +1 @@
|
||||
{version:1,fields:[{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mineTile,type:mindustry.world.Tile,size:-1},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||
@@ -0,0 +1 @@
|
||||
{version:2,fields:[{name:ammo,type:int,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mineTile,type:mindustry.world.Tile,size:-1},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||
@@ -1 +1 @@
|
||||
{fields:[{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:requests,type:arc.struct.Queue<mindustry.entities.units.BuildRequest>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Array<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||
{fields:[{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:requests,type:arc.struct.Queue<mindustry.entities.units.BuildRequest>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||
@@ -0,0 +1 @@
|
||||
{version:1,fields:[{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||
@@ -0,0 +1 @@
|
||||
{version:2,fields:[{name:ammo,type:int,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||
@@ -1 +1 @@
|
||||
{fields:[{name:collided,type:arc.struct.IntArray,size:-1},{name:damage,type:float,size:4},{name:data,type:java.lang.Object,size:-1},{name:lifetime,type:float,size:4},{name:owner,type:Entityc,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:time,type:float,size:4},{name:type,type:mindustry.entities.bullet.BulletType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||
{fields:[{name:collided,type:arc.struct.IntSeq,size:-1},{name:damage,type:float,size:4},{name:data,type:java.lang.Object,size:-1},{name:lifetime,type:float,size:4},{name:owner,type:Entityc,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:time,type:float,size:4},{name:type,type:mindustry.entities.bullet.BulletType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||
@@ -1 +1 @@
|
||||
{fields:[{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Array<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||
{fields:[{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||
@@ -0,0 +1 @@
|
||||
{version:1,fields:[{name:ammo,type:int,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||
@@ -1 +1 @@
|
||||
{fields:[{name:lifetime,type:float,size:4},{name:team,type:mindustry.game.Team,size:-1},{name:time,type:float,size:4},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||
{fields:[{name:block,type:mindustry.world.Block,size:-1},{name:lifetime,type:float,size:4},{name:time,type:float,size:4},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||
@@ -1 +0,0 @@
|
||||
{version:1,fields:[{name:block,type:mindustry.world.Block,size:-1},{name:lifetime,type:float,size:4},{name:team,type:mindustry.game.Team,size:-1},{name:time,type:float,size:4},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||
@@ -1 +0,0 @@
|
||||
{version:2,fields:[{name:block,type:mindustry.world.Block,size:-1},{name:lifetime,type:float,size:4},{name:time,type:float,size:4},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||
@@ -1 +1 @@
|
||||
{fields:[{name:lifetime,type:float,size:4},{name:stacks,type:arc.struct.Array<mindustry.type.ItemStack>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:time,type:float,size:4},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||
{fields:[{name:lifetime,type:float,size:4},{name:stacks,type:arc.struct.Seq<mindustry.type.ItemStack>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:time,type:float,size:4},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||
@@ -1 +1 @@
|
||||
{fields:[{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Array<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||
{fields:[{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||
@@ -0,0 +1 @@
|
||||
{version:1,fields:[{name:ammo,type:int,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||
@@ -1 +1 @@
|
||||
{fields:[{name:armor,type:float,size:4},{name:baseRotation,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Array<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||
{fields:[{name:armor,type:float,size:4},{name:baseRotation,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||
@@ -0,0 +1 @@
|
||||
{version:1,fields:[{name:ammo,type:int,size:4},{name:armor,type:float,size:4},{name:baseRotation,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||
@@ -1 +1 @@
|
||||
{fields:[{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mineTile,type:mindustry.world.Tile,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Array<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||
{fields:[{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mineTile,type:mindustry.world.Tile,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||
@@ -0,0 +1 @@
|
||||
{version:1,fields:[{name:ammo,type:int,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mineTile,type:mindustry.world.Tile,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||
@@ -1 +1 @@
|
||||
{fields:[{name:accepting,type:float,size:4},{name:amount,type:float,size:4},{name:generation,type:int,size:4},{name:lastRipple,type:float,size:4},{name:liquid,type:mindustry.type.Liquid,size:-1},{name:tile,type:mindustry.world.Tile,size:-1},{name:updateTime,type:float,size:4},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||
{fields:[{name:amount,type:float,size:4},{name:generation,type:int,size:4},{name:liquid,type:mindustry.type.Liquid,size:-1},{name:tile,type:mindustry.world.Tile,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||
@@ -1 +0,0 @@
|
||||
{version:1,fields:[{name:amount,type:float,size:4},{name:generation,type:int,size:4},{name:liquid,type:mindustry.type.Liquid,size:-1},{name:tile,type:mindustry.world.Tile,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||
@@ -1 +0,0 @@
|
||||
{fields:[{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Array<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||
@@ -1 +1 @@
|
||||
{fields:[{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Array<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||
{fields:[{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||
@@ -0,0 +1 @@
|
||||
{version:1,fields:[{name:ammo,type:int,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||
11
build.gradle
@@ -36,6 +36,7 @@ allprojects{
|
||||
if(!project.hasProperty("versionType")) versionType = 'official'
|
||||
appName = 'Mindustry'
|
||||
steamworksVersion = '891ed912791e01fe9ee6237a6497e5212b85c256'
|
||||
rhinoVersion = 'eeb327d141146663ff3924bd20d2a5da8a6439cc'
|
||||
|
||||
loadVersionProps = {
|
||||
return new Properties().with{p -> p.load(file('../core/assets/version.properties').newReader()); return p }
|
||||
@@ -171,7 +172,11 @@ allprojects{
|
||||
jcenter()
|
||||
}
|
||||
|
||||
tasks.withType(Javadoc).all{ enabled = false }
|
||||
tasks.withType(JavaCompile){
|
||||
sourceCompatibility = 1.8
|
||||
targetCompatibility = 1.8
|
||||
options.encoding = "UTF-8"
|
||||
}
|
||||
}
|
||||
|
||||
project(":desktop"){
|
||||
@@ -185,13 +190,13 @@ project(":desktop"){
|
||||
implementation arcModule("natives:natives-box2d-desktop")
|
||||
implementation arcModule("natives:natives-desktop")
|
||||
implementation arcModule("natives:natives-freetype-desktop")
|
||||
implementation 'com.github.MinnDevelopment:java-discord-rpc:v2.0.1'
|
||||
|
||||
if(debugged()) implementation project(":debug")
|
||||
|
||||
implementation "com.github.Anuken:steamworks4j:$steamworksVersion"
|
||||
|
||||
implementation arcModule("backends:backend-sdl")
|
||||
implementation 'com.github.MinnDevelopment:java-discord-rpc:v2.0.1'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -270,7 +275,7 @@ project(":core"){
|
||||
api arcModule("extensions:g3d")
|
||||
api arcModule("extensions:fx")
|
||||
api arcModule("extensions:arcnet")
|
||||
api "org.mozilla:rhino-runtime:1.7.12"
|
||||
api "com.github.Anuken:rhino:$rhinoVersion"
|
||||
if(localArc() && debugged()) api arcModule("extensions:recorder")
|
||||
|
||||
compileOnly project(":annotations")
|
||||
|
||||
BIN
core/assets-raw/sprites/blocks/campaign/data-processor-2.png
Normal file
|
After Width: | Height: | Size: 836 B |
BIN
core/assets-raw/sprites/blocks/campaign/data-processor-top.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 895 B |
@@ -2,7 +2,7 @@
|
||||
duplicatePadding: true,
|
||||
combineSubdirectories: true,
|
||||
flattenPaths: true,
|
||||
maxWidth: 2048,
|
||||
maxHeight: 2048,
|
||||
maxWidth: 4096,
|
||||
maxHeight: 4096,
|
||||
fast: true
|
||||
}
|
||||
|
||||
BIN
core/assets-raw/sprites/blocks/power/turbine-generator-cap.png
Normal file
|
After Width: | Height: | Size: 558 B |
|
After Width: | Height: | Size: 260 B |
|
After Width: | Height: | Size: 206 B |
|
Before Width: | Height: | Size: 782 B After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 693 B After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 994 B After Width: | Height: | Size: 991 B |
|
Before Width: | Height: | Size: 157 B After Width: | Height: | Size: 223 B |
|
Before Width: | Height: | Size: 191 B After Width: | Height: | Size: 283 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 256 B After Width: | Height: | Size: 400 B |
|
Before Width: | Height: | Size: 259 B After Width: | Height: | Size: 413 B |
|
Before Width: | Height: | Size: 234 B After Width: | Height: | Size: 376 B |
|
Before Width: | Height: | Size: 777 B After Width: | Height: | Size: 1.2 KiB |
BIN
core/assets-raw/sprites/blocks/storage/core-foundation-team.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.4 KiB |
BIN
core/assets-raw/sprites/blocks/storage/core-nucleus-team.png
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 1.9 KiB |
BIN
core/assets-raw/sprites/blocks/storage/core-shard-team.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 989 B After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
BIN
core/assets-raw/sprites/blocks/units/additive-reconstructor.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 792 B |
|
Before Width: | Height: | Size: 430 B |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 675 B After Width: | Height: | Size: 675 B |
BIN
core/assets-raw/sprites/blocks/units/factory-in-5.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
core/assets-raw/sprites/blocks/units/factory-in-7.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
core/assets-raw/sprites/blocks/units/factory-in-9.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 651 B After Width: | Height: | Size: 651 B |
BIN
core/assets-raw/sprites/blocks/units/factory-out-5.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
core/assets-raw/sprites/blocks/units/factory-out-7.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
core/assets-raw/sprites/blocks/units/factory-out-9.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
BIN
core/assets-raw/sprites/blocks/units/resupply-point.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |