Unit cargo transport system

This commit is contained in:
Anuken
2021-11-29 20:06:49 -05:00
parent 635027bb81
commit 6483d924af
32 changed files with 631 additions and 115 deletions

View File

@@ -173,8 +173,7 @@ public class AIController implements UnitController{
public Teamc targetFlag(float x, float y, BlockFlag flag, boolean enemy){
if(unit.team == Team.derelict) return null;
Tile target = Geometry.findClosest(x, y, enemy ? indexer.getEnemy(unit.team, flag) : indexer.getAllied(unit.team, flag));
return target == null ? null : target.build;
return Geometry.findClosest(x, y, enemy ? indexer.getEnemy(unit.team, flag) : indexer.getFlagged(unit.team, flag));
}
public Teamc target(float x, float y, float range, boolean air, boolean ground){