Fixed #11487
This commit is contained in:
@@ -155,7 +155,7 @@ abstract class BuilderComp implements Posc, Statusc, Teamc, Rotc{
|
||||
if(!within(tile, finalPlaceDst)) continue;
|
||||
|
||||
if(!headless){
|
||||
Vars.control.sound.loop(Sounds.loopBuild, tile, 1f);
|
||||
Vars.control.sound.loop(Sounds.loopBuild, tile, 1.2f);
|
||||
}
|
||||
|
||||
if(!(tile.build instanceof ConstructBuild cb)){
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user