This commit is contained in:
Anuken
2023-08-22 10:10:08 -04:00
parent e6aa87ed71
commit 207806440b
4 changed files with 9 additions and 5 deletions

View File

@@ -23,6 +23,10 @@ public class MinerAI extends AIController{
unit.mineTile(null);
}
if(ore != null && !unit.validMine(ore)){
ore = null;
}
if(mining){
if(timer.get(timerTarget2, 60 * 4) || targetItem == null){
targetItem = unit.type.mineItems.min(i -> indexer.hasOre(i) && unit.canMine(i), i -> core.items.get(i));