Misc cleanup

This commit is contained in:
Anuken 2022-08-07 22:54:05 -04:00
parent a28601d91c
commit 01c3738275
3 changed files with 6 additions and 6 deletions

View File

@ -155,7 +155,10 @@ public class ControlPathfinder{
return lastTargetId ++;
}
/** @return whether a path is ready */
/**
* @return whether a path is ready.
* @param pathId a unique ID for this location query, which should change every time the 'destination' vector is modified.
* */
public boolean getPathPosition(Unit unit, int pathId, Vec2 destination, Vec2 out){
//uninitialized
if(threads == null || !world.tiles.in(World.toTile(destination.x), World.toTile(destination.y))) return false;

View File

@ -129,8 +129,6 @@ public class CommandAI extends AIController{
attackTarget != null ? engageRange :
0f, unit.isFlying() ? 40f : 100f, false, null, true);
}
//calculateFlock().limit(unit.speed() * flockMult)
}
//if stopAtTarget is set, stop trying to move to the target once it is reached - used for defending
@ -145,7 +143,6 @@ public class CommandAI extends AIController{
}
if(attackTarget == null){
//TODO overshoot.
if(unit.within(targetPos, Math.max(5f, unit.hitSize / 2f))){
targetPos = null;
}else if(local.size > 1){

View File

@ -38,8 +38,8 @@ public class AttributeCrafter extends GenericCrafter{
if(!displayEfficiency) return;
addBar("efficiency", (AttributeCrafterBuild entity) ->
new Bar(() ->
Core.bundle.format("bar.efficiency", (int)(entity.efficiencyScale() * 100 * displayEfficiencyScale)),
new Bar(
() -> Core.bundle.format("bar.efficiency", (int)(entity.efficiencyScale() * 100 * displayEfficiencyScale)),
() -> Pal.lightOrange,
entity::efficiencyScale));
}