diff --git a/annotations/src/main/java/mindustry/annotations/BaseProcessor.java b/annotations/src/main/java/mindustry/annotations/BaseProcessor.java index 3cf9ac44b0..ac87f5666d 100644 --- a/annotations/src/main/java/mindustry/annotations/BaseProcessor.java +++ b/annotations/src/main/java/mindustry/annotations/BaseProcessor.java @@ -115,12 +115,12 @@ public abstract class BaseProcessor extends AbstractProcessor{ return ClassName.get(c).box(); } - public static TypeVariableName getTVN(TypeParameterElement element) { + public static TypeVariableName getTVN(TypeParameterElement element){ String name = element.getSimpleName().toString(); List boundsMirrors = element.getBounds(); List boundsTypeNames = new ArrayList<>(); - for (TypeMirror typeMirror : boundsMirrors) { + for (TypeMirror typeMirror : boundsMirrors){ boundsTypeNames.add(TypeName.get(typeMirror)); } @@ -137,11 +137,11 @@ public abstract class BaseProcessor extends AbstractProcessor{ if(imports != null){ String rawSource = file.toString(); Seq result = new Seq<>(); - for (String s : rawSource.split("\n", -1)) { + for(String s : rawSource.split("\n", -1)){ result.add(s); - if (s.startsWith("package ")) { + if (s.startsWith("package ")){ result.add(""); - for (String i : imports) { + for (String i : imports){ result.add(i); } } diff --git a/core/assets/shaders/atmosphere.frag b/core/assets/shaders/atmosphere.frag index 581db774c8..14a3da9e03 100644 --- a/core/assets/shaders/atmosphere.frag +++ b/core/assets/shaders/atmosphere.frag @@ -27,12 +27,12 @@ uniform vec3 u_rcampos; uniform mat4 u_invproj; uniform vec3 u_light; -vec2 rayIntersection(vec3 p, vec3 dir, float radius) { +vec2 rayIntersection(vec3 p, vec3 dir, float radius){ float b = dot(p, dir); float c = dot(p, p) - radius * radius; float d = b * b - c; - if (d < 0.0) { + if(d < 0.0){ return vec2(MAX, -MAX); } d = sqrt(d); @@ -43,7 +43,7 @@ vec2 rayIntersection(vec3 p, vec3 dir, float radius) { return vec2(near, far); } -float miePhase(float g, float c, float cc) { +float miePhase(float g, float c, float cc){ float gg = g * g; float a = (1.0 - gg) * (1.0 + cc); @@ -55,20 +55,20 @@ float miePhase(float g, float c, float cc) { return 1.5 * a / b; } -float rayleighPhase(float cc) { +float rayleighPhase(float cc){ return 0.75 * (1.0 + cc); } -float density(vec3 p) { +float density(vec3 p){ return exp(-(length(p) - u_innerRadius) * (4.0 / (u_outerRadius - u_innerRadius))); } -float optic(vec3 p, vec3 q) { +float optic(vec3 p, vec3 q){ vec3 step = (q - p) / fNumOutScatter; vec3 v = p + step * 0.5; float sum = 0.0; - for (int i = 0; i < numOutScatter; i++) { + for(int i = 0; i < numOutScatter; i++){ sum += density(v); v += step; } @@ -76,7 +76,7 @@ float optic(vec3 p, vec3 q) { return sum; } -vec3 inScatter(vec3 o, vec3 dir, vec2 e, vec3 l) { +vec3 inScatter(vec3 o, vec3 dir, vec2 e, vec3 l){ float len = (e.y - e.x) / fNumInScatter; vec3 step = dir * len; vec3 p = o + dir * e.x; diff --git a/core/assets/shaders/blockbuild.frag b/core/assets/shaders/blockbuild.frag index c2fb1b4044..0c8f301350 100644 --- a/core/assets/shaders/blockbuild.frag +++ b/core/assets/shaders/blockbuild.frag @@ -24,7 +24,7 @@ bool cont(vec2 T, vec2 v){ id(T + vec2(step, 0) * v, base) || id(T + vec2(-step, 0) * v, base)); } -void main() { +void main(){ vec2 t = v_texCoords.xy; diff --git a/core/assets/shaders/planetgrid.vert b/core/assets/shaders/planetgrid.vert index 5dd54ffebc..9eca283160 100644 --- a/core/assets/shaders/planetgrid.vert +++ b/core/assets/shaders/planetgrid.vert @@ -7,7 +7,7 @@ uniform mat4 u_trans; varying vec4 v_col; varying vec4 v_position; -void main() { +void main(){ gl_Position = u_proj * u_trans * a_position; v_col = a_color; v_position = a_position; diff --git a/core/assets/shaders/unitbuild.frag b/core/assets/shaders/unitbuild.frag index 147b27106f..d4657060da 100644 --- a/core/assets/shaders/unitbuild.frag +++ b/core/assets/shaders/unitbuild.frag @@ -30,7 +30,7 @@ bool cont(vec2 T, vec2 v){ id(T + vec2(step, -step) * v, base) || id(T + vec2(-step, step) * v, base)); } -void main() { +void main(){ vec2 coords = (v_texCoords.xy - u_uv) / (u_uv2 - u_uv); vec2 t = v_texCoords.xy; vec2 v = vec2(1.0/u_texsize.x, 1.0/u_texsize.y); diff --git a/core/src/mindustry/editor/DrawOperation.java b/core/src/mindustry/editor/DrawOperation.java index 7910de4892..53134663ea 100755 --- a/core/src/mindustry/editor/DrawOperation.java +++ b/core/src/mindustry/editor/DrawOperation.java @@ -13,7 +13,7 @@ public class DrawOperation{ private MapEditor editor; private LongSeq array = new LongSeq(); - public DrawOperation(MapEditor editor) { + public DrawOperation(MapEditor editor){ this.editor = editor; } @@ -37,7 +37,7 @@ public class DrawOperation{ } } - private void updateTile(int i) { + private void updateTile(int i){ long l = array.get(i); array.set(i, TileOp.get(TileOp.x(l), TileOp.y(l), TileOp.type(l), getTile(editor.tile(TileOp.x(l), TileOp.y(l)), TileOp.type(l)))); setTile(editor.tile(TileOp.x(l), TileOp.y(l)), TileOp.type(l), TileOp.value(l)); diff --git a/core/src/mindustry/entities/bullet/BulletType.java b/core/src/mindustry/entities/bullet/BulletType.java index 8e06cf466e..d783c11ed7 100644 --- a/core/src/mindustry/entities/bullet/BulletType.java +++ b/core/src/mindustry/entities/bullet/BulletType.java @@ -158,7 +158,7 @@ public abstract class BulletType extends Content{ } public void hitTile(Bullet b, Building tile, float initialHealth){ - if(status == StatusEffects.burning) { + if(status == StatusEffects.burning){ Fires.create(tile.tile); } hit(b); @@ -209,14 +209,14 @@ public abstract class BulletType extends Content{ Damage.status(b.team, x, y, splashDamageRadius, status, statusDuration, collidesAir, collidesGround); } - if(healPercent > 0f) { + if(healPercent > 0f){ indexer.eachBlock(b.team, x, y, splashDamageRadius, other -> other.damaged(), other -> { Fx.healBlockFull.at(other.x, other.y, other.block.size, Pal.heal); other.heal(healPercent / 100f * other.maxHealth()); }); } - if(status == StatusEffects.burning) { + if(status == StatusEffects.burning){ indexer.eachBlock(null, x, y, splashDamageRadius, other -> other.team != b.team, other -> { Fires.create(other.tile); }); @@ -247,7 +247,7 @@ public abstract class BulletType extends Content{ } public void init(Bullet b){ - if(pierceCap >= 1) { + if(pierceCap >= 1){ pierce = true; //pierceBuilding is not enabled by default, because a bullet may want to *not* pierce buildings } diff --git a/core/src/mindustry/entities/comp/BulletComp.java b/core/src/mindustry/entities/comp/BulletComp.java index 5a08710762..bec11c2711 100644 --- a/core/src/mindustry/entities/comp/BulletComp.java +++ b/core/src/mindustry/entities/comp/BulletComp.java @@ -142,7 +142,7 @@ abstract class BulletComp implements Timedc, Damagec, Hitboxc, Teamc, Posc, Draw }); } - if(type.pierceCap != -1 && collided.size >= type.pierceCap) { + if(type.pierceCap != -1 && collided.size >= type.pierceCap){ remove(); } } diff --git a/core/src/mindustry/ui/dialogs/PlanetDialog.java b/core/src/mindustry/ui/dialogs/PlanetDialog.java index 07c3875140..a0536d87f4 100644 --- a/core/src/mindustry/ui/dialogs/PlanetDialog.java +++ b/core/src/mindustry/ui/dialogs/PlanetDialog.java @@ -271,7 +271,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{ //planet selection new Table(t -> { t.right(); - if(content.planets().count(p -> p.accessible) > 1) { + if(content.planets().count(p -> p.accessible) > 1){ t.table(Styles.black6, pt -> { //TODO localize pt.add("[accent]Planets[]"); diff --git a/core/src/mindustry/ui/fragments/PlacementFragment.java b/core/src/mindustry/ui/fragments/PlacementFragment.java index 5aee062508..4c268e5dcd 100644 --- a/core/src/mindustry/ui/fragments/PlacementFragment.java +++ b/core/src/mindustry/ui/fragments/PlacementFragment.java @@ -122,7 +122,7 @@ public class PlacementFragment extends Fragment{ for(int i = 0; i < blockSelect.length; i++){ if(Core.input.keyTap(blockSelect[i])){ - if(i > 9) { //select block directionally + if(i > 9){ //select block directionally Seq blocks = getUnlockedByCategory(currentCategory); Block currentBlock = getSelectedBlock(currentCategory); for(int j = 0; j < blocks.size; j++){ diff --git a/core/src/mindustry/world/blocks/defense/turrets/TractorBeamTurret.java b/core/src/mindustry/world/blocks/defense/turrets/TractorBeamTurret.java index debe26f7e6..e51efec33a 100644 --- a/core/src/mindustry/world/blocks/defense/turrets/TractorBeamTurret.java +++ b/core/src/mindustry/world/blocks/defense/turrets/TractorBeamTurret.java @@ -110,7 +110,7 @@ public class TractorBeamTurret extends BaseTurret{ } @Override - public float efficiency() { + public float efficiency(){ return super.efficiency() * coolant; } diff --git a/core/src/mindustry/world/blocks/distribution/ArmoredConveyor.java b/core/src/mindustry/world/blocks/distribution/ArmoredConveyor.java index cba1366147..496f140e53 100644 --- a/core/src/mindustry/world/blocks/distribution/ArmoredConveyor.java +++ b/core/src/mindustry/world/blocks/distribution/ArmoredConveyor.java @@ -11,7 +11,7 @@ public class ArmoredConveyor extends Conveyor{ } @Override - public boolean blends(Tile tile, int rotation, int otherx, int othery, int otherrot, Block otherblock) { + public boolean blends(Tile tile, int rotation, int otherx, int othery, int otherrot, Block otherblock){ return otherblock.outputsItems() && blendsArmored(tile, rotation, otherx, othery, otherrot, otherblock); } diff --git a/core/src/mindustry/world/blocks/distribution/Conveyor.java b/core/src/mindustry/world/blocks/distribution/Conveyor.java index b7d973cfe7..e4d2baa25c 100644 --- a/core/src/mindustry/world/blocks/distribution/Conveyor.java +++ b/core/src/mindustry/world/blocks/distribution/Conveyor.java @@ -254,7 +254,7 @@ public class Conveyor extends Block implements Autotiler{ noSleep(); } - public boolean pass(Item item) { + public boolean pass(Item item){ if(next != null && next.team == team && next.acceptItem(this, item)){ next.handleItem(this, item); return true; diff --git a/core/src/mindustry/world/blocks/logic/LogicBlock.java b/core/src/mindustry/world/blocks/logic/LogicBlock.java index 8ccc558299..4b8367d75e 100644 --- a/core/src/mindustry/world/blocks/logic/LogicBlock.java +++ b/core/src/mindustry/world/blocks/logic/LogicBlock.java @@ -433,7 +433,7 @@ public class LogicBlock extends Block{ } @Override - public void drawSelect() { + public void drawSelect(){ Groups.unit.each(u -> u.controller() instanceof LogicAI ai && ai.controller == this, unit -> { Drawf.square(unit.x, unit.y, unit.hitSize, unit.rotation + 45); }); diff --git a/core/src/mindustry/world/blocks/power/PowerDiode.java b/core/src/mindustry/world/blocks/power/PowerDiode.java index e93dde18e9..75f589eabd 100644 --- a/core/src/mindustry/world/blocks/power/PowerDiode.java +++ b/core/src/mindustry/world/blocks/power/PowerDiode.java @@ -65,7 +65,7 @@ public class PowerDiode extends Block{ float frontStored = frontGraph.getBatteryStored() / frontGraph.getTotalBatteryCapacity(); // try to send if the back side has more % capacity stored than the front side - if(backStored > frontStored) { + if(backStored > frontStored){ // send half of the difference float amount = backGraph.getBatteryStored() * (backStored - frontStored) / 2; // prevent sending more than the front can handle diff --git a/core/src/mindustry/world/blocks/production/Pump.java b/core/src/mindustry/world/blocks/production/Pump.java index c4a6313129..4ed9b7c8d1 100644 --- a/core/src/mindustry/world/blocks/production/Pump.java +++ b/core/src/mindustry/world/blocks/production/Pump.java @@ -30,7 +30,7 @@ public class Pump extends LiquidBlock{ } @Override - public void drawPlace(int x, int y, int rotation, boolean valid) { + public void drawPlace(int x, int y, int rotation, boolean valid){ Tile tile = world.tile(x, y); if(tile == null) return; diff --git a/ios/build.gradle b/ios/build.gradle index 6faa19c97a..477e41db7c 100644 --- a/ios/build.gradle +++ b/ios/build.gradle @@ -26,7 +26,7 @@ task copyAssets(){ } delete{ - delete fileTree('assets') { + delete fileTree('assets'){ include '**/*.ogg' } }