Deprecated Turret powerUse

This commit is contained in:
Anuken
2022-02-08 14:38:36 -05:00
parent 4cfbbca96b
commit fc3f17ba97
3 changed files with 10 additions and 11 deletions

View File

@@ -2758,7 +2758,6 @@ public class Blocks{
recoilAmount = 2f;
reloadTime = 80f;
cooldown = 0.03f;
powerUse = 6f;
shootShake = 2f;
shootEffect = Fx.lancerLaserShoot;
smokeEffect = Fx.none;
@@ -2770,6 +2769,8 @@ public class Blocks{
targetAir = false;
shootSound = Sounds.laser;
consumes.power(6f);
shootType = new LaserBulletType(140){{
colors = new Color[]{Pal.lancerLaser.cpy().a(0.4f), Pal.lancerLaser, Color.white};
hitEffect = Fx.hitLancer;
@@ -2793,7 +2794,7 @@ public class Blocks{
reloadTime = 35f;
shootCone = 40f;
rotateSpeed = 8f;
powerUse = 3.3f;
consumes.power(3.3f);
targetAir = false;
range = 90f;
shootEffect = Fx.lightningShoot;
@@ -3077,7 +3078,7 @@ public class Blocks{
reloadTime = 90f;
firingMoveFract = 0.5f;
shootDuration = 230f;
powerUse = 17f;
consumes.power(17f);
shootSound = Sounds.laserbig;
loopSound = Sounds.beam;
loopSoundVolume = 2f;

View File

@@ -22,12 +22,6 @@ public class LaserTurret extends PowerTurret{
coolantMultiplier = 1f;
}
@Override
public void init(){
consumes.power(powerUse);
super.init();
}
@Override
public void setStats(){
super.setStats();

View File

@@ -7,7 +7,9 @@ import mindustry.world.meta.*;
public class PowerTurret extends Turret{
public BulletType shootType;
public float powerUse = 1f;
/** @deprecated just consume power directly instead. */
@Deprecated
public float powerUse = -1f;
public PowerTurret(String name){
super(name);
@@ -22,7 +24,9 @@ public class PowerTurret extends Turret{
@Override
public void init(){
if(powerUse > 0){
consumes.power(powerUse);
}
super.init();
}