diff --git a/core/assets-raw/sprites/blocks/turrets/diffuse.png b/core/assets-raw/sprites/blocks/turrets/diffuse.png new file mode 100644 index 0000000000..3ff2f1dfe5 Binary files /dev/null and b/core/assets-raw/sprites/blocks/turrets/diffuse.png differ diff --git a/core/assets/icons/icons.properties b/core/assets/icons/icons.properties index 0cdaf71573..487b30191d 100755 --- a/core/assets/icons/icons.properties +++ b/core/assets/icons/icons.properties @@ -558,3 +558,4 @@ 63134=merui|unit-merui-ui 63133=osc|unit-osc-ui 63132=precept|unit-precept-ui +63131=diffuse|block-diffuse-ui diff --git a/core/assets/logicids.dat b/core/assets/logicids.dat index d2ecc3dbe5..ba100007a4 100644 Binary files a/core/assets/logicids.dat and b/core/assets/logicids.dat differ diff --git a/core/assets/maps/four.msav b/core/assets/maps/four.msav index aca7c1e20e..04dc3ecfc3 100644 Binary files a/core/assets/maps/four.msav and b/core/assets/maps/four.msav differ diff --git a/core/assets/maps/three.msav b/core/assets/maps/three.msav index 04dc3ecfc3..aca7c1e20e 100644 Binary files a/core/assets/maps/three.msav and b/core/assets/maps/three.msav differ diff --git a/core/src/mindustry/content/Blocks.java b/core/src/mindustry/content/Blocks.java index 9b0c310003..121b2bb581 100644 --- a/core/src/mindustry/content/Blocks.java +++ b/core/src/mindustry/content/Blocks.java @@ -131,7 +131,7 @@ public class Blocks{ duo, scatter, scorch, hail, arc, wave, lancer, swarmer, salvo, fuse, ripple, cyclone, foreshadow, spectre, meltdown, segment, parallax, tsunami, //turrets - erekir - breach, sublimate, titan, disperse, afflict, + breach, diffuse, sublimate, titan, disperse, afflict, //units groundFactory, airFactory, navalFactory, @@ -3751,7 +3751,61 @@ public class Blocks{ range = 190; shootCone = 3f; scaledHealth = 180; - rotateSpeed = 1.6f; + rotateSpeed = 1.5f; + researchCostMultiplier = 0.05f; + + coolant = consume(new ConsumeLiquid(Liquids.water, 15f / 60f)); + limitRange(); + }}; + + diffuse = new ItemTurret("diffuse"){{ + requirements(Category.turret, with(Items.beryllium, 150, Items.silicon, 150, Items.graphite, 250)); + + Effect sfe = new MultiEffect(Fx.shootBigColor, Fx.colorSparkBig); + + ammo( + Items.graphite, new BasicBulletType(8f, 30){{ + knockback = 5f; + width = 25f; + hitSize = 7f; + height = 20f; + lifetime = 20f; + shootEffect = sfe; + smokeEffect = Fx.shootBigSmoke; + ammoMultiplier = 1; + pierceCap = 2; + pierce = true; + pierceBuilding = true; + hitColor = backColor = trailColor = Pal.berylShot; + frontColor = Color.white; + trailWidth = 5f; + trailLength = 4; + hitEffect = despawnEffect = Fx.hitBulletColor; + buildingDamageMultiplier = 0.3f; + }} + ); + + shoot = new ShootSpread(){{ + shots = 14; + spread = 3f; + }}; + + coolantMultiplier = 6f; + + shootShake = 1f; + ammoPerShot = 1; + drawer = new DrawTurret("reinforced-"); + shootY = 5f; + outlineColor = Pal.darkOutline; + size = 3; + envEnabled |= Env.space; + reload = 30f; + recoilAmount = 2f; + restitution = 0.03f; + range = 190; + shootCone = 3f; + scaledHealth = 180; + rotateSpeed = 2f; researchCostMultiplier = 0.05f; coolant = consume(new ConsumeLiquid(Liquids.water, 15f / 60f)); diff --git a/core/src/mindustry/content/SectorPresets.java b/core/src/mindustry/content/SectorPresets.java index bcc0f41acc..3ebbe155b6 100644 --- a/core/src/mindustry/content/SectorPresets.java +++ b/core/src/mindustry/content/SectorPresets.java @@ -204,28 +204,6 @@ public class SectorPresets{ three = new SectorPreset("three", erekir, 36){{ difficulty = 5; - - rules = r -> { - float rad = 52f; - r.objectives.addAll( - new DestroyBlocksObjective(Blocks.coreBastion, Team.malis, Point2.pack(290,501), Point2.pack(158,496)) - .withFlags("nukeannounce"), - new TimerObjective("@objective.nuclearlaunch", 8 * 60 * 60).withMarkers( - new MinimapMarker(338, 377, rad, 14f, Pal.remove), - new ShapeMarker(338 * 8, 377 * 8f){{ - radius = rad * 8f; - fill = true; - color = Pal.remove.cpy().mul(0.8f).a(0.3f); - sides = 90; - }}, - new ShapeMarker(338 * 8, 377 * 8f){{ - radius = rad * 8f; - color = Pal.remove; - sides = 90; - }} - ).withFlags("nuke1") - ); - }; }}; four = new SectorPreset("four", erekir, 29){{ @@ -234,7 +212,22 @@ public class SectorPresets{ rules = r -> { float rad = 52f; r.objectives.addAll( - //new TimerObjective("@objective.enemiesapproaching", 5 * 60 * 60).withFlags("wave1") + new DestroyBlocksObjective(Blocks.coreBastion, Team.malis, Point2.pack(290,501), Point2.pack(158,496)) + .withFlags("nukeannounce"), + new TimerObjective("@objective.nuclearlaunch", 8 * 60 * 60).withMarkers( + new MinimapMarker(338, 377, rad, 14f, Pal.remove), + new ShapeMarker(338 * 8, 377 * 8f){{ + radius = rad * 8f; + fill = true; + color = Pal.remove.cpy().mul(0.8f).a(0.3f); + sides = 90; + }}, + new ShapeMarker(338 * 8, 377 * 8f){{ + radius = rad * 8f; + color = Pal.remove; + sides = 90; + }} + ).withFlags("nuke1") ); }; }}; diff --git a/core/src/mindustry/core/Logic.java b/core/src/mindustry/core/Logic.java index ce0ff2d460..4bb17208cf 100644 --- a/core/src/mindustry/core/Logic.java +++ b/core/src/mindustry/core/Logic.java @@ -46,10 +46,11 @@ public class Logic implements ApplicationListener{ if(!event.breaking){ TeamData data = event.team.data(); Iterator it = data.blocks.iterator(); + var bounds = event.tile.block().bounds(event.tile.x, event.tile.y, Tmp.r1); while(it.hasNext()){ BlockPlan b = it.next(); Block block = content.block(b.block); - if(event.tile.block().bounds(event.tile.x, event.tile.y, Tmp.r1).overlaps(block.bounds(b.x, b.y, Tmp.r2))){ + if(bounds.overlaps(block.bounds(b.x, b.y, Tmp.r2))){ b.removed = true; it.remove(); } diff --git a/gradle.properties b/gradle.properties index 7b642a60b2..dd3d74676a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -25,4 +25,4 @@ org.gradle.caching=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=9ae34c37ed +archash=f0f5a42492