This commit is contained in:
Anuken
2020-09-14 11:13:27 -04:00
parent 8901838c19
commit d6447cb31a
4 changed files with 35 additions and 10 deletions

View File

@@ -31,7 +31,7 @@ public class PlacementFragment extends Fragment{
final int rowWidth = 4;
public Category currentCategory = Category.distribution;
Seq<Block> returnArray = new Seq<>();
Seq<Block> returnArray = new Seq<>(), returnArray2 = new Seq<>();
Seq<Category> returnCatArray = new Seq<>();
boolean[] categoryEmpty = new boolean[Category.all.length];
ObjectMap<Category,Block> selectedBlocks = new ObjectMap<>();
@@ -422,7 +422,7 @@ public class PlacementFragment extends Fragment{
}
Seq<Block> getUnlockedByCategory(Category cat){
return returnArray.selectFrom(content.blocks(), block -> block.category == cat && block.isVisible() && unlocked(block)).sort((b1, b2) -> Boolean.compare(!b1.isPlaceable(), !b2.isPlaceable()));
return returnArray2.selectFrom(content.blocks(), block -> block.category == cat && block.isVisible() && unlocked(block)).sort((b1, b2) -> Boolean.compare(!b1.isPlaceable(), !b2.isPlaceable()));
}
Block getSelectedBlock(Category cat){