Mining units now search for the closest ore to the core, not themselves

This commit is contained in:
Anuken
2025-07-11 10:56:25 -04:00
parent c7db8dc625
commit f5f1933923

View File

@@ -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){