From 3a4f3e7fe7867c983bc35203ec2dbb43b66583d9 Mon Sep 17 00:00:00 2001 From: Anuken Date: Sat, 20 Apr 2024 11:18:57 -0400 Subject: [PATCH] Don't refund deconstruction in sandbox --- core/src/mindustry/world/blocks/ConstructBlock.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/mindustry/world/blocks/ConstructBlock.java b/core/src/mindustry/world/blocks/ConstructBlock.java index 796c7369bd..f45822964a 100644 --- a/core/src/mindustry/world/blocks/ConstructBlock.java +++ b/core/src/mindustry/world/blocks/ConstructBlock.java @@ -353,7 +353,7 @@ public class ConstructBlock extends Block{ if(progress <= current.deconstructThreshold || state.rules.infiniteResources){ //add any leftover items that weren't obtained due to rounding errors - if(core != null){ + if(core != null && !state.rules.infiniteResources){ for(int i = 0; i < itemsLeft.length; i++){ int target = Mathf.round(requirements[i].amount * state.rules.buildCostMultiplier * state.rules.deconstructRefundMultiplier); int remaining = target - itemsLeft[i];