diff --git a/core/src/mindustry/ai/types/MinerAI.java b/core/src/mindustry/ai/types/MinerAI.java index 822af9d5d7..ff66ab6116 100644 --- a/core/src/mindustry/ai/types/MinerAI.java +++ b/core/src/mindustry/ai/types/MinerAI.java @@ -71,5 +71,8 @@ public class MinerAI extends AIController{ circle(core, unit.type.range / 1.8f); } + if(!unit.type.flying){ + unit.updateBoosting(unit.type.boostWhenMining || unit.floorOn().isDuct || unit.floorOn().damageTaken > 0f || unit.floorOn().isDeep()); + } } } \ No newline at end of file diff --git a/core/src/mindustry/type/UnitType.java b/core/src/mindustry/type/UnitType.java index c99fa2090d..fd189bfc7f 100644 --- a/core/src/mindustry/type/UnitType.java +++ b/core/src/mindustry/type/UnitType.java @@ -169,6 +169,8 @@ public class UnitType extends UnlockableContent implements Senseable{ canBoost = false, /** if true, this unit will always boost when using builder AI */ boostWhenBuilding = true, + /** if true, this unit will always boost when using miner AI */ + boostWhenMining = true, /** if false, logic processors cannot control this unit */ logicControllable = true, /** if false, players cannot control this unit */ @@ -974,6 +976,9 @@ public class UnitType extends UnlockableContent implements Senseable{ if(buildSpeed > 0f){ commands.add(UnitCommand.rebuildCommand, UnitCommand.assistCommand); } + if(mineTier > 0){ + commands.add(UnitCommand.mineCommand); + } } //healing, mining and building is only supported for flying units; pathfinding to ambiguously reachable locations is hard.