diff --git a/core/assets-raw/sprites/blocks/units/advanced-reconstructor.png b/core/assets-raw/sprites/blocks/units/advanced-reconstructor.png index 5304816b21..6709222b7b 100644 Binary files a/core/assets-raw/sprites/blocks/units/advanced-reconstructor.png and b/core/assets-raw/sprites/blocks/units/advanced-reconstructor.png differ diff --git a/core/assets-raw/sprites/blocks/units/mech-reconstructor-top.png b/core/assets-raw/sprites/blocks/units/mech-reconstructor-top.png deleted file mode 100644 index 28e1927ffa..0000000000 Binary files a/core/assets-raw/sprites/blocks/units/mech-reconstructor-top.png and /dev/null differ diff --git a/core/assets-raw/sprites/blocks/units/mech-reconstructor.png b/core/assets-raw/sprites/blocks/units/mech-reconstructor.png deleted file mode 100644 index 63f3cb6fa9..0000000000 Binary files a/core/assets-raw/sprites/blocks/units/mech-reconstructor.png and /dev/null differ diff --git a/core/assets-raw/sprites/blocks/units/ship-reconstructor-top.png b/core/assets-raw/sprites/blocks/units/ship-reconstructor-top.png deleted file mode 100644 index 7c91e756cd..0000000000 Binary files a/core/assets-raw/sprites/blocks/units/ship-reconstructor-top.png and /dev/null differ diff --git a/core/assets-raw/sprites/blocks/units/ship-reconstructor.png b/core/assets-raw/sprites/blocks/units/ship-reconstructor.png deleted file mode 100644 index bc9ddfe97f..0000000000 Binary files a/core/assets-raw/sprites/blocks/units/ship-reconstructor.png and /dev/null differ diff --git a/core/assets-raw/sprites/blocks/units/tank-reconstructor-top.png b/core/assets-raw/sprites/blocks/units/tank-reconstructor-top.png deleted file mode 100644 index 3cdd4951b6..0000000000 Binary files a/core/assets-raw/sprites/blocks/units/tank-reconstructor-top.png and /dev/null differ diff --git a/core/assets-raw/sprites/blocks/units/tank-reconstructor.png b/core/assets-raw/sprites/blocks/units/tank-reconstructor.png deleted file mode 100644 index 3152db780a..0000000000 Binary files a/core/assets-raw/sprites/blocks/units/tank-reconstructor.png and /dev/null differ diff --git a/core/assets-raw/sprites/ui/discord-banner.png b/core/assets-raw/sprites/ui/discord-banner.png index 0b39176bda..49efc82711 100644 Binary files a/core/assets-raw/sprites/ui/discord-banner.png and b/core/assets-raw/sprites/ui/discord-banner.png differ diff --git a/core/src/mindustry/content/UnitTypes.java b/core/src/mindustry/content/UnitTypes.java index 2019a293dc..5ec3a8faf0 100644 --- a/core/src/mindustry/content/UnitTypes.java +++ b/core/src/mindustry/content/UnitTypes.java @@ -290,7 +290,7 @@ public class UnitTypes{ fragBullets = 3; fragLifeMin = 0f; - fragCone = 30f; + fragRandomSpread = 30f; fragBullet = new BasicBulletType(9f, 20){{ width = 10f; @@ -2680,11 +2680,11 @@ public class UnitTypes{ sprite = "missile-large"; width = 9.5f; height = 15f; - lifetime = 30f; + lifetime = 18f; hitSize = 6f; shootEffect = Fx.shootTitan; smokeEffect = Fx.shootSmokeTitan; - pierceCap = 3; + pierceCap = 2; pierce = true; pierceBuilding = true; hitColor = backColor = trailColor = Color.valueOf("feb380"); @@ -2694,6 +2694,28 @@ public class UnitTypes{ hitEffect = despawnEffect = Fx.blastExplosion; splashDamageRadius = 20f; splashDamage = 50f; + + fragOnHit = false; + fragRandomSpread = 0f; + fragSpread = 10f; + fragBullets = 5; + fragVelocityMin = 1f; + + //TODO + fragBullet = new BasicBulletType(8f, 30){{ + sprite = "missile-large"; + width = 8f; + height = 12f; + lifetime = 15f; + hitSize = 4f; + hitColor = backColor = trailColor = Color.valueOf("feb380"); + frontColor = Color.white; + trailWidth = 2.8f; + trailLength = 6; + hitEffect = despawnEffect = Fx.blastExplosion; + splashDamageRadius = 10f; + splashDamage = 20f; + }}; }}; }}); @@ -3503,7 +3525,7 @@ public class UnitTypes{ spread = 11f; }}; - bullet = new BasicBulletType(5f, 18){{ + bullet = new BasicBulletType(5f, 24){{ homingPower = 0.19f; homingDelay = 4f; width = 7f; diff --git a/core/src/mindustry/entities/bullet/BulletType.java b/core/src/mindustry/entities/bullet/BulletType.java index 179bfe4f04..55be83a834 100644 --- a/core/src/mindustry/entities/bullet/BulletType.java +++ b/core/src/mindustry/entities/bullet/BulletType.java @@ -138,6 +138,8 @@ public class BulletType extends Content implements Cloneable{ public boolean makeFire = false; /** Whether to create hit effects on despawn. Forced to true if this bullet has any special effects like splash damage. */ public boolean despawnHit = false; + /** If true, this bullet will create bullets when it hits anything, not just when it despawns. */ + public boolean fragOnHit = true; /** If true, unit armor is ignored in damage calculations. Ignored for building armor. */ public boolean pierceArmor = false; @@ -146,7 +148,8 @@ public class BulletType extends Content implements Cloneable{ /** Whether status and despawnHit should automatically be set. */ public boolean setDefaults = true; - public float fragCone = 360f; + public float fragRandomSpread = 360f; + public float fragSpread = 0f; public float fragAngle = 0f; public int fragBullets = 9; public float fragVelocityMin = 0.2f, fragVelocityMax = 1f, fragLifeMin = 1f, fragLifeMax = 1f; @@ -308,12 +311,11 @@ public class BulletType extends Content implements Cloneable{ Effect.shake(hitShake, hitShake, b); - createFrags(b, x, y); - createPuddles(b, x, y); - - if(incendChance > 0 && Mathf.chance(incendChance)){ - Damage.createIncend(x, y, incendSpread, incendAmount); + if(fragOnHit){ + createFrags(b, x, y); } + createPuddles(b, x, y); + createIncend(b, x, y); if(suppressionRange > 0){ //bullets are pooled, require separate Vec2 instance @@ -327,6 +329,12 @@ public class BulletType extends Content implements Cloneable{ } } + public void createIncend(Bullet b, float x, float y){ + if(incendChance > 0 && Mathf.chance(incendChance)){ + Damage.createIncend(x, y, incendSpread, incendAmount); + } + } + public void createPuddles(Bullet b, float x, float y){ if(puddleLiquid != null && puddles > 0){ for(int i = 0; i < puddles; i++){ @@ -361,7 +369,7 @@ public class BulletType extends Content implements Cloneable{ if(fragBullet != null){ for(int i = 0; i < fragBullets; i++){ float len = Mathf.random(1f, 7f); - float a = b.rotation() + Mathf.range(fragCone / 2) + fragAngle; + float a = b.rotation() + Mathf.range(fragRandomSpread / 2) + fragAngle + ((i - fragBullets/2) * fragSpread); fragBullet.create(b, x + Angles.trnsx(a, len), y + Angles.trnsy(a, len), a, Mathf.random(fragVelocityMin, fragVelocityMax), Mathf.random(fragLifeMin, fragLifeMax)); } } @@ -373,6 +381,11 @@ public class BulletType extends Content implements Cloneable{ if(despawnHit){ hit(b); } + + if(!fragOnHit){ + createFrags(b, b.x, b.y); + } + despawnEffect.at(b.x, b.y, b.rotation(), hitColor); despawnSound.at(b); diff --git a/core/src/mindustry/entities/comp/BuildingComp.java b/core/src/mindustry/entities/comp/BuildingComp.java index 6c97239273..e36d83eba9 100644 --- a/core/src/mindustry/entities/comp/BuildingComp.java +++ b/core/src/mindustry/entities/comp/BuildingComp.java @@ -85,7 +85,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc, transient float efficiency; /** Same as efficiency, but for optional consumers only. */ transient float optionalEfficiency; - /** The efficiency this block would have if consValid() / productionValid() returned true. */ + /** The efficiency this block *would* have if shouldConsume() returned true. */ transient float potentialEfficiency; transient float healSuppressionTime = -1f; diff --git a/core/src/mindustry/entities/comp/BulletComp.java b/core/src/mindustry/entities/comp/BulletComp.java index 52948d9c70..f26a30a5db 100644 --- a/core/src/mindustry/entities/comp/BulletComp.java +++ b/core/src/mindustry/entities/comp/BulletComp.java @@ -187,7 +187,6 @@ abstract class BulletComp implements Timedc, Damagec, Hitboxc, Teamc, Posc, Draw type.collideFloor && (tile == null || tile.floor().hasSurface() || tile.block() != Blocks.air) || type.collideTerrain && tile != null && tile.block() instanceof StaticWall ){ - type.despawned(self()); remove(); hit = true; return; diff --git a/core/src/mindustry/ui/fragments/MenuFragment.java b/core/src/mindustry/ui/fragments/MenuFragment.java index 906680d1f5..875067f8b6 100644 --- a/core/src/mindustry/ui/fragments/MenuFragment.java +++ b/core/src/mindustry/ui/fragments/MenuFragment.java @@ -54,7 +54,7 @@ public class MenuFragment{ parent.fill(c -> c.bottom().right().button(Icon.discord, new ImageButtonStyle(){{ up = discordBanner; - }}, ui.discord::show).tooltip("@discord").size(84, 45).name("discord")); + }}, ui.discord::show).marginTop(9f).marginLeft(10f).tooltip("@discord").size(84, 45).name("discord")); //info icon if(mobile){