diff --git a/core/assets-raw/sprites/blocks/turrets/disperse/disperse.png b/core/assets-raw/sprites/blocks/turrets/disperse/disperse.png index b474041e8f..0ddae61f6a 100644 Binary files a/core/assets-raw/sprites/blocks/turrets/disperse/disperse.png and b/core/assets-raw/sprites/blocks/turrets/disperse/disperse.png differ diff --git a/core/src/mindustry/content/Blocks.java b/core/src/mindustry/content/Blocks.java index 3b862cacb1..a97b04df2e 100644 --- a/core/src/mindustry/content/Blocks.java +++ b/core/src/mindustry/content/Blocks.java @@ -3342,6 +3342,7 @@ public class Blocks{ shots = 4; alternate = true; + widthSpread = true; spread = 4.6f; restitution = 0.1f; diff --git a/core/src/mindustry/type/Sector.java b/core/src/mindustry/type/Sector.java index de018bfafb..85cbaee324 100644 --- a/core/src/mindustry/type/Sector.java +++ b/core/src/mindustry/type/Sector.java @@ -92,6 +92,10 @@ public class Sector{ info.resources.remove(Blocks.water); info.resources.add(Liquids.water); } + + if(info.resources.contains(u -> u == null)){ + info.resources = info.resources.select(u -> u != null); + } } /** Removes any sector info. */ diff --git a/core/src/mindustry/ui/dialogs/PlanetDialog.java b/core/src/mindustry/ui/dialogs/PlanetDialog.java index 3d09b34f3f..9bc7753a99 100644 --- a/core/src/mindustry/ui/dialogs/PlanetDialog.java +++ b/core/src/mindustry/ui/dialogs/PlanetDialog.java @@ -837,6 +837,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{ c.add("@sectors.resources").left().row(); c.table(t -> { for(UnlockableContent uc : sector.info.resources){ + if(uc == null) continue; t.image(uc.uiIcon).padRight(3).size(iconSmall); } }).padLeft(10f).left().row(); diff --git a/core/src/mindustry/world/blocks/defense/turrets/Turret.java b/core/src/mindustry/world/blocks/defense/turrets/Turret.java index 1c3aaeae30..e814efee5d 100644 --- a/core/src/mindustry/world/blocks/defense/turrets/Turret.java +++ b/core/src/mindustry/world/blocks/defense/turrets/Turret.java @@ -86,7 +86,7 @@ public class Turret extends ReloadTurret{ /** Ticks between shots if shots > 1. */ public float burstSpacing = 0; /** An inflexible and terrible idea. */ - public boolean alternate = false; + public boolean alternate = false, widthSpread = false; /** If true, this turret will accurately target moving targets with respect to charge time. */ public boolean accurateDelay = false; @@ -544,21 +544,25 @@ public class Turret extends ReloadTurret{ }else{ //otherwise, use the normal shot pattern(s) - if(alternate){ - float i = (shotCounter % shots) - (shots-1)/2f; + if(alternate || widthSpread){ + int count = !widthSpread ? 1 : shots; - bulletOffset.trns(rotation - 90, (spread) * i + Mathf.range(xRand), shootLength); - bullet(type, rotation + Mathf.range(inaccuracy + type.inaccuracy)); + for(int c = 0; c < count; c++){ + float i = (shotCounter % shots) - (shots-1)/2f; + + bulletOffset.trns(rotation - 90, (spread) * i + Mathf.range(xRand), shootLength); + bullet(type, rotation + Mathf.range(inaccuracy + type.inaccuracy)); + shotCounter ++; + } }else{ bulletOffset.trns(rotation, shootLength, Mathf.range(xRand)); for(int i = 0; i < shots; i++){ bullet(type, rotation + Mathf.range(inaccuracy + type.inaccuracy) + (i - (int)(shots / 2f)) * spread); + shotCounter ++; } } - shotCounter++; - recoil = recoilAmount; heat = 1f; effects(); diff --git a/gradle.properties b/gradle.properties index 120d869fe2..da169c95f9 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=502eb9934e +archash=985a940948