- Added an option to toggle filtering lands by color identity on/off.

This commit is contained in:
Agetian
2015-06-08 13:00:14 +00:00
parent c6d7561e80
commit aa7adbda44
5 changed files with 24 additions and 2 deletions

View File

@@ -13,6 +13,8 @@ import forge.interfaces.IButton;
import forge.item.InventoryItem;
import forge.item.PaperCard;
import forge.itemmanager.SItemManagerUtil.StatTypes;
import forge.model.FModel;
import forge.properties.ForgePreferences;
import forge.util.BinaryUtil;
import forge.util.PredicateString.StringOp;
@@ -168,7 +170,7 @@ public class SFilterUtil {
boolean allColorsFilteredOut = colors == 0;
//use color identity for lands, which allows filtering to just lands that can be played in your deck
boolean useColorIdentity = rules.getType().isLand() && !allColorsFilteredOut;
boolean useColorIdentity = rules.getType().isLand() && !allColorsFilteredOut && FModel.getPreferences().getPrefBoolean(ForgePreferences.FPref.UI_FILTER_LANDS_BY_COLOR_IDENTITY);
if (useColorIdentity) {
color = rules.getColorIdentity();
}

View File

@@ -79,6 +79,7 @@ public class ForgePreferences extends PreferencesStore<ForgePreferences.FPref> {
UI_PAUSE_WHILE_MINIMIZED("false"),
UI_TOKENS_IN_SEPARATE_ROW("false"), // Display tokens in their own battlefield row.
UI_DISPLAY_CURRENT_COLORS("Never"),
UI_FILTER_LANDS_BY_COLOR_IDENTITY("true"),
UI_FOR_TOUCHSCREN("false"),