mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-06 00:49:14 +07:00
Fixed #9121
This commit is contained in:
parent
46ed5e05bb
commit
d7c12edba4
@ -19,6 +19,7 @@ import mindustry.world.meta.*;
|
||||
import static mindustry.Vars.*;
|
||||
|
||||
public class OverdriveProjector extends Block{
|
||||
@Deprecated
|
||||
public final int timerUse = timers++;
|
||||
|
||||
public @Load("@-top") TextureRegion topRegion;
|
||||
@ -81,7 +82,7 @@ public class OverdriveProjector extends Block{
|
||||
}
|
||||
|
||||
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
|
||||
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));
|
||||
}
|
||||
|
||||
if(timer(timerUse, useTime) && efficiency > 0){
|
||||
if(efficiency > 0){
|
||||
useProgress += delta();
|
||||
}
|
||||
|
||||
if(useProgress >= useTime){
|
||||
consume();
|
||||
useProgress %= useTime;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user