mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-21 12:08:34 +07:00
Misc cleanup
This commit is contained in:
parent
a28601d91c
commit
01c3738275
@ -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;
|
||||
|
@ -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){
|
||||
|
@ -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));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user