mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
Merge branch 'revertDefaultSort' into 'master'
Revert Default sort in Deckbuilder to code before Merge Request !1035 See merge request core-developers/forge!1042
This commit is contained in:
@@ -74,12 +74,12 @@ public enum GroupDef {
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
DEFAULT("Default", //Beginning in DDU, "Artifacts" category is added at top of list
|
DEFAULT("Default",
|
||||||
new String[] { "Artifacts", "Creatures", "Other Spells", "Lands" },
|
new String[] { "Creatures", "Spells", "Lands" },
|
||||||
new Function<Integer, ColumnDef>() {
|
new Function<Integer, ColumnDef>() {
|
||||||
@Override
|
@Override
|
||||||
public ColumnDef apply(final Integer groupIndex) {
|
public ColumnDef apply(final Integer groupIndex) {
|
||||||
if (groupIndex == 3) {
|
if (groupIndex == 2) {
|
||||||
return ColumnDef.NAME; //pile lands by name regardless
|
return ColumnDef.NAME; //pile lands by name regardless
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
@@ -90,22 +90,20 @@ public enum GroupDef {
|
|||||||
public Integer apply(final InventoryItem item) {
|
public Integer apply(final InventoryItem item) {
|
||||||
if (item instanceof PaperCard) {
|
if (item instanceof PaperCard) {
|
||||||
CardType type = ((PaperCard) item).getRules().getType();
|
CardType type = ((PaperCard) item).getRules().getType();
|
||||||
if (type.isArtifact()) { //artifact lands/creatures, too
|
if (type.isCreature()) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (type.isCreature()) {
|
if (type.isLand()) { //make Artifact Lands appear in Lands group
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
if (type.isLand()) {
|
|
||||||
return 3;
|
|
||||||
}
|
|
||||||
if (type.isEnchantment() || type.isPlaneswalker() || type.isInstant() || type.isSorcery()) {
|
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
if (type.isArtifact() || type.isEnchantment() || type.isPlaneswalker() || type.isInstant() || type.isSorcery()) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
|
|
||||||
CARD_TYPE("Type",
|
CARD_TYPE("Type",
|
||||||
new String[] { "Planeswalker", "Creature", "Sorcery", "Instant", "Artifact", "Enchantment", "Land", "Tribal instant" },
|
new String[] { "Planeswalker", "Creature", "Sorcery", "Instant", "Artifact", "Enchantment", "Land", "Tribal instant" },
|
||||||
new Function<Integer, ColumnDef>() {
|
new Function<Integer, ColumnDef>() {
|
||||||
|
|||||||
Reference in New Issue
Block a user