mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-22 04:28:27 +07:00
Misc cleanup
This commit is contained in:
parent
a28601d91c
commit
01c3738275
@ -155,7 +155,10 @@ public class ControlPathfinder{
|
|||||||
return lastTargetId ++;
|
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){
|
public boolean getPathPosition(Unit unit, int pathId, Vec2 destination, Vec2 out){
|
||||||
//uninitialized
|
//uninitialized
|
||||||
if(threads == null || !world.tiles.in(World.toTile(destination.x), World.toTile(destination.y))) return false;
|
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 :
|
attackTarget != null ? engageRange :
|
||||||
0f, unit.isFlying() ? 40f : 100f, false, null, true);
|
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
|
//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){
|
if(attackTarget == null){
|
||||||
//TODO overshoot.
|
|
||||||
if(unit.within(targetPos, Math.max(5f, unit.hitSize / 2f))){
|
if(unit.within(targetPos, Math.max(5f, unit.hitSize / 2f))){
|
||||||
targetPos = null;
|
targetPos = null;
|
||||||
}else if(local.size > 1){
|
}else if(local.size > 1){
|
||||||
|
@ -38,8 +38,8 @@ public class AttributeCrafter extends GenericCrafter{
|
|||||||
if(!displayEfficiency) return;
|
if(!displayEfficiency) return;
|
||||||
|
|
||||||
addBar("efficiency", (AttributeCrafterBuild entity) ->
|
addBar("efficiency", (AttributeCrafterBuild entity) ->
|
||||||
new Bar(() ->
|
new Bar(
|
||||||
Core.bundle.format("bar.efficiency", (int)(entity.efficiencyScale() * 100 * displayEfficiencyScale)),
|
() -> Core.bundle.format("bar.efficiency", (int)(entity.efficiencyScale() * 100 * displayEfficiencyScale)),
|
||||||
() -> Pal.lightOrange,
|
() -> Pal.lightOrange,
|
||||||
entity::efficiencyScale));
|
entity::efficiencyScale));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user