From 44b25d6e64b88b75b86441528a6344eed7186e4b Mon Sep 17 00:00:00 2001 From: Iniquit <45113412+Iniquit@users.noreply.github.com> Date: Sun, 1 Jun 2025 11:46:55 -0400 Subject: [PATCH 1/3] Clamp continuous laser bullet position to min zero (#10873) This prevents the laser from moving behind the unit at the end of the animation. --- .../mindustry/entities/bullet/ContinuousLaserBulletType.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/mindustry/entities/bullet/ContinuousLaserBulletType.java b/core/src/mindustry/entities/bullet/ContinuousLaserBulletType.java index df7cebd304..f19e8f7a37 100644 --- a/core/src/mindustry/entities/bullet/ContinuousLaserBulletType.java +++ b/core/src/mindustry/entities/bullet/ContinuousLaserBulletType.java @@ -55,13 +55,13 @@ public class ContinuousLaserBulletType extends ContinuousBulletType{ float ellipseLenScl = Mathf.lerp(1 - i / (float)(colors.length), 1f, pointyScaling); Lines.stroke(stroke); - Lines.lineAngle(b.x, b.y, rot, realLength - frontLength, false); + Lines.lineAngle(b.x, b.y, rot, Math.max(0, realLength - frontLength), false); //back ellipse Drawf.flameFront(b.x, b.y, divisions, rot + 180f, backLength, stroke / 2f); //front ellipse - Tmp.v1.trnsExact(rot, realLength - frontLength); + Tmp.v1.trnsExact(rot, Math.max(0, realLength - frontLength)); Drawf.flameFront(b.x + Tmp.v1.x, b.y + Tmp.v1.y, divisions, rot, frontLength * ellipseLenScl, stroke / 2f); } From 6c29460ade529d5a9f236f2f7e9b77da85e3b80c Mon Sep 17 00:00:00 2001 From: Sh1p*nfire <73347888+Sh1penfire@users.noreply.github.com> Date: Mon, 2 Jun 2025 01:49:03 +1000 Subject: [PATCH 2/3] Fix randomWaveAI causing units to target untargetable blocks (#10870) * Update Pathfinder.java * Update FlyingAI.java --- core/src/mindustry/ai/Pathfinder.java | 2 +- core/src/mindustry/ai/types/FlyingAI.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/mindustry/ai/Pathfinder.java b/core/src/mindustry/ai/Pathfinder.java index 1b095760ca..2c950e8636 100644 --- a/core/src/mindustry/ai/Pathfinder.java +++ b/core/src/mindustry/ai/Pathfinder.java @@ -540,7 +540,7 @@ public class Pathfinder implements Runnable{ if(!targets.isEmpty()){ boolean any = false; for(Building other : targets){ - if((other.items != null && other.items.any()) || other.status() != BlockStatus.noInput){ + if(((other.items != null && other.items.any()) || other.status() != BlockStatus.noInput) && other.block.targetable){ out.add(other.tile.array()); any = true; } diff --git a/core/src/mindustry/ai/types/FlyingAI.java b/core/src/mindustry/ai/types/FlyingAI.java index a412c6f4da..c328b41b41 100644 --- a/core/src/mindustry/ai/types/FlyingAI.java +++ b/core/src/mindustry/ai/types/FlyingAI.java @@ -41,7 +41,7 @@ public class FlyingAI extends AIController{ Building closest = null; float cdist = 0f; for(Building t : list){ - if((t.items != null && t.items.any()) || t.status() != BlockStatus.noInput){ + if(((t.items != null && t.items.any()) || t.status() != BlockStatus.noInput) && t.block.targetable){ float dst = t.dst2(x, y); if(closest == null || dst < cdist){ closest = t; From ab73305df9f703a1e7c370d0195cc9d68c8b42cd Mon Sep 17 00:00:00 2001 From: KochiyaUenehaaa <119563256+Uenhe@users.noreply.github.com> Date: Sun, 1 Jun 2025 23:58:42 +0800 Subject: [PATCH 3/3] building dumps faster when overdriven (#10871) * Update Binding.java * Update UnitCommand.java * building dumps faster when overdriven --- core/src/mindustry/world/blocks/production/BeamDrill.java | 2 +- core/src/mindustry/world/blocks/production/BurstDrill.java | 2 +- core/src/mindustry/world/blocks/production/Drill.java | 2 +- core/src/mindustry/world/blocks/production/Separator.java | 2 +- core/src/mindustry/world/blocks/production/WallCrafter.java | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/src/mindustry/world/blocks/production/BeamDrill.java b/core/src/mindustry/world/blocks/production/BeamDrill.java index 9921e4d7cf..27c1aac52c 100644 --- a/core/src/mindustry/world/blocks/production/BeamDrill.java +++ b/core/src/mindustry/world/blocks/production/BeamDrill.java @@ -262,7 +262,7 @@ public class BeamDrill extends Block{ time %= drillTime; } - if(timer(timerDump, dumpTime)){ + if(timer(timerDump, dumpTime / timeScale)){ dump(); } } diff --git a/core/src/mindustry/world/blocks/production/BurstDrill.java b/core/src/mindustry/world/blocks/production/BurstDrill.java index 150800705c..2c8563899c 100644 --- a/core/src/mindustry/world/blocks/production/BurstDrill.java +++ b/core/src/mindustry/world/blocks/production/BurstDrill.java @@ -80,7 +80,7 @@ public class BurstDrill extends Drill{ if(invertTime > 0f) invertTime -= delta() / invertedTime; - if(timer(timerDump, dumpTime)){ + if(timer(timerDump, dumpTime / timeScale)){ dump(items.has(dominantItem) ? dominantItem : null); } diff --git a/core/src/mindustry/world/blocks/production/Drill.java b/core/src/mindustry/world/blocks/production/Drill.java index 12ef7bace5..c327111e03 100644 --- a/core/src/mindustry/world/blocks/production/Drill.java +++ b/core/src/mindustry/world/blocks/production/Drill.java @@ -286,7 +286,7 @@ public class Drill extends Block{ @Override public void updateTile(){ - if(timer(timerDump, dumpTime)){ + if(timer(timerDump, dumpTime / timeScale)){ dump(dominantItem != null && items.has(dominantItem) ? dominantItem : null); } diff --git a/core/src/mindustry/world/blocks/production/Separator.java b/core/src/mindustry/world/blocks/production/Separator.java index 1bd5351b5e..22ad5c94ab 100644 --- a/core/src/mindustry/world/blocks/production/Separator.java +++ b/core/src/mindustry/world/blocks/production/Separator.java @@ -162,7 +162,7 @@ public class Separator extends Block{ } } - if(timer(timerDump, dumpTime)){ + if(timer(timerDump, dumpTime / timeScale)){ dump(); } } diff --git a/core/src/mindustry/world/blocks/production/WallCrafter.java b/core/src/mindustry/world/blocks/production/WallCrafter.java index df2395faa4..9c70967212 100644 --- a/core/src/mindustry/world/blocks/production/WallCrafter.java +++ b/core/src/mindustry/world/blocks/production/WallCrafter.java @@ -216,7 +216,7 @@ public class WallCrafter extends Block{ totalTime += edelta() * warmup * (eff <= 0f ? 0f : 1f); - if(timer(timerDump, dumpTime)){ + if(timer(timerDump, dumpTime / timeScale)){ dump(output); } }