Targeting priority

This commit is contained in:
Anuken
2019-10-14 18:54:50 -04:00
parent 3d8547d7dd
commit edfd402ccd
5 changed files with 15 additions and 2 deletions

View File

@@ -0,0 +1,6 @@
package io.anuke.mindustry.entities;
public enum TargetPriority{
base,
turret
}

View File

@@ -87,7 +87,7 @@ public class Units{
if(team == Team.derelict) return null;
for(Team enemy : state.teams.enemiesOf(team)){
TileEntity entity = indexer.findTile(enemy, x, y, range, pred);
TileEntity entity = indexer.findTile(enemy, x, y, range, pred, true);
if(entity != null){
return entity;
}