From bac4bb8c8fec7e0434a560b69984eb44360b11e2 Mon Sep 17 00:00:00 2001 From: Anuken Date: Fri, 4 Dec 2020 15:20:15 -0500 Subject: [PATCH] Heighten export cap when production is negative --- core/src/mindustry/game/SectorInfo.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/mindustry/game/SectorInfo.java b/core/src/mindustry/game/SectorInfo.java index 1ef9b37554..deb2ed4688 100644 --- a/core/src/mindustry/game/SectorInfo.java +++ b/core/src/mindustry/game/SectorInfo.java @@ -229,8 +229,9 @@ public class SectorInfo{ //cap production/export by production production.get(item).mean = Math.min(production.get(item).mean, rawProduction.get(item).mean); + if(export.containsKey(item)){ - export.get(item).mean = Math.min(export.get(item).mean, rawProduction.get(item).mean); + export.get(item).mean = Math.min(export.get(item).mean, Math.max(rawProduction.get(item).mean, -production.get(item).mean)); } }