This commit is contained in:
Anuken
2023-09-30 21:09:04 -04:00
parent 46ed5e05bb
commit d7c12edba4

View File

@@ -19,6 +19,7 @@ import mindustry.world.meta.*;
import static mindustry.Vars.*; import static mindustry.Vars.*;
public class OverdriveProjector extends Block{ public class OverdriveProjector extends Block{
@Deprecated
public final int timerUse = timers++; public final int timerUse = timers++;
public @Load("@-top") TextureRegion topRegion; public @Load("@-top") TextureRegion topRegion;
@@ -81,7 +82,7 @@ public class OverdriveProjector extends Block{
} }
public class OverdriveBuild extends Building implements Ranged{ public class OverdriveBuild extends Building implements Ranged{
public float heat, charge = Mathf.random(reload), phaseHeat, smoothEfficiency; public float heat, charge = Mathf.random(reload), phaseHeat, smoothEfficiency, useProgress;
@Override @Override
public float range(){ public float range(){
@@ -110,8 +111,13 @@ public class OverdriveProjector extends Block{
indexer.eachBlock(this, realRange, other -> other.block.canOverdrive, other -> other.applyBoost(realBoost(), reload + 1f)); indexer.eachBlock(this, realRange, other -> other.block.canOverdrive, other -> other.applyBoost(realBoost(), reload + 1f));
} }
if(timer(timerUse, useTime) && efficiency > 0){ if(efficiency > 0){
useProgress += delta();
}
if(useProgress >= useTime){
consume(); consume();
useProgress %= useTime;
} }
} }