This commit is contained in:
Anuken
2019-01-09 11:49:28 -05:00
parent 33afab7294
commit 2bc63b37e4
3 changed files with 3 additions and 36 deletions

View File

@@ -222,35 +222,8 @@ public class Control implements ApplicationListener{
return hiscore;
}
private void checkUnlockableBlocks(){
TileEntity entity = players[0].getClosestCore();
if(entity == null) return;
entity.items.forEach((item, amount) -> data.unlockContent(item));
if(players[0].inventory.hasItem()){
data.unlockContent(players[0].inventory.getItem().item);
}
outer:
for(int i = 0; i < content.recipes().size; i ++){
Recipe recipe = content.recipes().get(i);
if(!recipe.isHidden() && recipe.requirements != null){
for(ItemStack stack : recipe.requirements){
if(!entity.items.has(stack.item, Math.min((int) (stack.amount), 2000))) continue outer;
}
if(data.unlockContent(recipe)){
ui.hudfrag.showUnlock(recipe);
}
}
}
}
@Override
public void dispose(){
Platform.instance.onGameExit();
content.dispose();
Net.dispose();
ui.editor.dispose();

View File

@@ -38,8 +38,6 @@ public abstract class Platform {
}
/**Update discord RPC.*/
public void updateRPC(){}
/**Called when the game is exited.*/
public void onGameExit(){}
/**Open donation dialog. Currently android only.*/
public void openDonations(){}
/**Whether donating is supported.*/