fix robot recharge

This commit is contained in:
Hea3veN 2015-04-25 09:27:04 -03:00
parent 0721f9e57a
commit fd9db77fb3
3 changed files with 2 additions and 11 deletions

View file

@ -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));
}
}

View file

@ -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;
}
}

View file

@ -97,6 +97,7 @@ public class BoardRobotBuilder extends RedstoneBoardRobot {
currentBuildingSlot.built = true;
currentBuildingSlot = null;
requirementsToLookFor = null;
return;
}
}