mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-01-27 06:51:30 -08:00
Fixed #9537
This commit is contained in:
parent
5ed1c5d29b
commit
e99b9c2ad1
3 changed files with 10 additions and 1 deletions
|
|
@ -31,7 +31,7 @@ public class Schematic implements Publishable, Comparable<Schematic>{
|
|||
}
|
||||
|
||||
public float powerProduction(){
|
||||
return tiles.sumf(s -> s.block instanceof PowerGenerator p ? p.powerProduction : 0f);
|
||||
return tiles.sumf(s -> s.block instanceof PowerGenerator p ? p.getDisplayedPowerProduction() : 0f);
|
||||
}
|
||||
|
||||
public float powerConsumption(){
|
||||
|
|
|
|||
|
|
@ -46,6 +46,10 @@ public class PowerGenerator extends PowerDistributor{
|
|||
flags = EnumSet.of(BlockFlag.generator);
|
||||
}
|
||||
|
||||
public float getDisplayedPowerProduction(){
|
||||
return powerProduction;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TextureRegion[] icons(){
|
||||
return drawer.finalIcons(this);
|
||||
|
|
|
|||
|
|
@ -26,6 +26,11 @@ public class ThermalGenerator extends PowerGenerator{
|
|||
noUpdateDisabled = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getDisplayedPowerProduction(){
|
||||
return powerProduction / displayEfficiencyScale;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(){
|
||||
if(outputLiquid != null){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue