mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-01-24 05:21:15 -08:00
Fixed locked items getting unlocked through deconstructing
This commit is contained in:
parent
9f877c9f20
commit
0e4bb9d028
1 changed files with 3 additions and 1 deletions
|
|
@ -358,7 +358,9 @@ public class ConstructBlock extends Block{
|
|||
int target = Mathf.round(requirements[i].amount * state.rules.buildCostMultiplier * state.rules.deconstructRefundMultiplier);
|
||||
int remaining = target - itemsLeft[i];
|
||||
|
||||
core.items.add(current.requirements[i].item, Mathf.clamp(remaining, 0, core.storageCapacity - core.items.get(current.requirements[i].item)));
|
||||
if(requirements[i].item.unlockedNowHost()){
|
||||
core.items.add(requirements[i].item, Mathf.clamp(remaining, 0, core.storageCapacity - core.items.get(requirements[i].item)));
|
||||
}
|
||||
itemsLeft[i] = target;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue