Bullet pierceCap fix + Malis + Other fixes
This commit is contained in:
@@ -107,7 +107,7 @@ public class BuildTurret extends BaseTurret{
|
||||
|
||||
checkSuppression();
|
||||
|
||||
unit.buildSpeedMultiplier(efficiency * timeScale);
|
||||
unit.buildSpeedMultiplier(Math.max(efficiency * timeScale, 0.0001f));
|
||||
unit.speedMultiplier(efficiency * timeScale);
|
||||
|
||||
warmup = Mathf.lerpDelta(warmup, unit.activelyBuilding() ? 1f : 0f, 0.1f);
|
||||
@@ -204,7 +204,7 @@ public class BuildTurret extends BaseTurret{
|
||||
|
||||
@Override
|
||||
public boolean shouldConsume(){
|
||||
return super.shouldConsume() && unit.activelyBuilding() && !isHealSuppressed();
|
||||
return unit.plans().size > 0 && !isHealSuppressed();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -96,6 +96,7 @@ public class RegenProjector extends Block{
|
||||
public Seq<Building> targets = new Seq<>();
|
||||
public int lastChange = -2;
|
||||
public float warmup, totalTime, optionalTimer;
|
||||
public boolean anyTargets = false;
|
||||
public boolean didRegen = false;
|
||||
|
||||
public void updateTargets(){
|
||||
@@ -115,12 +116,15 @@ public class RegenProjector extends Block{
|
||||
warmup = Mathf.approachDelta(warmup, didRegen ? 1f : 0f, 1f / 70f);
|
||||
totalTime += warmup * Time.delta;
|
||||
didRegen = false;
|
||||
anyTargets = false;
|
||||
|
||||
//no healing when suppressed
|
||||
if(checkSuppression()){
|
||||
return;
|
||||
}
|
||||
|
||||
anyTargets = targets.contains(b -> b.damaged());
|
||||
|
||||
if(efficiency > 0){
|
||||
if((optionalTimer += Time.delta * optionalEfficiency) >= optionalUseTime){
|
||||
consume();
|
||||
@@ -161,8 +165,8 @@ public class RegenProjector extends Block{
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean productionValid(){
|
||||
return didRegen;
|
||||
public boolean shouldConsume(){
|
||||
return anyTargets;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -74,7 +74,7 @@ public class Turret extends ReloadTurret{
|
||||
/** Minimum warmup needed to fire. */
|
||||
public float minWarmup = 0f;
|
||||
/** If true, this turret will accurately target moving targets with respect to charge time. */
|
||||
public boolean accurateDelay = false;
|
||||
public boolean accurateDelay = true;
|
||||
/** If false, this turret can't move while charging. */
|
||||
public boolean moveWhileCharging = true;
|
||||
/** pattern used for bullets */
|
||||
|
||||
Reference in New Issue
Block a user