fix robot recharge
This commit is contained in:
parent
0721f9e57a
commit
fd9db77fb3
3 changed files with 2 additions and 11 deletions
|
@ -35,7 +35,7 @@ public class AIRobotMain extends AIRobot {
|
|||
}
|
||||
} else if (robot.getEnergy() < EntityRobotBase.SAFETY_ENERGY) {
|
||||
if (!(ai instanceof AIRobotRecharge) && !(ai instanceof AIRobotShutdown)) {
|
||||
if (rechargeCooldown-- == 0) {
|
||||
if (rechargeCooldown-- <= 0) {
|
||||
startDelegateAI(new AIRobotRecharge(robot));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,11 +15,8 @@ import buildcraft.robotics.IStationFilter;
|
|||
|
||||
public class AIRobotRecharge extends AIRobot {
|
||||
|
||||
private boolean success;
|
||||
|
||||
public AIRobotRecharge(EntityRobotBase iRobot) {
|
||||
super(iRobot);
|
||||
success = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -55,14 +52,7 @@ public class AIRobotRecharge extends AIRobot {
|
|||
if (!ai.success()) {
|
||||
setSuccess(false);
|
||||
terminate();
|
||||
} else {
|
||||
success = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean success() {
|
||||
return success;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -97,6 +97,7 @@ public class BoardRobotBuilder extends RedstoneBoardRobot {
|
|||
currentBuildingSlot.built = true;
|
||||
currentBuildingSlot = null;
|
||||
requirementsToLookFor = null;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue