diff --git a/annotations/src/main/java/mindustry/annotations/BaseProcessor.java b/annotations/src/main/java/mindustry/annotations/BaseProcessor.java index a1662e4e15..14bcb143ae 100644 --- a/annotations/src/main/java/mindustry/annotations/BaseProcessor.java +++ b/annotations/src/main/java/mindustry/annotations/BaseProcessor.java @@ -71,6 +71,10 @@ public abstract class BaseProcessor extends AbstractProcessor{ return cons.newInstance(name); } + public static TypeName tname(Class c){ + return ClassName.get(c).box(); + } + public static TypeVariableName getTVN(TypeParameterElement element) { String name = element.getSimpleName().toString(); List boundsMirrors = element.getBounds(); @@ -113,6 +117,10 @@ public abstract class BaseProcessor extends AbstractProcessor{ } } + public Array elements(Class type){ + return Array.with(env.getElementsAnnotatedWith(type)).map(Selement::new); + } + public Array types(Class type){ return Array.with(env.getElementsAnnotatedWith(type)).select(e -> e instanceof TypeElement) .map(e -> new Stype((TypeElement)e)); diff --git a/annotations/src/main/java/mindustry/annotations/impl/EntityProcess.java b/annotations/src/main/java/mindustry/annotations/impl/EntityProcess.java index 6d7ac8c736..85c31e3184 100644 --- a/annotations/src/main/java/mindustry/annotations/impl/EntityProcess.java +++ b/annotations/src/main/java/mindustry/annotations/impl/EntityProcess.java @@ -30,7 +30,7 @@ public class EntityProcess extends BaseProcessor{ Array baseComponents; ObjectMap componentNames = new ObjectMap<>(); ObjectMap> componentDependencies = new ObjectMap<>(); - ObjectMap> defComponents = new ObjectMap<>(); + ObjectMap> defComponents = new ObjectMap<>(); ObjectMap varInitializers = new ObjectMap<>(); ObjectSet imports = new ObjectSet<>(); @@ -45,7 +45,7 @@ public class EntityProcess extends BaseProcessor{ if(round == 1){ baseComponents = types(BaseComponent.class); Array allGroups = methods(GroupDef.class); - Array allDefs = types(EntityDef.class); + Array allDefs = elements(EntityDef.class); Array allComponents = types(Component.class); //store components @@ -157,13 +157,15 @@ public class EntityProcess extends BaseProcessor{ } //look at each definition - for(Stype type : allDefs){ + for(Selement type : allDefs){ EntityDef ann = type.annotation(EntityDef.class); boolean isFinal = ann.isFinal(); - if(!type.name().endsWith("Def")){ + if(type.isType() && !type.name().endsWith("Def")){ err("All entity def names must end with 'Def'", type.e); } - String name = type.name().replace("Def", "Entity"); + String name = type.isType() ? + type.name().replace("Def", "Entity") : + createName(type); TypeSpec.Builder builder = TypeSpec.classBuilder(name).addModifiers(Modifier.PUBLIC); if(isFinal) builder.addModifiers(Modifier.FINAL); @@ -287,7 +289,7 @@ public class EntityProcess extends BaseProcessor{ .returns(tname(packageName + "." + name)) .addStatement(ann.pooled() ? "return Pools.obtain($L.class, " +name +"::new)" : "return new $L()", name).build()); - definitions.add(new EntityDefinition("mindustry.gen." + name, builder, type, components, groups)); + definitions.add(new EntityDefinition(packageName + "." + name, builder, type, components, groups)); } //generate groups @@ -357,17 +359,25 @@ public class EntityProcess extends BaseProcessor{ PropertiesUtils.store(map, idProps.writer(false), "Maps entity names to IDs. Autogenerated."); //build mapping class for sync IDs - TypeSpec.Builder idBuilder = TypeSpec.classBuilder("ClassMapping").addModifiers(Modifier.PUBLIC) - .addField(FieldSpec.builder(TypeName.get(Prov[].class), "mapping", Modifier.PRIVATE, Modifier.STATIC).initializer("new Prov[256]").build()) + TypeSpec.Builder idBuilder = TypeSpec.classBuilder("EntityMapping").addModifiers(Modifier.PUBLIC) + .addField(FieldSpec.builder(TypeName.get(Prov[].class), "idMap", Modifier.PRIVATE, Modifier.STATIC).initializer("new Prov[256]").build()) + .addField(FieldSpec.builder(ParameterizedTypeName.get(ClassName.get(ObjectMap.class), + tname(String.class), tname(Prov.class)), + "nameMap", Modifier.PRIVATE, Modifier.STATIC).initializer("new ObjectMap<>()").build()) .addMethod(MethodSpec.methodBuilder("map").addModifiers(Modifier.PUBLIC, Modifier.STATIC) - .returns(TypeName.get(Prov.class)).addParameter(int.class, "id").addStatement("return mapping[id]").build()); + .returns(TypeName.get(Prov.class)).addParameter(int.class, "id").addStatement("return idMap[id]").build()) + .addMethod(MethodSpec.methodBuilder("map").addModifiers(Modifier.PUBLIC, Modifier.STATIC) + .returns(TypeName.get(Prov.class)).addParameter(String.class, "name").addStatement("return nameMap.get(name)").build()); CodeBlock.Builder idStore = CodeBlock.builder(); //store the mappings for(EntityDefinition def : definitions){ //store mapping - idStore.addStatement("mapping[$L] = $L::new", def.classID, def.name); + idStore.addStatement("idMap[$L] = $L::new", def.classID, def.name); + idStore.addStatement("nameMap.put($S, $L::new)", def.name.substring(packageName.length() + 1), def.name); + idStore.addStatement("nameMap.put($S, $L::new)", def.base.name(), def.name); + //return mapping def.builder.addMethod(MethodSpec.methodBuilder("classId").addAnnotation(Override.class) .returns(int.class).addModifiers(Modifier.PUBLIC).addStatement("return " + def.classID).build()); @@ -489,7 +499,7 @@ public class EntityProcess extends BaseProcessor{ } /** @return all components that a entity def has */ - Array allComponents(Stype type){ + Array allComponents(Selement type){ if(!defComponents.containsKey(type)){ //get base defs Array components = types(type.annotation(EntityDef.class), EntityDef::value); @@ -542,6 +552,12 @@ public class EntityProcess extends BaseProcessor{ return componentNames.get(name); } + String createName(Selement elem){ + Array comps = types(elem.annotation(EntityDef.class), EntityDef::value); + comps.sortComparing(Selement::name); + return comps.toString("", s -> s.name().replace("Comp", "")) + "Entity"; + } + boolean isComponent(Stype type){ return type.annotation(Component.class) != null; } @@ -560,7 +576,7 @@ public class EntityProcess extends BaseProcessor{ final ClassName baseType; final Array components; final boolean spatial, mapping; - final ObjectSet manualInclusions = new ObjectSet<>(); + final ObjectSet manualInclusions = new ObjectSet<>(); public GroupDefinition(String name, ClassName bestType, Array components, boolean spatial, boolean mapping){ this.baseType = bestType; @@ -580,11 +596,11 @@ public class EntityProcess extends BaseProcessor{ final Array groups; final Array components; final TypeSpec.Builder builder; - final Stype base; + final Selement base; final String name; int classID; - public EntityDefinition(String name, Builder builder, Stype base, Array components, Array groups){ + public EntityDefinition(String name, Builder builder, Selement base, Array components, Array groups){ this.builder = builder; this.name = name; this.base = base; diff --git a/annotations/src/main/java/mindustry/annotations/util/Selement.java b/annotations/src/main/java/mindustry/annotations/util/Selement.java index 0c752c3521..94bf350009 100644 --- a/annotations/src/main/java/mindustry/annotations/util/Selement.java +++ b/annotations/src/main/java/mindustry/annotations/util/Selement.java @@ -15,6 +15,34 @@ public class Selement{ this.e = e; } + public String fullName(){ + return e.toString(); + } + + public Stype asType(){ + return new Stype((TypeElement)e); + } + + public Svar asVar(){ + return new Svar((VariableElement)e); + } + + public Smethod asMethod(){ + return new Smethod((ExecutableElement)e); + } + + public boolean isVar(){ + return e instanceof VariableElement; + } + + public boolean isType(){ + return e instanceof TypeElement; + } + + public boolean isMethod(){ + return e instanceof ExecutableElement; + } + public Array annotations(){ return Array.with(e.getAnnotationMirrors()); } diff --git a/core/assets/sprites/sprites.atlas b/core/assets/sprites/sprites.atlas index bb1a33032d..db21569368 100644 --- a/core/assets/sprites/sprites.atlas +++ b/core/assets/sprites/sprites.atlas @@ -20,7 +20,7 @@ mend-projector-top index: -1 mender-top rotate: false - xy: 1746, 969 + xy: 1243, 71 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -34,35 +34,35 @@ overdrive-projector-top index: -1 shock-mine rotate: false - xy: 1360, 995 + xy: 1265, 785 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 bridge-arrow rotate: false - xy: 1148, 955 + xy: 1916, 979 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 bridge-conveyor-bridge rotate: false - xy: 1148, 819 + xy: 1984, 961 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 bridge-conveyor-end rotate: false - xy: 1163, 785 + xy: 1984, 927 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 center rotate: false - xy: 1163, 751 + xy: 1576, 995 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -90,42 +90,42 @@ armored-conveyor-0-1 index: -1 armored-conveyor-0-2 rotate: false - xy: 1012, 995 + xy: 1758, 1079 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 armored-conveyor-0-3 rotate: false - xy: 1012, 961 + xy: 1012, 995 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 armored-conveyor-1-0 rotate: false - xy: 817, 1115 + xy: 1012, 961 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 armored-conveyor-1-1 rotate: false - xy: 1096, 1125 + xy: 817, 1115 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 armored-conveyor-1-2 rotate: false - xy: 1054, 1041 + xy: 1096, 1125 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 armored-conveyor-1-3 rotate: false - xy: 1708, 1087 + xy: 1054, 1041 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -181,21 +181,21 @@ armored-conveyor-3-2 index: -1 armored-conveyor-3-3 rotate: false - xy: 1708, 1053 + xy: 1792, 1071 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 armored-conveyor-4-0 rotate: false - xy: 1742, 1079 + xy: 1758, 1045 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 armored-conveyor-4-1 rotate: false - xy: 1742, 1045 + xy: 1792, 1037 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -216,266 +216,266 @@ armored-conveyor-4-3 index: -1 conveyor-0-1 rotate: false - xy: 1211, 241 + xy: 1122, 989 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 conveyor-0-2 rotate: false - xy: 1219, 207 + xy: 1130, 1091 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 conveyor-0-3 rotate: false - xy: 1219, 173 + xy: 1130, 1125 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 conveyor-1-0 rotate: false - xy: 1219, 139 + xy: 1148, 955 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 conveyor-1-1 rotate: false - xy: 1219, 105 + xy: 1148, 921 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 conveyor-1-2 rotate: false - xy: 1712, 1011 + xy: 1148, 887 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 conveyor-1-3 rotate: false - xy: 1712, 977 + xy: 1148, 853 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 conveyor-2-0 rotate: false - xy: 1156, 1023 + xy: 1148, 819 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 conveyor-2-1 rotate: false - xy: 1156, 989 + xy: 1163, 785 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 conveyor-2-2 rotate: false - xy: 1160, 1057 + xy: 1163, 751 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 conveyor-2-3 rotate: false - xy: 1164, 1091 + xy: 1163, 717 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 conveyor-3-0 rotate: false - xy: 1198, 1091 + xy: 1163, 683 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 conveyor-3-1 rotate: false - xy: 1194, 1057 + xy: 1163, 649 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 conveyor-3-2 rotate: false - xy: 1190, 1023 + xy: 1163, 615 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 conveyor-3-3 rotate: false - xy: 1190, 989 + xy: 1163, 581 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 conveyor-4-0 rotate: false - xy: 1182, 955 + xy: 1181, 547 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 conveyor-4-1 rotate: false - xy: 1182, 921 + xy: 1181, 513 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 conveyor-4-2 rotate: false - xy: 1182, 887 + xy: 1181, 479 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 conveyor-4-3 rotate: false - xy: 1182, 853 + xy: 1209, 445 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 titanium-conveyor-0-1 rotate: false - xy: 1284, 961 + xy: 1265, 717 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 titanium-conveyor-0-2 rotate: false - xy: 1284, 927 + xy: 1265, 683 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 titanium-conveyor-0-3 rotate: false - xy: 1318, 961 + xy: 1265, 649 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 titanium-conveyor-1-0 rotate: false - xy: 1284, 893 + xy: 1265, 615 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 titanium-conveyor-1-1 rotate: false - xy: 1352, 961 + xy: 1265, 581 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 titanium-conveyor-1-2 rotate: false - xy: 1318, 927 + xy: 1283, 547 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 titanium-conveyor-1-3 rotate: false - xy: 1284, 859 + xy: 1283, 513 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 titanium-conveyor-2-0 rotate: false - xy: 1386, 961 + xy: 1283, 479 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 titanium-conveyor-2-1 rotate: false - xy: 1352, 927 + xy: 1262, 1029 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 titanium-conveyor-2-2 rotate: false - xy: 1318, 893 + xy: 1296, 1029 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 titanium-conveyor-2-3 rotate: false - xy: 1284, 825 + xy: 1330, 1029 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 titanium-conveyor-3-0 rotate: false - xy: 1386, 927 + xy: 1364, 1029 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 titanium-conveyor-3-1 rotate: false - xy: 1352, 893 + xy: 1398, 1029 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 titanium-conveyor-3-2 rotate: false - xy: 1318, 859 + xy: 1258, 995 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 titanium-conveyor-3-3 rotate: false - xy: 1386, 893 + xy: 1292, 995 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 titanium-conveyor-4-0 rotate: false - xy: 1352, 859 + xy: 1326, 995 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 titanium-conveyor-4-1 rotate: false - xy: 1318, 825 + xy: 1360, 995 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 titanium-conveyor-4-2 rotate: false - xy: 1386, 859 + xy: 1394, 995 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 titanium-conveyor-4-3 rotate: false - xy: 1352, 825 + xy: 1284, 961 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -489,28 +489,28 @@ mass-driver-base index: -1 phase-conveyor-arrow rotate: false - xy: 1224, 989 + xy: 1277, 445 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 phase-conveyor-bridge rotate: false - xy: 1262, 1063 + xy: 1277, 411 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 phase-conveyor-end rotate: false - xy: 1296, 1063 + xy: 1277, 377 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 underflow-gate rotate: false - xy: 1299, 791 + xy: 1284, 893 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -685,28 +685,28 @@ water-extractor-top index: -1 block-border rotate: false - xy: 1776, 1037 + xy: 1046, 973 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-middle rotate: false - xy: 715, 1247 + xy: 1113, 513 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-select rotate: false - xy: 1143, 343 + xy: 1143, 309 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 conduit-liquid rotate: false - xy: 1181, 513 + xy: 1814, 927 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -832,175 +832,175 @@ rubble-8-1 index: -1 bridge-conduit-arrow rotate: false - xy: 1148, 921 + xy: 1950, 979 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 bridge-conveyor-arrow rotate: false - xy: 1148, 921 + xy: 1950, 979 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 bridge-conduit-bridge rotate: false - xy: 1148, 887 + xy: 1916, 945 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 bridge-conduit-end rotate: false - xy: 1148, 853 + xy: 1950, 945 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 conduit-bottom rotate: false - xy: 1163, 683 + xy: 1644, 987 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 conduit-bottom-0 rotate: false - xy: 1163, 649 + xy: 1678, 987 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 conduit-bottom-1 rotate: false - xy: 1163, 615 + xy: 1712, 961 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 conduit-bottom-2 rotate: false - xy: 1163, 581 + xy: 1746, 943 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 conduit-bottom-3 rotate: false - xy: 1163, 581 + xy: 1746, 943 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 conduit-bottom-4 rotate: false - xy: 1163, 581 + xy: 1746, 943 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 conduit-bottom-6 rotate: false - xy: 1163, 581 + xy: 1746, 943 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 conduit-bottom-5 rotate: false - xy: 1181, 547 + xy: 1780, 935 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 conduit-top-0 rotate: false - xy: 1181, 479 + xy: 1848, 927 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 conduit-top-1 rotate: false - xy: 1209, 445 + xy: 1882, 919 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 conduit-top-2 rotate: false - xy: 1209, 411 + xy: 1916, 911 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 conduit-top-3 rotate: false - xy: 1209, 377 + xy: 1950, 911 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 pulse-conduit-top-3 rotate: false - xy: 1209, 377 + xy: 1950, 911 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 conduit-top-4 rotate: false - xy: 1211, 343 + xy: 1984, 893 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 conduit-top-5 rotate: false - xy: 1211, 309 + xy: 1126, 1057 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 conduit-top-6 rotate: false - xy: 1211, 275 + xy: 1122, 1023 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 liquid-overflow-gate rotate: false - xy: 1287, 139 + xy: 1243, 377 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 liquid-overflow-gate-top rotate: false - xy: 1287, 105 + xy: 1245, 343 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 liquid-router-bottom rotate: false - xy: 1311, 71 + xy: 1245, 309 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 liquid-router-liquid rotate: false - xy: 1311, 37 + xy: 1245, 275 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 liquid-router-top rotate: false - xy: 1243, 3 + xy: 1245, 241 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -1028,119 +1028,119 @@ liquid-tank-top index: -1 phase-conduit-arrow rotate: false - xy: 1780, 969 + xy: 1243, 37 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 phase-conduit-bridge rotate: false - xy: 1228, 1057 + xy: 1277, 71 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 phase-conduit-end rotate: false - xy: 1224, 1023 + xy: 1277, 37 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 plated-conduit-cap rotate: false - xy: 1330, 1063 + xy: 1279, 343 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 plated-conduit-top-0 rotate: false - xy: 1364, 1063 + xy: 1279, 309 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 plated-conduit-top-1 rotate: false - xy: 1398, 1063 + xy: 1279, 275 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 plated-conduit-top-2 rotate: false - xy: 1250, 955 + xy: 1279, 241 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 plated-conduit-top-3 rotate: false - xy: 1250, 921 + xy: 1287, 207 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 plated-conduit-top-4 rotate: false - xy: 1250, 887 + xy: 1287, 173 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 plated-conduit-top-5 rotate: false - xy: 1250, 853 + xy: 1287, 139 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 plated-conduit-top-6 rotate: false - xy: 1250, 819 + xy: 1287, 105 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 pulse-conduit-top-0 rotate: false - xy: 1265, 751 + xy: 1311, 37 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 pulse-conduit-top-1 rotate: false - xy: 1265, 717 + xy: 1243, 3 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 pulse-conduit-top-2 rotate: false - xy: 1265, 683 + xy: 1277, 3 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 pulse-conduit-top-4 rotate: false - xy: 1265, 649 + xy: 1311, 3 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 pulse-conduit-top-5 rotate: false - xy: 1265, 615 + xy: 1228, 1057 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 pulse-conduit-top-6 rotate: false - xy: 1265, 581 + xy: 1224, 1023 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -1189,7 +1189,7 @@ block-battery-large-full index: -1 combustion-generator-top rotate: false - xy: 1163, 717 + xy: 1610, 995 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -1210,14 +1210,14 @@ differential-generator-top index: -1 diode-arrow rotate: false - xy: 1215, 547 + xy: 1219, 139 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 illuminator-top rotate: false - xy: 1216, 921 + xy: 1160, 1057 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -1273,14 +1273,14 @@ impact-reactor-plasma-3 index: -1 power-source rotate: false - xy: 1265, 785 + xy: 1311, 71 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 rtg-generator-top rotate: false - xy: 1330, 1029 + xy: 1398, 1063 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -1427,21 +1427,21 @@ plastanium-compressor-top index: -1 pulverizer rotate: false - xy: 1283, 547 + xy: 1224, 989 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 pulverizer-rotator rotate: false - xy: 1283, 513 + xy: 1262, 1063 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 pump-liquid rotate: false - xy: 1283, 479 + xy: 1296, 1063 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -1504,7 +1504,7 @@ spore-press-top index: -1 unloader-center rotate: false - xy: 1299, 757 + xy: 1284, 859 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -1518,7 +1518,7 @@ arc-heat index: -1 block-1 rotate: false - xy: 1776, 1071 + xy: 1096, 1091 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -1595,7 +1595,7 @@ salvo-panel-right index: -1 scorch-heat rotate: false - xy: 1398, 1029 + xy: 1250, 921 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -1721,7 +1721,7 @@ rally-point index: -1 repair-point-base rotate: false - xy: 1296, 1029 + xy: 1364, 1063 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -1770,14 +1770,14 @@ door-large-open index: -1 door-open rotate: false - xy: 1215, 513 + xy: 1219, 105 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 insulator-wall rotate: false - xy: 1216, 887 + xy: 1164, 1091 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -1833,28 +1833,28 @@ scrap-wall-large4 index: -1 scrap-wall2 rotate: false - xy: 1258, 995 + xy: 1250, 887 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 scrap-wall3 rotate: false - xy: 1292, 995 + xy: 1250, 853 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 scrap-wall4 rotate: false - xy: 1326, 995 + xy: 1250, 819 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 scrap-wall5 rotate: false - xy: 1326, 995 + xy: 1250, 819 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -1875,7 +1875,7 @@ bullet-back index: -1 casing rotate: false - xy: 2039, 1771 + xy: 1984, 995 size: 8, 16 orig: 8, 16 offset: 0, 0 @@ -1959,35 +1959,35 @@ scale_marker index: -1 scorch1 rotate: false - xy: 1299, 655 + xy: 1318, 893 size: 28, 100 orig: 28, 100 offset: 0, 0 index: -1 scorch2 rotate: false - xy: 1311, 377 + xy: 1348, 893 size: 28, 100 orig: 28, 100 offset: 0, 0 index: -1 scorch3 rotate: false - xy: 1313, 275 + xy: 1378, 893 size: 28, 100 orig: 28, 100 offset: 0, 0 index: -1 scorch4 rotate: false - xy: 1420, 893 + xy: 2018, 893 size: 28, 100 orig: 28, 100 offset: 0, 0 index: -1 scorch5 rotate: false - xy: 1814, 935 + xy: 1408, 893 size: 28, 100 orig: 28, 100 offset: 0, 0 @@ -2008,7 +2008,7 @@ shell-back index: -1 shot rotate: false - xy: 1394, 995 + xy: 1265, 751 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -2022,7 +2022,7 @@ transfer index: -1 transfer-arrow rotate: false - xy: 1386, 825 + xy: 1284, 927 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -2050,7 +2050,7 @@ arc index: -1 block-arc-full rotate: false - xy: 1810, 1071 + xy: 1054, 1007 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -2064,42 +2064,42 @@ block-blast-drill-full index: -1 block-bridge-conduit-full rotate: false - xy: 1810, 1037 + xy: 1046, 939 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 bridge-conduit rotate: false - xy: 1810, 1037 + xy: 1046, 939 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-bridge-conveyor-full rotate: false - xy: 1844, 1029 + xy: 1046, 905 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 bridge-conveyor rotate: false - xy: 1844, 1029 + xy: 1046, 905 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-char-full rotate: false - xy: 1096, 1091 + xy: 2009, 1505 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-cliffs-full rotate: false - xy: 2009, 1505 + xy: 2001, 1471 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -2120,14 +2120,14 @@ coal-centrifuge index: -1 block-combustion-generator-full rotate: false - xy: 2001, 1471 + xy: 2001, 1437 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 combustion-generator rotate: false - xy: 2001, 1471 + xy: 2001, 1437 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -2148,7 +2148,7 @@ command-center index: -1 block-conduit-full rotate: false - xy: 2001, 1437 + xy: 2001, 1403 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -2169,28 +2169,28 @@ container index: -1 block-conveyor-full rotate: false - xy: 2001, 1403 + xy: 1092, 1057 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 conveyor-0-0 rotate: false - xy: 2001, 1403 + xy: 1092, 1057 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-copper-wall-full rotate: false - xy: 1054, 1007 + xy: 1088, 1023 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 copper-wall rotate: false - xy: 1054, 1007 + xy: 1088, 1023 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -2253,7 +2253,7 @@ core-shard index: -1 block-craters-full rotate: false - xy: 1046, 973 + xy: 1088, 989 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -2295,70 +2295,70 @@ block-dagger-factory-full index: -1 block-dark-metal-full rotate: false - xy: 1046, 939 + xy: 1080, 955 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-dark-panel-1-full rotate: false - xy: 1046, 905 + xy: 1080, 921 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-dark-panel-2-full rotate: false - xy: 1092, 1057 + xy: 1080, 887 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-dark-panel-3-full rotate: false - xy: 1088, 1023 + xy: 1046, 871 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-dark-panel-4-full rotate: false - xy: 1088, 989 + xy: 1012, 859 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-dark-panel-5-full rotate: false - xy: 1080, 955 + xy: 1080, 853 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-dark-panel-6-full rotate: false - xy: 1080, 921 + xy: 1046, 837 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-darksand-full rotate: false - xy: 1080, 887 + xy: 1080, 819 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-darksand-tainted-water-full rotate: false - xy: 1046, 871 + xy: 993, 825 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-darksand-water-full rotate: false - xy: 1012, 859 + xy: 993, 791 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -2379,7 +2379,7 @@ dart-ship-pad index: -1 block-deepwater-full rotate: false - xy: 1080, 853 + xy: 993, 757 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -2414,14 +2414,14 @@ differential-generator index: -1 block-diode-full rotate: false - xy: 1046, 837 + xy: 993, 723 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 diode rotate: false - xy: 1046, 837 + xy: 993, 723 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -2442,14 +2442,14 @@ distributor index: -1 block-door-full rotate: false - xy: 1080, 819 + xy: 993, 689 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 door rotate: false - xy: 1080, 819 + xy: 993, 689 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -2477,14 +2477,14 @@ block-draug-factory-full index: -1 block-dunerocks-full rotate: false - xy: 993, 825 + xy: 993, 655 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-duo-full rotate: false - xy: 993, 791 + xy: 993, 621 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -2554,70 +2554,70 @@ graphite-press index: -1 block-grass-full rotate: false - xy: 993, 757 + xy: 993, 587 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-hail-full rotate: false - xy: 993, 723 + xy: 1027, 803 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-holostone-full rotate: false - xy: 993, 689 + xy: 1027, 769 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-hotrock-full rotate: false - xy: 993, 655 + xy: 1027, 735 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-ice-full rotate: false - xy: 993, 621 + xy: 1027, 701 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-ice-snow-full rotate: false - xy: 993, 587 + xy: 1027, 667 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-icerocks-full rotate: false - xy: 1027, 803 + xy: 1027, 633 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-ignarock-full rotate: false - xy: 1027, 769 + xy: 1027, 599 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-illuminator-full rotate: false - xy: 1027, 735 + xy: 1061, 785 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 illuminator rotate: false - xy: 1027, 735 + xy: 1061, 785 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -2631,56 +2631,56 @@ block-impact-reactor-full index: -1 block-incinerator-full rotate: false - xy: 1027, 701 + xy: 1061, 751 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 incinerator rotate: false - xy: 1027, 701 + xy: 1061, 751 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-inverted-sorter-full rotate: false - xy: 1027, 667 + xy: 1061, 717 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 inverted-sorter rotate: false - xy: 1027, 667 + xy: 1061, 717 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-item-source-full rotate: false - xy: 1027, 633 + xy: 1061, 683 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 item-source rotate: false - xy: 1027, 633 + xy: 1061, 683 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-item-void-full rotate: false - xy: 1027, 599 + xy: 1061, 649 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 item-void rotate: false - xy: 1027, 599 + xy: 1061, 649 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -2701,14 +2701,14 @@ javelin-ship-pad index: -1 block-junction-full rotate: false - xy: 1061, 785 + xy: 1061, 615 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 junction rotate: false - xy: 1061, 785 + xy: 1061, 615 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -2771,35 +2771,35 @@ launch-pad-large index: -1 block-liquid-junction-full rotate: false - xy: 1061, 751 + xy: 1095, 785 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 liquid-junction rotate: false - xy: 1061, 751 + xy: 1095, 785 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-liquid-router-full rotate: false - xy: 1061, 717 + xy: 1095, 751 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-liquid-source-full rotate: false - xy: 1061, 683 + xy: 1095, 717 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 liquid-source rotate: false - xy: 1061, 683 + xy: 1095, 717 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -2813,21 +2813,21 @@ block-liquid-tank-full index: -1 block-liquid-void-full rotate: false - xy: 1061, 649 + xy: 1095, 683 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 liquid-void rotate: false - xy: 1061, 649 + xy: 1095, 683 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-magmarock-full rotate: false - xy: 1061, 615 + xy: 1095, 649 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -2848,14 +2848,14 @@ block-mechanical-drill-full index: -1 block-mechanical-pump-full rotate: false - xy: 1095, 785 + xy: 1095, 615 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 mechanical-pump rotate: false - xy: 1095, 785 + xy: 1095, 615 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -2869,14 +2869,14 @@ block-meltdown-full index: -1 block-melter-full rotate: false - xy: 1095, 751 + xy: 1061, 581 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 melter rotate: false - xy: 1095, 751 + xy: 1061, 581 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -2897,70 +2897,70 @@ mend-projector index: -1 block-mender-full rotate: false - xy: 1095, 717 + xy: 1095, 581 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 mender rotate: false - xy: 1095, 717 + xy: 1095, 581 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-message-full rotate: false - xy: 1095, 683 + xy: 1027, 565 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 message rotate: false - xy: 1095, 683 + xy: 1027, 565 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-metal-floor-2-full rotate: false - xy: 1095, 649 + xy: 715, 1247 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-metal-floor-3-full rotate: false - xy: 1095, 615 + xy: 1079, 547 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-metal-floor-5-full rotate: false - xy: 1061, 581 + xy: 1079, 513 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-metal-floor-damaged-full rotate: false - xy: 1095, 581 + xy: 1079, 479 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-metal-floor-full rotate: false - xy: 1027, 565 + xy: 1113, 547 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-moss-full rotate: false - xy: 1878, 1021 + xy: 1113, 479 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -3002,42 +3002,42 @@ omega-mech-pad index: -1 block-ore-coal-full rotate: false - xy: 1079, 547 + xy: 1508, 1025 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-ore-copper-full rotate: false - xy: 1079, 513 + xy: 1542, 1025 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-ore-lead-full rotate: false - xy: 1079, 479 + xy: 1576, 1029 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-ore-scrap-full rotate: false - xy: 1113, 547 + xy: 1610, 1029 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-ore-thorium-full rotate: false - xy: 1113, 513 + xy: 1644, 1021 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-ore-titanium-full rotate: false - xy: 1113, 479 + xy: 1678, 1021 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -3058,21 +3058,21 @@ overdrive-projector index: -1 block-overflow-gate-full rotate: false - xy: 1508, 1025 + xy: 1712, 1029 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 overflow-gate rotate: false - xy: 1508, 1025 + xy: 1712, 1029 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-pebbles-full rotate: false - xy: 1542, 1025 + xy: 1826, 1029 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -3086,42 +3086,42 @@ block-phantom-factory-full index: -1 block-phase-conduit-full rotate: false - xy: 1576, 1029 + xy: 1860, 1029 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 phase-conduit rotate: false - xy: 1576, 1029 + xy: 1860, 1029 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-phase-conveyor-full rotate: false - xy: 1610, 1029 + xy: 1894, 1021 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 phase-conveyor rotate: false - xy: 1610, 1029 + xy: 1894, 1021 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-phase-wall-full rotate: false - xy: 1644, 1021 + xy: 1114, 955 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 phase-wall rotate: false - xy: 1644, 1021 + xy: 1114, 955 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -3170,14 +3170,14 @@ plastanium-compressor index: -1 block-plastanium-wall-full rotate: false - xy: 1114, 955 + xy: 1114, 921 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 plastanium-wall rotate: false - xy: 1114, 955 + xy: 1114, 921 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -3198,7 +3198,7 @@ plastanium-wall-large index: -1 block-plated-conduit-full rotate: false - xy: 1114, 921 + xy: 1114, 887 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -3212,14 +3212,14 @@ block-pneumatic-drill-full index: -1 block-power-node-full rotate: false - xy: 1114, 887 + xy: 1114, 853 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 power-node rotate: false - xy: 1114, 887 + xy: 1114, 853 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -3240,35 +3240,35 @@ power-node-large index: -1 block-power-source-full rotate: false - xy: 1114, 853 + xy: 1114, 819 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-power-void-full rotate: false - xy: 1114, 819 + xy: 1129, 785 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 power-void rotate: false - xy: 1114, 819 + xy: 1129, 785 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-pulse-conduit-full rotate: false - xy: 1129, 785 + xy: 1129, 751 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-pulverizer-full rotate: false - xy: 1129, 751 + xy: 1129, 717 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -3289,7 +3289,7 @@ pyratite-mixer index: -1 block-repair-point-full rotate: false - xy: 1129, 717 + xy: 1129, 683 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -3317,7 +3317,7 @@ block-rock-full index: -1 block-rocks-full rotate: false - xy: 1129, 683 + xy: 1129, 649 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -3338,14 +3338,14 @@ rotary-pump index: -1 block-router-full rotate: false - xy: 1129, 649 + xy: 1129, 615 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 router rotate: false - xy: 1129, 649 + xy: 1129, 615 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -3366,14 +3366,14 @@ rtg-generator index: -1 block-salt-full rotate: false - xy: 1129, 615 + xy: 1129, 581 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-saltrocks-full rotate: false - xy: 1129, 581 + xy: 1147, 547 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -3387,28 +3387,28 @@ block-salvo-full index: -1 block-sand-boulder-full rotate: false - xy: 1147, 547 + xy: 1147, 513 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-sand-full rotate: false - xy: 1147, 513 + xy: 1147, 479 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-sand-water-full rotate: false - xy: 1147, 479 + xy: 1141, 445 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-sandrocks-full rotate: false - xy: 1141, 445 + xy: 1141, 411 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -3422,21 +3422,21 @@ block-scatter-full index: -1 block-scorch-full rotate: false - xy: 1141, 411 + xy: 1141, 377 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-scrap-wall-full rotate: false - xy: 1141, 377 + xy: 1143, 343 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 scrap-wall1 rotate: false - xy: 1141, 377 + xy: 1143, 343 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -3492,35 +3492,35 @@ separator index: -1 block-shale-boulder-full rotate: false - xy: 1143, 309 + xy: 1143, 275 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-shale-full rotate: false - xy: 1143, 275 + xy: 1143, 241 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-shalerocks-full rotate: false - xy: 1143, 241 + xy: 1712, 995 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-shock-mine-full rotate: false - xy: 1175, 445 + xy: 1746, 1011 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-shrubs-full rotate: false - xy: 1175, 411 + xy: 1746, 977 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -3541,14 +3541,14 @@ silicon-smelter index: -1 block-slag-full rotate: false - xy: 1175, 377 + xy: 1780, 1003 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-snow-full rotate: false - xy: 1177, 343 + xy: 1780, 969 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -3569,21 +3569,21 @@ block-snowrock-full index: -1 block-snowrocks-full rotate: false - xy: 1177, 309 + xy: 1814, 995 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-solar-panel-full rotate: false - xy: 1177, 275 + xy: 1848, 995 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 solar-panel rotate: false - xy: 1177, 275 + xy: 1848, 995 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -3604,21 +3604,21 @@ solar-panel-large index: -1 block-sorter-full rotate: false - xy: 1177, 241 + xy: 1814, 961 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 sorter rotate: false - xy: 1177, 241 + xy: 1814, 961 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-spawn-full rotate: false - xy: 1185, 207 + xy: 1848, 961 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -3646,7 +3646,7 @@ block-spore-cluster-full index: -1 block-spore-moss-full rotate: false - xy: 1185, 173 + xy: 1882, 987 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -3667,14 +3667,14 @@ block-spore-press-full index: -1 block-sporerocks-full rotate: false - xy: 1185, 139 + xy: 1882, 953 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-stone-full rotate: false - xy: 1185, 105 + xy: 1175, 445 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -3695,14 +3695,14 @@ surge-tower index: -1 block-surge-wall-full rotate: false - xy: 1576, 995 + xy: 1175, 411 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 surge-wall rotate: false - xy: 1576, 995 + xy: 1175, 411 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -3730,14 +3730,14 @@ block-swarmer-full index: -1 block-tainted-water-full rotate: false - xy: 1610, 995 + xy: 1175, 377 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-tar-full rotate: false - xy: 1644, 987 + xy: 1177, 343 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -3758,7 +3758,7 @@ tau-mech-pad index: -1 block-tendrils-full rotate: false - xy: 1678, 1019 + xy: 1177, 309 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -3807,14 +3807,14 @@ thorium-reactor index: -1 block-thorium-wall-full rotate: false - xy: 1678, 985 + xy: 1177, 275 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 thorium-wall rotate: false - xy: 1678, 985 + xy: 1177, 275 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -3856,28 +3856,28 @@ block-titan-factory-full index: -1 block-titanium-conveyor-full rotate: false - xy: 1126, 1057 + xy: 1177, 241 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 titanium-conveyor-0-0 rotate: false - xy: 1126, 1057 + xy: 1177, 241 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-titanium-wall-full rotate: false - xy: 1122, 1023 + xy: 1185, 207 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 titanium-wall rotate: false - xy: 1122, 1023 + xy: 1185, 207 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -3926,21 +3926,21 @@ turbine-generator index: -1 block-underflow-gate-full rotate: false - xy: 1122, 989 + xy: 1185, 173 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 block-unloader-full rotate: false - xy: 1130, 1091 + xy: 1185, 139 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 unloader rotate: false - xy: 1130, 1091 + xy: 1185, 139 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -3968,7 +3968,7 @@ block-water-extractor-full index: -1 block-water-full rotate: false - xy: 1130, 1125 + xy: 1185, 105 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -4003,56 +4003,56 @@ block-wraith-factory-full index: -1 cracks-1-0 rotate: false - xy: 1182, 819 + xy: 1209, 411 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 cracks-1-1 rotate: false - xy: 1197, 785 + xy: 1209, 377 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 cracks-1-2 rotate: false - xy: 1197, 751 + xy: 1211, 343 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 cracks-1-3 rotate: false - xy: 1197, 717 + xy: 1211, 309 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 cracks-1-4 rotate: false - xy: 1197, 683 + xy: 1211, 275 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 cracks-1-5 rotate: false - xy: 1197, 649 + xy: 1211, 241 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 cracks-1-6 rotate: false - xy: 1197, 615 + xy: 1219, 207 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 cracks-1-7 rotate: false - xy: 1197, 581 + xy: 1219, 173 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -4290,7 +4290,7 @@ cyclone index: -1 duo rotate: false - xy: 1215, 479 + xy: 1156, 1023 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -4304,7 +4304,7 @@ fuse index: -1 hail rotate: false - xy: 1216, 955 + xy: 1156, 989 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -4318,7 +4318,7 @@ item-blast-compound-large index: -1 item-blast-compound-medium rotate: false - xy: 1216, 819 + xy: 1194, 1057 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -4353,7 +4353,7 @@ item-coal-large index: -1 item-coal-medium rotate: false - xy: 1231, 751 + xy: 1190, 989 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -4367,7 +4367,7 @@ item-coal-small index: -1 item-coal-tiny rotate: false - xy: 1061, 563 + xy: 1826, 1087 size: 16, 16 orig: 16, 16 offset: 0, 0 @@ -4388,7 +4388,7 @@ item-copper-large index: -1 item-copper-medium rotate: false - xy: 1231, 683 + xy: 1182, 921 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -4402,7 +4402,7 @@ item-copper-small index: -1 item-copper-tiny rotate: false - xy: 163, 732 + xy: 1826, 1069 size: 16, 16 orig: 16, 16 offset: 0, 0 @@ -4423,7 +4423,7 @@ item-graphite-large index: -1 item-graphite-medium rotate: false - xy: 1231, 615 + xy: 1182, 853 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -4437,7 +4437,7 @@ item-graphite-small index: -1 item-graphite-tiny rotate: false - xy: 1027, 1698 + xy: 1061, 563 size: 16, 16 orig: 16, 16 offset: 0, 0 @@ -4458,7 +4458,7 @@ item-lead-large index: -1 item-lead-medium rotate: false - xy: 1249, 547 + xy: 1197, 785 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -4472,7 +4472,7 @@ item-lead-small index: -1 item-lead-tiny rotate: false - xy: 623, 1709 + xy: 163, 732 size: 16, 16 orig: 16, 16 offset: 0, 0 @@ -4493,7 +4493,7 @@ item-metaglass-large index: -1 item-metaglass-medium rotate: false - xy: 1249, 479 + xy: 1197, 717 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -4507,7 +4507,7 @@ item-metaglass-small index: -1 item-metaglass-tiny rotate: false - xy: 1053, 245 + xy: 1027, 1698 size: 16, 16 orig: 16, 16 offset: 0, 0 @@ -4528,7 +4528,7 @@ item-phase-fabric-large index: -1 item-phase-fabric-medium rotate: false - xy: 1243, 411 + xy: 1197, 649 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -4542,7 +4542,7 @@ item-phase-fabric-small index: -1 item-phase-fabric-tiny rotate: false - xy: 925, 441 + xy: 623, 1709 size: 16, 16 orig: 16, 16 offset: 0, 0 @@ -4563,7 +4563,7 @@ item-plastanium-large index: -1 item-plastanium-medium rotate: false - xy: 1245, 343 + xy: 1197, 581 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -4577,7 +4577,7 @@ item-plastanium-small index: -1 item-plastanium-tiny rotate: false - xy: 649, 1399 + xy: 1053, 245 size: 16, 16 orig: 16, 16 offset: 0, 0 @@ -4598,7 +4598,7 @@ item-pyratite-large index: -1 item-pyratite-medium rotate: false - xy: 1245, 275 + xy: 1215, 513 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -4612,7 +4612,7 @@ item-pyratite-small index: -1 item-pyratite-tiny rotate: false - xy: 1021, 31 + xy: 925, 441 size: 16, 16 orig: 16, 16 offset: 0, 0 @@ -4633,7 +4633,7 @@ item-sand-large index: -1 item-sand-medium rotate: false - xy: 1253, 207 + xy: 1216, 955 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -4647,7 +4647,7 @@ item-sand-small index: -1 item-sand-tiny rotate: false - xy: 943, 754 + xy: 649, 1399 size: 16, 16 orig: 16, 16 offset: 0, 0 @@ -4668,7 +4668,7 @@ item-scrap-large index: -1 item-scrap-medium rotate: false - xy: 1253, 139 + xy: 1216, 887 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -4682,7 +4682,7 @@ item-scrap-small index: -1 item-scrap-tiny rotate: false - xy: 1027, 841 + xy: 1021, 31 size: 16, 16 orig: 16, 16 offset: 0, 0 @@ -4703,7 +4703,7 @@ item-silicon-large index: -1 item-silicon-medium rotate: false - xy: 1243, 71 + xy: 1216, 819 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -4717,7 +4717,7 @@ item-silicon-small index: -1 item-silicon-tiny rotate: false - xy: 1079, 461 + xy: 943, 754 size: 16, 16 orig: 16, 16 offset: 0, 0 @@ -4738,7 +4738,7 @@ item-spore-pod-large index: -1 item-spore-pod-medium rotate: false - xy: 1277, 71 + xy: 1231, 751 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -4752,7 +4752,7 @@ item-spore-pod-small index: -1 item-spore-pod-tiny rotate: false - xy: 1021, 13 + xy: 1027, 841 size: 16, 16 orig: 16, 16 offset: 0, 0 @@ -4773,7 +4773,7 @@ item-surge-alloy-large index: -1 item-surge-alloy-medium rotate: false - xy: 1277, 445 + xy: 1231, 683 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -4787,7 +4787,7 @@ item-surge-alloy-small index: -1 item-surge-alloy-tiny rotate: false - xy: 1420, 875 + xy: 1079, 461 size: 16, 16 orig: 16, 16 offset: 0, 0 @@ -4808,7 +4808,7 @@ item-thorium-large index: -1 item-thorium-medium rotate: false - xy: 1277, 377 + xy: 1231, 615 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -4822,7 +4822,7 @@ item-thorium-small index: -1 item-thorium-tiny rotate: false - xy: 1844, 1011 + xy: 1021, 13 size: 16, 16 orig: 16, 16 offset: 0, 0 @@ -4843,7 +4843,7 @@ item-titanium-large index: -1 item-titanium-medium rotate: false - xy: 1279, 309 + xy: 1249, 547 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -4857,7 +4857,7 @@ item-titanium-small index: -1 item-titanium-tiny rotate: false - xy: 285, 1387 + xy: 449, 215 size: 16, 16 orig: 16, 16 offset: 0, 0 @@ -4885,21 +4885,21 @@ liquid-cryofluid-large index: -1 liquid-cryofluid-medium rotate: false - xy: 1279, 241 + xy: 1249, 479 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 liquid-cryofluid-small rotate: false - xy: 1912, 1029 + xy: 1284, 833 size: 24, 24 orig: 24, 24 offset: 0, 0 index: -1 liquid-cryofluid-tiny rotate: false - xy: 230, 1129 + xy: 579, 345 size: 16, 16 orig: 16, 16 offset: 0, 0 @@ -4920,21 +4920,21 @@ liquid-oil-large index: -1 liquid-oil-medium rotate: false - xy: 1287, 173 + xy: 1243, 411 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 liquid-oil-small rotate: false - xy: 1299, 629 + xy: 1318, 867 size: 24, 24 orig: 24, 24 offset: 0, 0 index: -1 liquid-oil-tiny rotate: false - xy: 449, 215 + xy: 651, 417 size: 16, 16 orig: 16, 16 offset: 0, 0 @@ -4955,21 +4955,21 @@ liquid-slag-large index: -1 liquid-slag-medium rotate: false - xy: 1311, 3 + xy: 1253, 173 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 liquid-slag-small rotate: false - xy: 1333, 799 + xy: 285, 1379 size: 24, 24 orig: 24, 24 offset: 0, 0 index: -1 liquid-slag-tiny rotate: false - xy: 579, 345 + xy: 871, 735 size: 16, 16 orig: 16, 16 offset: 0, 0 @@ -4990,21 +4990,21 @@ liquid-water-large index: -1 liquid-water-medium rotate: false - xy: 1780, 1003 + xy: 1253, 105 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 liquid-water-small rotate: false - xy: 1313, 249 + xy: 230, 1121 size: 24, 24 orig: 24, 24 offset: 0, 0 index: -1 liquid-water-tiny rotate: false - xy: 651, 417 + xy: 1344, 875 size: 16, 16 orig: 16, 16 offset: 0, 0 @@ -5032,7 +5032,7 @@ meltdown index: -1 repair-point rotate: false - xy: 1262, 1029 + xy: 1330, 1063 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -5060,7 +5060,7 @@ scatter index: -1 scorch rotate: false - xy: 1364, 1029 + xy: 1250, 955 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -5079,6 +5079,13 @@ swarmer orig: 64, 64 offset: 0, 0 index: -1 +unit-dagger-full + rotate: false + xy: 1458, 1051 + size: 48, 48 + orig: 48, 48 + offset: 0, 0 + index: -1 wave rotate: false xy: 937, 1222 @@ -5088,140 +5095,140 @@ wave index: -1 item-blast-compound rotate: false - xy: 1216, 853 + xy: 1198, 1091 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 item-coal rotate: false - xy: 1231, 785 + xy: 1190, 1023 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 item-copper rotate: false - xy: 1231, 717 + xy: 1182, 955 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 item-graphite rotate: false - xy: 1231, 649 + xy: 1182, 887 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 item-lead rotate: false - xy: 1231, 581 + xy: 1182, 819 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 item-metaglass rotate: false - xy: 1249, 513 + xy: 1197, 751 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 item-phase-fabric rotate: false - xy: 1243, 445 + xy: 1197, 683 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 item-plastanium rotate: false - xy: 1243, 377 + xy: 1197, 615 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 item-pyratite rotate: false - xy: 1245, 309 + xy: 1215, 547 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 item-sand rotate: false - xy: 1245, 241 + xy: 1215, 479 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 item-scrap rotate: false - xy: 1253, 173 + xy: 1216, 921 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 item-silicon rotate: false - xy: 1253, 105 + xy: 1216, 853 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 item-spore-pod rotate: false - xy: 1243, 37 + xy: 1231, 785 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 item-surge-alloy rotate: false - xy: 1277, 37 + xy: 1231, 717 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 item-thorium rotate: false - xy: 1277, 411 + xy: 1231, 649 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 item-titanium rotate: false - xy: 1279, 343 + xy: 1231, 581 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 liquid-cryofluid rotate: false - xy: 1279, 275 + xy: 1249, 513 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 liquid-oil rotate: false - xy: 1287, 207 + xy: 1243, 445 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 liquid-slag rotate: false - xy: 1277, 3 + xy: 1253, 207 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 liquid-water rotate: false - xy: 1746, 1003 + xy: 1253, 139 size: 32, 32 orig: 32, 32 offset: 0, 0 @@ -5354,7 +5361,7 @@ trident-ship index: -1 vanguard-ship rotate: false - xy: 1658, 1105 + xy: 1658, 1055 size: 48, 48 orig: 48, 48 offset: 0, 0 @@ -5585,7 +5592,7 @@ titan-leg index: -1 wraith rotate: false - xy: 1658, 1055 + xy: 1708, 1063 size: 48, 48 orig: 48, 48 offset: 0, 0 @@ -5704,7 +5711,7 @@ swarmer-equip index: -1 vanguard-blaster-equip rotate: false - xy: 1458, 1051 + xy: 1658, 1105 size: 48, 48 orig: 48, 48 offset: 0, 0 diff --git a/core/assets/sprites/sprites.png b/core/assets/sprites/sprites.png index 70a77e6e9e..4aff639e00 100644 Binary files a/core/assets/sprites/sprites.png and b/core/assets/sprites/sprites.png differ diff --git a/core/src/mindustry/content/UnitTypes.java b/core/src/mindustry/content/UnitTypes.java index c0a9fa8ef7..fde02e3ca1 100644 --- a/core/src/mindustry/content/UnitTypes.java +++ b/core/src/mindustry/content/UnitTypes.java @@ -1,21 +1,24 @@ package mindustry.content; import mindustry.ctype.*; -import mindustry.gen.*; import mindustry.type.*; public class UnitTypes implements ContentList{ public static UnitDef draug, spirit, phantom, wraith, ghoul, revenant, lich, reaper, - dagger, crawler, titan, fortress, eruptor, chaosArray, eradicator; + crawler, titan, fortress, eruptor, chaosArray, eradicator; + + //TODO can't get comp classes + public static UnitDef dagger; public static UnitDef vanguard, alpha, delta, tau, omega, dart, javelin, trident, glaive; public static UnitDef starter; + @Override public void load(){ - dagger = new UnitDef("dagger", GenericUnitEntity::create){{ + dagger = new UnitDef("dagger"){{ speed = 0.2f; drag = 0.4f; hitsize = 8f; diff --git a/core/src/mindustry/core/NetClient.java b/core/src/mindustry/core/NetClient.java index 42d79a33c0..8fb7e27a19 100644 --- a/core/src/mindustry/core/NetClient.java +++ b/core/src/mindustry/core/NetClient.java @@ -340,7 +340,7 @@ public class NetClient implements ApplicationListener{ //entity must not be added yet, so create it if(entity == null){ - entity = (Syncc)ClassMapping.map(typeID).get(); + entity = (Syncc)EntityMapping.map(typeID).get(); entity.id(id); if(!netClient.isEntityUsed(entity.id())){ add = true; diff --git a/core/src/mindustry/entities/def/UnitComp.java b/core/src/mindustry/entities/def/UnitComp.java index 1301ada197..0956ba3bfa 100644 --- a/core/src/mindustry/entities/def/UnitComp.java +++ b/core/src/mindustry/entities/def/UnitComp.java @@ -138,8 +138,8 @@ abstract class UnitComp implements Healthc, Velc, Statusc, Teamc, Itemsc, Hitbox //ScorchDecal.create(getX(), getY()); Fx.explosion.at(this); Effects.shake(2f, 2f, this); + type.deathSound.at(this); - Sounds.bang.at(this); Events.fire(new UnitDestroyEvent(this)); //TODO implement suicide bomb trigger diff --git a/core/src/mindustry/io/SaveVersion.java b/core/src/mindustry/io/SaveVersion.java index 57d25941f2..621545889f 100644 --- a/core/src/mindustry/io/SaveVersion.java +++ b/core/src/mindustry/io/SaveVersion.java @@ -247,7 +247,7 @@ public abstract class SaveVersion extends SaveFileReader{ for(int j = 0; j < amount; j++){ readChunk(stream, true, in -> { byte typeid = in.readByte(); - Syncc sync = (Syncc)ClassMapping.map(typeid).get(); + Syncc sync = (Syncc)EntityMapping.map(typeid).get(); sync.read(in); }); } diff --git a/core/src/mindustry/type/UnitDef.java b/core/src/mindustry/type/UnitDef.java index 12b746396a..0fba1d0155 100644 --- a/core/src/mindustry/type/UnitDef.java +++ b/core/src/mindustry/type/UnitDef.java @@ -53,13 +53,14 @@ public class UnitDef extends UnlockableContent{ public Array weapons = new Array<>(); public TextureRegion baseRegion, legRegion, region, cellRegion, occlusionRegion; - public UnitDef(String name, Prov constructor){ - super(name); - this.constructor = constructor; - } - public UnitDef(String name){ - this(name, () -> Nulls.unit); + super(name); + + if(EntityMapping.map(name) != null){ + constructor = EntityMapping.map(name); + }else{ + constructor = () -> Nulls.unit; + } } public UnitController createController(){ diff --git a/gradle.properties b/gradle.properties index 8da093fa57..e51e86f066 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ org.gradle.daemon=true org.gradle.jvmargs=-Xms256m -Xmx1024m -archash=0e6ac9406fa34f2f5596ff1b151a3ebd07856aac +archash=0046591e6664a02c2f6a632963240c991e9afc96 diff --git a/tools/src/mindustry/tools/Generators.java b/tools/src/mindustry/tools/Generators.java index 2f221776e6..df3fe0e5fc 100644 --- a/tools/src/mindustry/tools/Generators.java +++ b/tools/src/mindustry/tools/Generators.java @@ -1,10 +1,10 @@ package mindustry.tools; -import arc.struct.*; import arc.files.*; import arc.graphics.*; import arc.graphics.g2d.*; import arc.math.*; +import arc.struct.*; import arc.util.*; import arc.util.noise.*; import mindustry.ctype.*; @@ -187,7 +187,6 @@ public class Generators{ ImagePacker.generate("unit-icons", () -> { content.units().each(type -> !type.flying, type -> { type.load(); - type.weapons.each(Weapon::load); Image image = ImagePacker.get(type.region); @@ -196,14 +195,18 @@ public class Generators{ image.draw(type.legRegion, true, false); image.draw(type.region); - //TODO draw weapons with proper offsets - /* - for(boolean b : Mathf.booleans){ - image.draw(type.weapon.region, - (int)(Mathf.sign(b) * type.weapon.width / Draw.scl + image.width / 2 - type.weapon.region.getWidth() / 2), - (int)(type.weaponOffsetY / Draw.scl + image.height / 2f - type.weapon.region.getHeight() / 2f), - b, false); - }*/ + for(Weapon weapon : type.weapons){ + weapon.load(); + + for(int i : (weapon.mirror ? Mathf.signs : Mathf.one)){ + i *= Mathf.sign(weapon.flipped); + + image.draw(weapon.region, + (int)(i * weapon.x / Draw.scl + image.width / 2 - weapon.region.getWidth() / 2), + (int)(weapon.y / Draw.scl + image.height / 2f - weapon.region.getHeight() / 2f), + i > 0, false); + } + } image.save("unit-" + type.name + "-full"); });