From f5f19339234d3ba8efb5eaa108011f7ea6e064d5 Mon Sep 17 00:00:00 2001 From: Anuken Date: Fri, 11 Jul 2025 10:56:25 -0400 Subject: [PATCH] Mining units now search for the closest ore to the core, not themselves --- core/src/mindustry/ai/types/MinerAI.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/mindustry/ai/types/MinerAI.java b/core/src/mindustry/ai/types/MinerAI.java index 4cbf671bc2..a560250172 100644 --- a/core/src/mindustry/ai/types/MinerAI.java +++ b/core/src/mindustry/ai/types/MinerAI.java @@ -55,8 +55,8 @@ public class MinerAI extends AIController{ }else{ if(timer.get(timerTarget3, 60) && targetItem != null){ ore = null; - if(unit.type.mineFloor) ore = indexer.findClosestOre(unit, targetItem); - if(ore == null && unit.type.mineWalls) ore = indexer.findClosestWallOre(unit, targetItem); + if(unit.type.mineFloor) ore = indexer.findClosestOre(core.x, core.y, targetItem); + if(ore == null && unit.type.mineWalls) ore = indexer.findClosestWallOre(core.x, core.y, targetItem); } if(ore != null){