Fixed #3834 / Fixed #3835 / Fixed #3837

This commit is contained in:
Anuken
2020-12-07 11:10:19 -05:00
parent 5e0ba2f4af
commit 557cb1c532
6 changed files with 25 additions and 4 deletions

View File

@@ -45,6 +45,16 @@ public class BuilderAI extends AIController{
//approach request if building
BuildPlan req = unit.buildPlan();
//clear break plan if another player is breaking something.
if(!req.breaking && timer.get(timerTarget2, 40f)){
for(Player player : Groups.player){
if(player.isBuilder() && player.unit().activelyBuilding() && player.unit().buildPlan().samePos(req) && player.unit().buildPlan().breaking){
unit.plans.removeFirst();
return;
}
}
}
boolean valid =
(req.tile() != null && req.tile().build instanceof ConstructBuild && req.tile().<ConstructBuild>bc().cblock == req.block) ||
(req.breaking ?