Fixed turret targeting
This commit is contained in:
@@ -77,7 +77,7 @@ public class LaunchPad extends Block{
|
|||||||
@Override
|
@Override
|
||||||
public boolean shouldConsume(){
|
public boolean shouldConsume(){
|
||||||
//TODO add launch costs, maybe legacy version
|
//TODO add launch costs, maybe legacy version
|
||||||
return launchCounter < launchTime && enabled;
|
return launchCounter < launchTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -331,13 +331,13 @@ public class Turret extends ReloadTurret{
|
|||||||
//turret always reloads regardless of whether it's targeting something
|
//turret always reloads regardless of whether it's targeting something
|
||||||
updateReload();
|
updateReload();
|
||||||
|
|
||||||
|
if(timer(timerTarget, targetInterval)){
|
||||||
|
findTarget();
|
||||||
|
}
|
||||||
|
|
||||||
if(hasAmmo()){
|
if(hasAmmo()){
|
||||||
if(Float.isNaN(reloadCounter)) reloadCounter = 0;
|
if(Float.isNaN(reloadCounter)) reloadCounter = 0;
|
||||||
|
|
||||||
if(timer(timerTarget, targetInterval)){
|
|
||||||
findTarget();
|
|
||||||
}
|
|
||||||
|
|
||||||
if(validateTarget()){
|
if(validateTarget()){
|
||||||
boolean canShoot = true;
|
boolean canShoot = true;
|
||||||
|
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ public class SolidPump extends Pump{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean shouldConsume(){
|
public boolean shouldConsume(){
|
||||||
return liquids.get(result) < liquidCapacity - 0.01f && enabled;
|
return liquids.get(result) < liquidCapacity - 0.01f;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user