From 469a49b3d6e877720f7b7020d874f1abf3910c01 Mon Sep 17 00:00:00 2001 From: Anuken Date: Mon, 8 Aug 2022 14:27:10 -0400 Subject: [PATCH] Cleanup --- core/src/mindustry/entities/comp/BuildingComp.java | 6 ++++-- core/src/mindustry/world/blocks/production/HeatCrafter.java | 6 ------ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/core/src/mindustry/entities/comp/BuildingComp.java b/core/src/mindustry/entities/comp/BuildingComp.java index 2a3d37c517..b57349c71a 100644 --- a/core/src/mindustry/entities/comp/BuildingComp.java +++ b/core/src/mindustry/entities/comp/BuildingComp.java @@ -1682,10 +1682,12 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc, /** Called after efficiency is updated but before consumers are updated. Use to apply your own multiplier. */ public void updateEfficiencyMultiplier(){ - + float scale = efficiencyScale(); + efficiency *= scale; + optionalEfficiency *= scale; } - /** Calculate your own efficiency multiplier. */ + /** Calculate your own efficiency multiplier. By default, this is applied in updateEfficiencyMultiplier. */ public float efficiencyScale(){ return 1f; } diff --git a/core/src/mindustry/world/blocks/production/HeatCrafter.java b/core/src/mindustry/world/blocks/production/HeatCrafter.java index 46565256be..498879f39d 100644 --- a/core/src/mindustry/world/blocks/production/HeatCrafter.java +++ b/core/src/mindustry/world/blocks/production/HeatCrafter.java @@ -66,12 +66,6 @@ public class HeatCrafter extends GenericCrafter{ return Mathf.clamp(heat / heatRequirement); } - @Override - public void updateEfficiencyMultiplier(){ - efficiency *= efficiencyScale(); - potentialEfficiency *= efficiencyScale(); - } - @Override public float efficiencyScale(){ float over = Math.max(heat - heatRequirement, 0f);