This commit is contained in:
Anuken 2024-11-01 13:59:45 -04:00
parent 8e6010ad8c
commit b56819fcd0
2 changed files with 5 additions and 0 deletions

View File

@ -4518,6 +4518,7 @@ public class Blocks{
}});
}};
scaleDamageEfficiency = true;
shootSound = Sounds.none;
loopSoundVolume = 1f;
loopSound = Sounds.laserbeam;

View File

@ -15,6 +15,7 @@ public class ContinuousTurret extends Turret{
public BulletType shootType = Bullets.placeholder;
/** Speed at which the turret can change its bullet "aim" distance. This is only used for point laser bullets. */
public float aimChangeSpeed = Float.POSITIVE_INFINITY;
public boolean scaleDamageEfficiency = false;
public ContinuousTurret(String name){
super(name);
@ -115,6 +116,9 @@ public class ContinuousTurret extends Turret{
entry.bullet.aimX = Tmp.v1.x;
entry.bullet.aimY = Tmp.v1.y;
if(scaleDamageEfficiency){
entry.bullet.damage = entry.bullet.type.damage * Math.min(efficiency, 1f);
}
if(isShooting() && hasAmmo()){
entry.bullet.time = entry.bullet.lifetime * entry.bullet.type.optimalLifeFract * Math.min(shootWarmup, efficiency);