From 52b137232473b0e908366d91f59ec8de7cb35066 Mon Sep 17 00:00:00 2001 From: Anuken Date: Fri, 21 Oct 2022 17:24:10 -0400 Subject: [PATCH] Misc minor fixes & cost balance --- core/src/mindustry/ai/types/CommandAI.java | 12 +++++++++++- core/src/mindustry/content/Blocks.java | 4 ++-- core/src/mindustry/content/UnitTypes.java | 2 +- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/core/src/mindustry/ai/types/CommandAI.java b/core/src/mindustry/ai/types/CommandAI.java index eeabe95863..bf846306e7 100644 --- a/core/src/mindustry/ai/types/CommandAI.java +++ b/core/src/mindustry/ai/types/CommandAI.java @@ -21,7 +21,7 @@ public class CommandAI extends AIController{ /** All encountered unreachable buildings of this AI. Why a sequence? Because contains() is very rarely called on it. */ public IntSeq unreachableBuildings = new IntSeq(8); - protected boolean stopAtTarget; + protected boolean stopAtTarget, stopWhenInRange; protected Vec2 lastTargetPos; protected int pathId = -1; protected Seq local = new Seq<>(false); @@ -194,6 +194,11 @@ public class CommandAI extends AIController{ } } + if(stopWhenInRange && targetPos != null && unit.within(targetPos, engageRange - 1f)){ + targetPos = null; + stopWhenInRange = false; + } + }else if(target != null){ faceTarget(); } @@ -240,10 +245,15 @@ public class CommandAI extends AIController{ } public void commandPosition(Vec2 pos){ + commandPosition(pos, false); + } + + public void commandPosition(Vec2 pos, boolean stopWhenInRange){ targetPos = pos; lastTargetPos = pos; attackTarget = null; pathId = Vars.controlPath.nextTargetId(); + this.stopWhenInRange = stopWhenInRange; } public void commandTarget(Teamc moveTo){ diff --git a/core/src/mindustry/content/Blocks.java b/core/src/mindustry/content/Blocks.java index b92be03a74..d743b5c3f5 100644 --- a/core/src/mindustry/content/Blocks.java +++ b/core/src/mindustry/content/Blocks.java @@ -2543,7 +2543,7 @@ public class Blocks{ fluxReactor = new VariableReactor("flux-reactor"){{ requirements(Category.power, with(Items.graphite, 300, Items.carbide, 200, Items.oxide, 100, Items.silicon, 600, Items.surgeAlloy, 300)); powerProduction = 120f; - maxHeat = 150f; + maxHeat = 140f; consumeLiquid(Liquids.cyanogen, 9f / 60f); liquidCapacity = 30f; @@ -2934,7 +2934,7 @@ public class Blocks{ }}; coreCitadel = new CoreBlock("core-citadel"){{ - requirements(Category.effect, with(Items.silicon, 4000, Items.beryllium, 5000, Items.tungsten, 3000, Items.oxide, 1000)); + requirements(Category.effect, with(Items.silicon, 4000, Items.beryllium, 4000, Items.tungsten, 3000, Items.oxide, 1000)); unitType = UnitTypes.incite; health = 16000; diff --git a/core/src/mindustry/content/UnitTypes.java b/core/src/mindustry/content/UnitTypes.java index fdd2befe20..1800b20a84 100644 --- a/core/src/mindustry/content/UnitTypes.java +++ b/core/src/mindustry/content/UnitTypes.java @@ -3055,7 +3055,6 @@ public class UnitTypes{ trailWidth = 2f; trailLength = 4; shake = 1f; - recoil = 0.1f; trailEffect = Fx.missileTrail; trailParam = 1.8f; @@ -3093,6 +3092,7 @@ public class UnitTypes{ recoil = 0.5f; bullet = new BulletType(){{ + shootSound = Sounds.lasershoot; shootEffect = Fx.sparkShoot; hitEffect = Fx.pointHit; maxRange = 100f;