Fixes... pt 1
Thanks BalaM314 using liquidBoostIntensity rather than optionalBoostIntensity applied on speed rather than drillTime
This commit is contained in:
@@ -27,8 +27,6 @@ public class BurstDrill extends Drill{
|
|||||||
public @Load("@-arrow-blur") TextureRegion arrowBlurRegion;
|
public @Load("@-arrow-blur") TextureRegion arrowBlurRegion;
|
||||||
|
|
||||||
public float invertedTime = 200f;
|
public float invertedTime = 200f;
|
||||||
/** How many times faster the drill will progress when boosted by an optional consumer. */
|
|
||||||
public float optionalBoostIntensity = 1.5f;
|
|
||||||
public float arrowSpacing = 4f, arrowOffset = 0f;
|
public float arrowSpacing = 4f, arrowOffset = 0f;
|
||||||
public int arrows = 3;
|
public int arrows = 3;
|
||||||
public Color arrowColor = Color.valueOf("feb380"), baseArrowColor = Color.valueOf("6e7080");
|
public Color arrowColor = Color.valueOf("feb380"), baseArrowColor = Color.valueOf("6e7080");
|
||||||
@@ -67,11 +65,11 @@ public class BurstDrill extends Drill{
|
|||||||
|
|
||||||
stats.add(Stat.drillSpeed, 60f / drillTime * size * size, StatUnit.itemsSecond);
|
stats.add(Stat.drillSpeed, 60f / drillTime * size * size, StatUnit.itemsSecond);
|
||||||
|
|
||||||
if(optionalBoostIntensity != 1 && findConsumer(f -> f instanceof ConsumeLiquidBase && f.booster) instanceof ConsumeLiquidBase consBase){
|
if(liquidBoostIntensity != 1 && findConsumer(f -> f instanceof ConsumeLiquidBase && f.booster) instanceof ConsumeLiquidBase consBase){
|
||||||
stats.remove(Stat.booster);
|
stats.remove(Stat.booster);
|
||||||
stats.add(Stat.booster,
|
stats.add(Stat.booster,
|
||||||
StatValues.speedBoosters("{0}" + StatUnit.timesSpeed.localized(),
|
StatValues.speedBoosters("{0}" + StatUnit.timesSpeed.localized(),
|
||||||
consBase.amount, optionalBoostIntensity, false,
|
consBase.amount, liquidBoostIntensity, false,
|
||||||
l -> (consumesLiquid(l) && (findConsumer(f -> f instanceof ConsumeLiquid).booster || ((ConsumeLiquid)findConsumer(f -> f instanceof ConsumeLiquid)).liquid != l)))
|
l -> (consumesLiquid(l) && (findConsumer(f -> f instanceof ConsumeLiquid).booster || ((ConsumeLiquid)findConsumer(f -> f instanceof ConsumeLiquid)).liquid != l)))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -94,15 +92,14 @@ public class BurstDrill extends Drill{
|
|||||||
dump(items.has(dominantItem) ? dominantItem : null);
|
dump(items.has(dominantItem) ? dominantItem : null);
|
||||||
}
|
}
|
||||||
|
|
||||||
float multiplier = Mathf.lerp(1f, optionalBoostIntensity, optionalEfficiency);
|
float drillTime = getDrillTime(dominantItem);
|
||||||
float drillTime = getDrillTime(dominantItem) / multiplier;
|
|
||||||
|
|
||||||
smoothProgress = Mathf.lerpDelta(smoothProgress, progress / (drillTime - 20f), 0.1f);
|
smoothProgress = Mathf.lerpDelta(smoothProgress, progress / (drillTime - 20f), 0.1f);
|
||||||
|
|
||||||
if(items.total() <= itemCapacity - dominantItems && dominantItems > 0 && efficiency > 0){
|
if(items.total() <= itemCapacity - dominantItems && dominantItems > 0 && efficiency > 0){
|
||||||
warmup = Mathf.approachDelta(warmup, progress / drillTime, 0.01f);
|
warmup = Mathf.approachDelta(warmup, progress / drillTime, 0.01f);
|
||||||
|
|
||||||
float speed = efficiency;
|
float speed = Mathf.lerp(1f, liquidBoostIntensity, optionalEfficiency) * efficiency;
|
||||||
|
|
||||||
timeDrilled += speedCurve.apply(progress / drillTime) * speed;
|
timeDrilled += speedCurve.apply(progress / drillTime) * speed;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user