Skip to content

Commit 11061d1

Browse files
committed
Fixed Anuken#10502
1 parent ed05214 commit 11061d1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

core/src/mindustry/world/blocks/ConstructBlock.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,8 @@ public void construct(Unit builder, @Nullable Building core, float amount, Objec
269269
setConstruct(previous, current);
270270
}
271271

272+
boolean infinite = team.rules().infiniteResources || state.rules.infiniteResources;
273+
272274
float maxProgress = core == null || team.rules().infiniteResources ? amount : checkRequired(core.items, amount, false);
273275

274276
for(int i = 0; i < current.requirements.length; i++){
@@ -285,7 +287,7 @@ public void construct(Unit builder, @Nullable Building core, float amount, Objec
285287
boolean canFinish = true;
286288

287289
//look at leftover resources to consume, get them from the core if necessary, delay building if not
288-
if(!state.rules.infiniteResources){
290+
if(!infinite){
289291
for(int i = 0; i < itemsLeft.length; i++){
290292
if(itemsLeft[i] > 0){
291293
if(core != null && core.items.has(current.requirements[i].item, itemsLeft[i])){

0 commit comments

Comments
 (0)