This commit is contained in:
Anuken
2020-01-18 11:16:03 -05:00
236 changed files with 6310 additions and 6330 deletions

View File

@@ -85,9 +85,15 @@ public class GlobalData{
if(amount > 0){
unlockContent(item);
}
amount = Math.max(amount, 0);
modified = true;
items.getAndIncrement(item, 0, amount);
state.stats.itemsDelivered.getAndIncrement(item, 0, amount);
//clamp overflow
if(items.get(item, 0) < 0) items.put(item, Integer.MAX_VALUE);
if(state.stats.itemsDelivered.get(item, 0) < 0) state.stats.itemsDelivered.put(item, Integer.MAX_VALUE);
}
public boolean hasItems(Array<ItemStack> stacks){