From 11061d1dd17c051d8b159fd9e7b587d8298ae8e4 Mon Sep 17 00:00:00 2001 From: Anuken Date: Sun, 23 Feb 2025 01:26:47 -0500 Subject: [PATCH] Fixed #10502 --- core/src/mindustry/world/blocks/ConstructBlock.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/src/mindustry/world/blocks/ConstructBlock.java b/core/src/mindustry/world/blocks/ConstructBlock.java index 9d0cd7a47e..fcecf4805e 100644 --- a/core/src/mindustry/world/blocks/ConstructBlock.java +++ b/core/src/mindustry/world/blocks/ConstructBlock.java @@ -269,6 +269,8 @@ public class ConstructBlock extends Block{ setConstruct(previous, current); } + boolean infinite = team.rules().infiniteResources || state.rules.infiniteResources; + float maxProgress = core == null || team.rules().infiniteResources ? amount : checkRequired(core.items, amount, false); for(int i = 0; i < current.requirements.length; i++){ @@ -285,7 +287,7 @@ public class ConstructBlock extends Block{ boolean canFinish = true; //look at leftover resources to consume, get them from the core if necessary, delay building if not - if(!state.rules.infiniteResources){ + if(!infinite){ for(int i = 0; i < itemsLeft.length; i++){ if(itemsLeft[i] > 0){ if(core != null && core.items.has(current.requirements[i].item, itemsLeft[i])){