This commit is contained in:
Anuken
2025-12-25 19:05:55 -05:00
parent e3ed17e7e9
commit a226d98116
2 changed files with 8 additions and 1 deletions

View File

@@ -432,6 +432,13 @@ public class LExecutor{
}
case deconstruct -> {
if((state.rules.logicUnitDeconstruct || exec.privileged) && unit.canBuild()){
//reset state of last request when necessary
if(ai.plan.x != World.toTile(x1) || ai.plan.y != World.toTile(y1) || !ai.plan.breaking || unit.plans.isEmpty()){
ai.plan.progress = 0;
ai.plan.initialized = false;
ai.plan.stuck = false;
}
ai.plan.x = World.toTile(x1);
ai.plan.y = World.toTile(y1);
ai.plan.breaking = true;