Fixed impact reactor warming up without satisfied power

This commit is contained in:
Anuken
2019-05-03 00:13:37 -04:00
parent b2408b1a7c
commit 0c396f76b2
2 changed files with 1 additions and 1 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@@ -76,7 +76,7 @@ public class ImpactReactor extends PowerGenerator{
public void update(Tile tile){ public void update(Tile tile){
FusionReactorEntity entity = tile.entity(); FusionReactorEntity entity = tile.entity();
if(entity.cons.valid()){ if(entity.cons.valid() && entity.power.satisfaction >= 0.99f){
entity.warmup = Mathf.lerpDelta(entity.warmup, 1f, warmupSpeed); entity.warmup = Mathf.lerpDelta(entity.warmup, 1f, warmupSpeed);
if(Mathf.isEqual(entity.warmup, 1f, 0.001f)){ if(Mathf.isEqual(entity.warmup, 1f, 0.001f)){
entity.warmup = 1f; entity.warmup = 1f;