From 01c373827507e3092022fc3058b4695f21c46c84 Mon Sep 17 00:00:00 2001 From: Anuken Date: Sun, 7 Aug 2022 22:54:05 -0400 Subject: [PATCH] Misc cleanup --- core/src/mindustry/ai/ControlPathfinder.java | 5 ++++- core/src/mindustry/ai/types/CommandAI.java | 3 --- .../mindustry/world/blocks/production/AttributeCrafter.java | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/core/src/mindustry/ai/ControlPathfinder.java b/core/src/mindustry/ai/ControlPathfinder.java index 942f2004d6..2d590f0088 100644 --- a/core/src/mindustry/ai/ControlPathfinder.java +++ b/core/src/mindustry/ai/ControlPathfinder.java @@ -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; diff --git a/core/src/mindustry/ai/types/CommandAI.java b/core/src/mindustry/ai/types/CommandAI.java index cf0a2791d3..e2addfd0ae 100644 --- a/core/src/mindustry/ai/types/CommandAI.java +++ b/core/src/mindustry/ai/types/CommandAI.java @@ -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){ diff --git a/core/src/mindustry/world/blocks/production/AttributeCrafter.java b/core/src/mindustry/world/blocks/production/AttributeCrafter.java index 0c5a037cdc..e7d33cbf80 100644 --- a/core/src/mindustry/world/blocks/production/AttributeCrafter.java +++ b/core/src/mindustry/world/blocks/production/AttributeCrafter.java @@ -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)); }