More Tests and fixes

- Batteries will now get charged with no consumers
- Fixed stat display of power generators
This commit is contained in:
Timmeey86
2018-11-26 09:24:08 +01:00
parent 99139dfcca
commit 77b9feb765
3 changed files with 25 additions and 16 deletions

View File

@@ -22,7 +22,7 @@ public class PowerGenerator extends PowerDistributor{
@Override
public void setStats(){
super.setStats();
stats.add(generationType, powerProduction, StatUnit.powerSecond);
stats.add(generationType, powerProduction * 60.0f, StatUnit.powerSecond);
}
@Override

View File

@@ -132,7 +132,7 @@ public class PowerGraph{
}
public void update(){
if(threads.getFrameID() == lastFrameUpdated || consumers.size == 0 || producers.size == 0){
if(threads.getFrameID() == lastFrameUpdated || consumers.size == 0 && producers.size == 0 && batteries.size == 0){
return;
}