This commit is contained in:
Anuken
2020-12-19 12:28:56 -05:00
parent e5982faf35
commit 9e05f7604d
3 changed files with 7 additions and 6 deletions

View File

@@ -92,11 +92,6 @@ public class ItemLiquidGenerator extends PowerGenerator{
return generateTime > 0; return generateTime > 0;
} }
@Override
public float ambientVolume(){
return Mathf.clamp(productionEfficiency);
}
@Override @Override
public void updateTile(){ public void updateTile(){
//Note: Do not use this delta when calculating the amount of power or the power efficiency, but use it for resource consumption if necessary. //Note: Do not use this delta when calculating the amount of power or the power efficiency, but use it for resource consumption if necessary.

View File

@@ -1,6 +1,7 @@
package mindustry.world.blocks.power; package mindustry.world.blocks.power;
import arc.*; import arc.*;
import arc.math.*;
import arc.struct.*; import arc.struct.*;
import arc.util.*; import arc.util.*;
import arc.util.io.*; import arc.util.io.*;
@@ -50,6 +51,11 @@ public class PowerGenerator extends PowerDistributor{
/** The efficiency of the producer. An efficiency of 1.0 means 100% */ /** The efficiency of the producer. An efficiency of 1.0 means 100% */
public float productionEfficiency = 0.0f; public float productionEfficiency = 0.0f;
@Override
public float ambientVolume(){
return Mathf.clamp(productionEfficiency);
}
@Override @Override
public float getPowerProduction(){ public float getPowerProduction(){
return powerProduction * productionEfficiency; return powerProduction * productionEfficiency;

View File

@@ -1,3 +1,3 @@
org.gradle.daemon=true org.gradle.daemon=true
org.gradle.jvmargs=-Xms256m -Xmx1024m org.gradle.jvmargs=-Xms256m -Xmx1024m
archash=b647f8dd4e96daf1ed869f1fd1fb38bb3f37135c archash=b91cf2f8d2073bb03f6c07e8f8282c4039b10138