diff --git a/core/src/mindustry/ai/types/CommandAI.java b/core/src/mindustry/ai/types/CommandAI.java index 8b8b1bb744..db82fbf102 100644 --- a/core/src/mindustry/ai/types/CommandAI.java +++ b/core/src/mindustry/ai/types/CommandAI.java @@ -184,6 +184,9 @@ public class CommandAI extends AIController{ }else if(target != null){ faceTarget(); } + + //boosting control is not supported, so just don't. + unit.updateBoosting(false); } @Override @@ -236,8 +239,6 @@ public class CommandAI extends AIController{ pathId = Vars.controlPath.nextTargetId(); } - - /* //TODO ひどい diff --git a/core/src/mindustry/world/blocks/production/GenericCrafter.java b/core/src/mindustry/world/blocks/production/GenericCrafter.java index fd4e76a9d8..0019307560 100644 --- a/core/src/mindustry/world/blocks/production/GenericCrafter.java +++ b/core/src/mindustry/world/blocks/production/GenericCrafter.java @@ -240,14 +240,17 @@ public class GenericCrafter extends Block{ @Override public float getProgressIncrease(float baseTime){ //limit progress increase by maximum amount of liquid it can produce - float scaling = 1f; + float scaling = 1f, max = 0f; if(outputLiquids != null){ for(var s : outputLiquids){ - scaling = Math.min(scaling, (liquidCapacity - liquids.get(s.liquid)) / (s.amount * edelta())); + float value = (liquidCapacity - liquids.get(s.liquid)) / (s.amount * edelta()); + scaling = Math.min(scaling, value); + max = Math.max(max, value); } } - return super.getProgressIncrease(baseTime) * scaling; + //when dumping excess take the maximum value instead of the minimum. + return super.getProgressIncrease(baseTime) * (dumpExtraLiquid ? Math.min(max, 1f) : scaling); } public float warmupTarget(){