From 9e05f7604de5c5cc62b24ff5a535813446a5ec98 Mon Sep 17 00:00:00 2001 From: Anuken Date: Sat, 19 Dec 2020 12:28:56 -0500 Subject: [PATCH] Fixed #4043 --- .../mindustry/world/blocks/power/ItemLiquidGenerator.java | 5 ----- core/src/mindustry/world/blocks/power/PowerGenerator.java | 6 ++++++ gradle.properties | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/core/src/mindustry/world/blocks/power/ItemLiquidGenerator.java b/core/src/mindustry/world/blocks/power/ItemLiquidGenerator.java index 16cd34fb7b..b9e7f112bc 100644 --- a/core/src/mindustry/world/blocks/power/ItemLiquidGenerator.java +++ b/core/src/mindustry/world/blocks/power/ItemLiquidGenerator.java @@ -92,11 +92,6 @@ public class ItemLiquidGenerator extends PowerGenerator{ return generateTime > 0; } - @Override - public float ambientVolume(){ - return Mathf.clamp(productionEfficiency); - } - @Override 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. diff --git a/core/src/mindustry/world/blocks/power/PowerGenerator.java b/core/src/mindustry/world/blocks/power/PowerGenerator.java index ae9453d675..5a2bd12f0d 100644 --- a/core/src/mindustry/world/blocks/power/PowerGenerator.java +++ b/core/src/mindustry/world/blocks/power/PowerGenerator.java @@ -1,6 +1,7 @@ package mindustry.world.blocks.power; import arc.*; +import arc.math.*; import arc.struct.*; import arc.util.*; 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% */ public float productionEfficiency = 0.0f; + @Override + public float ambientVolume(){ + return Mathf.clamp(productionEfficiency); + } + @Override public float getPowerProduction(){ return powerProduction * productionEfficiency; diff --git a/gradle.properties b/gradle.properties index 5271fb2c42..6612596de1 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ org.gradle.daemon=true org.gradle.jvmargs=-Xms256m -Xmx1024m -archash=b647f8dd4e96daf1ed869f1fd1fb38bb3f37135c +archash=b91cf2f8d2073bb03f6c07e8f8282c4039b10138