Implemented scalable snapshot sizes

This commit is contained in:
Anuken
2018-06-28 20:49:12 -04:00
parent fdf7173f14
commit ab82faf7ba
9 changed files with 124 additions and 11 deletions

View File

@@ -1,14 +1,20 @@
package io.anuke.mindustry.entities.units;
import io.anuke.mindustry.Vars;
import io.anuke.mindustry.content.Items;
import io.anuke.mindustry.gen.CallEntity;
import io.anuke.mindustry.type.Item;
import io.anuke.ucore.util.Mathf;
public class UnitDrops {
private static final int maxItems = 200;
private static Item[] dropTable;
public static void dropItems(BaseUnit unit){
if(Vars.itemGroup.size() > maxItems){
return;
}
if(dropTable == null){
dropTable = new Item[]{Items.tungsten, Items.lead, Items.carbide};
}