diff --git a/core/src/mindustry/content/UnitTypes.java b/core/src/mindustry/content/UnitTypes.java index 90509a3c16..ece0ee0081 100644 --- a/core/src/mindustry/content/UnitTypes.java +++ b/core/src/mindustry/content/UnitTypes.java @@ -2509,11 +2509,10 @@ public class UnitTypes{ outlineColor = Pal.darkOutline; envDisabled = Env.space; - //new ForceFieldAbility(60f, 0.3f, 400f, 60f * 6); - abilities.add(new ShieldSectorAbility(){{ + abilities.add(new ShieldArcAbility(){{ region = "bulwark-shield"; radius = 34f; - sectorAngle = 85f; + angle = 82f; regen = 0.4f; cooldown = 60f * 8f; max = 1500f; @@ -2521,7 +2520,7 @@ public class UnitTypes{ width = 6f; }}); - rotateSpeed = 2.2f; + rotateSpeed = 2.1f; legCount = 4; legLength = 15f; diff --git a/core/src/mindustry/entities/abilities/EnergyFieldAbility.java b/core/src/mindustry/entities/abilities/EnergyFieldAbility.java index b60fd42cff..c397f614ba 100644 --- a/core/src/mindustry/entities/abilities/EnergyFieldAbility.java +++ b/core/src/mindustry/entities/abilities/EnergyFieldAbility.java @@ -70,7 +70,7 @@ public class EnergyFieldAbility extends Ability{ for(int i = 0; i < sectors; i++){ float rot = unit.rotation + i * 360f/sectors - Time.time * rotateSpeed; - Lines.swirl(rx, ry, orbRadius + 3f, sectorRad, rot); + Lines.arc(rx, ry, orbRadius + 3f, sectorRad, rot); } Lines.stroke(Lines.getStroke() * curStroke); @@ -78,7 +78,7 @@ public class EnergyFieldAbility extends Ability{ if(curStroke > 0){ for(int i = 0; i < sectors; i++){ float rot = unit.rotation + i * 360f/sectors + Time.time * rotateSpeed; - Lines.swirl(rx, ry, range, sectorRad, rot); + Lines.arc(rx, ry, range, sectorRad, rot); } } diff --git a/core/src/mindustry/entities/abilities/ShieldSectorAbility.java b/core/src/mindustry/entities/abilities/ShieldArcAbility.java similarity index 89% rename from core/src/mindustry/entities/abilities/ShieldSectorAbility.java rename to core/src/mindustry/entities/abilities/ShieldArcAbility.java index 7c269665e4..d83f4cf1f4 100644 --- a/core/src/mindustry/entities/abilities/ShieldSectorAbility.java +++ b/core/src/mindustry/entities/abilities/ShieldArcAbility.java @@ -14,15 +14,15 @@ import mindustry.graphics.*; import mindustry.type.*; import mindustry.ui.*; -public class ShieldSectorAbility extends Ability{ +public class ShieldArcAbility extends Ability{ private static Unit paramUnit; - private static ShieldSectorAbility paramField; + private static ShieldArcAbility paramField; private static Vec2 paramPos = new Vec2(); private static final Cons shieldConsumer = b -> { if(b.team != paramUnit.team && b.type.absorbable && paramField.data > 0 && !paramPos.within(b, paramField.radius + paramField.width/2f) && Tmp.v1.set(b).add(b.vel).within(paramPos, paramField.radius + paramField.width/2f) && - Angles.within(paramPos.angleTo(b), paramUnit.rotation + paramField.angleOffset, paramField.sectorAngle / 2f)){ + Angles.within(paramPos.angleTo(b), paramUnit.rotation + paramField.angleOffset, paramField.angle / 2f)){ b.absorb(); Fx.absorb.at(b); @@ -47,8 +47,8 @@ public class ShieldSectorAbility extends Ability{ public float max = 200f; /** Cooldown after the shield is broken, in ticks. */ public float cooldown = 60f * 5; - /** Angle of shield sector. */ - public float sectorAngle = 80f; + /** Angle of shield arc. */ + public float angle = 80f; /** Offset parameters for shield. */ public float angleOffset = 0f, x = 0f, y = 0f; /** If true, only activates when shooting. */ @@ -56,8 +56,8 @@ public class ShieldSectorAbility extends Ability{ /** Width of shield line. */ public float width = 6f; - /** Whether to draw the sector line. */ - public boolean drawSector = true; + /** Whether to draw the arc line. */ + public boolean drawArc = true; /** If not null, will be drawn on top. */ public @Nullable String region; /** If true, sprite position will be influenced by x/y. */ @@ -109,9 +109,9 @@ public class ShieldSectorAbility extends Ability{ Draw.yscl = 1f; } - if(drawSector){ + if(drawArc){ Lines.stroke(width * widthScale); - Lines.swirl(pos.x, pos.y, radius, sectorAngle / 360f, unit.rotation + angleOffset - sectorAngle / 2f); + Lines.arc(pos.x, pos.y, radius, angle / 360f, unit.rotation + angleOffset - angle / 2f); } }else{ //TODO diff --git a/gradle.properties b/gradle.properties index 4f69364ebc..085918da5b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -24,4 +24,4 @@ android.useAndroidX=true #used for slow jitpack builds; TODO see if this actually works org.gradle.internal.http.socketTimeout=100000 org.gradle.internal.http.connectionTimeout=100000 -archash=390397fbb9 +archash=ff834fe5c9