Fixed turret targeting

This commit is contained in:
Anuken
2022-03-02 14:53:50 -05:00
parent b48f350914
commit b05874ccf7
3 changed files with 6 additions and 6 deletions

View File

@@ -77,7 +77,7 @@ public class LaunchPad extends Block{
@Override
public boolean shouldConsume(){
//TODO add launch costs, maybe legacy version
return launchCounter < launchTime && enabled;
return launchCounter < launchTime;
}
@Override

View File

@@ -331,13 +331,13 @@ public class Turret extends ReloadTurret{
//turret always reloads regardless of whether it's targeting something
updateReload();
if(timer(timerTarget, targetInterval)){
findTarget();
}
if(hasAmmo()){
if(Float.isNaN(reloadCounter)) reloadCounter = 0;
if(timer(timerTarget, targetInterval)){
findTarget();
}
if(validateTarget()){
boolean canShoot = true;

View File

@@ -114,7 +114,7 @@ public class SolidPump extends Pump{
@Override
public boolean shouldConsume(){
return liquids.get(result) < liquidCapacity - 0.01f && enabled;
return liquids.get(result) < liquidCapacity - 0.01f;
}
@Override