Renamed Preference for Custom Card in Deck Conformance Check

Previous naming (pref and vars) was very confusing. Updated.
This commit is contained in:
leriomaggio
2021-07-27 10:48:03 +01:00
parent 38a63bb4ce
commit b6bfa2fd16
4 changed files with 11 additions and 9 deletions

View File

@@ -130,7 +130,7 @@ public enum CSubmenuPreferences implements ICDoc {
lstControls.add(Pair.of(view.getCbEnableAICheats(), FPref.UI_ENABLE_AI_CHEATS));
lstControls.add(Pair.of(view.getCbEnableUnknownCards(), FPref.UI_LOAD_UNKNOWN_CARDS));
lstControls.add(Pair.of(view.getCbEnableNonLegalCards(), FPref.UI_LOAD_NONLEGAL_CARDS));
lstControls.add(Pair.of(view.getCbEnableCustomCards(), FPref.UI_LOAD_CUSTOM_CARDS));
lstControls.add(Pair.of(view.getCbAllowCustomCardsDeckConformance(), FPref.ALLOW_CUSTOM_CARDS_IN_DECKS_CONFORMANCE));
lstControls.add(Pair.of(view.getCbUseExperimentalNetworkStream(), FPref.UI_NETPLAY_COMPAT));
lstControls.add(Pair.of(view.getCbImageFetcher(), FPref.UI_ENABLE_ONLINE_IMAGE_FETCHER));
lstControls.add(Pair.of(view.getCbDisableCardImages(), FPref.UI_DISABLE_CARD_IMAGES));

View File

@@ -111,7 +111,7 @@ public enum VSubmenuPreferences implements IVSubmenu<CSubmenuPreferences> {
private final JCheckBox cbUseSentry = new OptionsCheckBox(localizer.getMessage("cbUseSentry"));
private final JCheckBox cbEnableUnknownCards = new OptionsCheckBox(localizer.getMessage("lblEnableUnknownCards"));
private final JCheckBox cbEnableNonLegalCards = new OptionsCheckBox(localizer.getMessage("lblEnableNonLegalCards"));
private final JCheckBox cbEnableCustomCards = new OptionsCheckBox(localizer.getMessage("lblEnableCustomCards"));
private final JCheckBox cbAllowCustomCardsDeckConformance = new OptionsCheckBox(localizer.getMessage("lblAllowCustomCardsInDecks"));
private final JCheckBox cbUseExperimentalNetworkStream = new OptionsCheckBox(localizer.getMessage("lblExperimentalNetworkCompatibility"));
private final JCheckBox cbCardArtCoreExpansionsOnlyOpt = new OptionsCheckBox(localizer.getMessage("lblPrefArtExpansionOnly"));
private final JCheckBox cbSmartCardArtSelectionOpt = new OptionsCheckBox(localizer.getMessage("lblSmartCardArtOpt"));
@@ -317,8 +317,8 @@ public enum VSubmenuPreferences implements IVSubmenu<CSubmenuPreferences> {
pnlPrefs.add(cbEnableNonLegalCards, titleConstraints);
pnlPrefs.add(new NoteLabel(localizer.getMessage("nlEnableNonLegalCards")), descriptionConstraints);
pnlPrefs.add(cbEnableCustomCards, titleConstraints);
pnlPrefs.add(new NoteLabel(localizer.getMessage("nlEnableCustomCards")), descriptionConstraints);
pnlPrefs.add(cbAllowCustomCardsDeckConformance, titleConstraints);
pnlPrefs.add(new NoteLabel(localizer.getMessage("nlAllowCustomCardsInDecks")), descriptionConstraints);
pnlPrefs.add(cbUseExperimentalNetworkStream, titleConstraints);
pnlPrefs.add(new NoteLabel(localizer.getMessage("nlExperimentalNetworkCompatibility")), descriptionConstraints);
@@ -632,8 +632,8 @@ public enum VSubmenuPreferences implements IVSubmenu<CSubmenuPreferences> {
return cbEnableNonLegalCards;
}
/** @return {@link javax.swing.JCheckBox} */
public JCheckBox getCbEnableCustomCards() {
return cbEnableCustomCards;
public JCheckBox getCbAllowCustomCardsDeckConformance() {
return cbAllowCustomCardsDeckConformance;
}
/** @return {@link javax.swing.JCheckBox} */

View File

@@ -154,7 +154,7 @@ public class ForgePreferences extends PreferencesStore<ForgePreferences.FPref> {
UI_ENABLE_DISPOSE_TEXTURES("false"),
UI_LOAD_UNKNOWN_CARDS("true"),
UI_LOAD_NONLEGAL_CARDS("true"),
UI_LOAD_CUSTOM_CARDS("false"),
ALLOW_CUSTOM_CARDS_IN_DECKS_CONFORMANCE("false"),
UI_AUTO_CACHE_SIZE("false"),
UI_ALLOW_ORDER_GRAVEYARD_WHEN_NEEDED ("Never"),
UI_DEFAULT_FONT_SIZE("12"),

View File

@@ -178,10 +178,12 @@ public final class FModel {
} catch (Exception e) {
customReader = null;
}
magicDb = new StaticData(reader, tokenReader, customReader, ForgeConstants.EDITIONS_DIR, ForgeConstants.USER_CUSTOM_EDITIONS_DIR,ForgeConstants.BLOCK_DATA_DIR, FModel.getPreferences().getPref(FPref.UI_PREFERRED_ART),
magicDb = new StaticData(reader, tokenReader, customReader, ForgeConstants.EDITIONS_DIR,
ForgeConstants.USER_CUSTOM_EDITIONS_DIR, ForgeConstants.BLOCK_DATA_DIR,
FModel.getPreferences().getPref(FPref.UI_PREFERRED_ART),
FModel.getPreferences().getPrefBoolean(FPref.UI_LOAD_UNKNOWN_CARDS),
FModel.getPreferences().getPrefBoolean(FPref.UI_LOAD_NONLEGAL_CARDS),
FModel.getPreferences().getPrefBoolean(FPref.UI_LOAD_CUSTOM_CARDS),
FModel.getPreferences().getPrefBoolean(FPref.ALLOW_CUSTOM_CARDS_IN_DECKS_CONFORMANCE),
FModel.getPreferences().getPrefBoolean(FPref.UI_SMART_CARD_ART)
);
CardTranslation.preloadTranslation(preferences.getPref(FPref.UI_LANGUAGE), ForgeConstants.LANG_DIR);