Bugfixes
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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.*/
|
||||
|
||||
Reference in New Issue
Block a user