Changed set flag from "playable" to "needsLoading", to make it more accurate.

This commit is contained in:
marcin.sciesinski
2019-09-05 19:25:05 -07:00
parent 3c1da2887e
commit 99ed895ca1
3 changed files with 9 additions and 9 deletions

View File

@@ -105,7 +105,7 @@
"rarityFile":"/set20-rarity.txt",
"originalSet":false,
"merchantable":false,
"playable":false
"needsLoading": false
},
{
"setId":"30",

View File

@@ -32,7 +32,7 @@ public class CardSets {
Set<String> flags = new HashSet<String>();
determineOriginalSetFlag(setDefinition, flags);
determineMerchantableFlag(setDefinition, flags);
determinePlayableFlag(setDefinition, flags);
determineNeedsLoadingFlag(setDefinition, flags);
DefaultSetDefinition rarity = new DefaultSetDefinition(setId, setName, flags);
@@ -50,12 +50,12 @@ public class CardSets {
}
}
private void determinePlayableFlag(JSONObject setDefinition, Set<String> flags) {
Boolean playable = (Boolean) setDefinition.get("playable");
if (playable == null)
playable = true;
if (playable)
flags.add("playable");
private void determineNeedsLoadingFlag(JSONObject setDefinition, Set<String> flags) {
Boolean needsLoading = (Boolean) setDefinition.get("needsLoading");
if (needsLoading == null)
needsLoading = true;
if (needsLoading)
flags.add("needsLoading");
}
private void determineMerchantableFlag(JSONObject setDefinition, Set<String> flags) {

View File

@@ -55,7 +55,7 @@ public class LotroCardBlueprintLibrary {
private void initCardSets(CardSets cardSets) {
for (SetDefinition setDefinition : cardSets.getSetDefinitions().values()) {
if (setDefinition.hasFlag("playable")) {
if (setDefinition.hasFlag("needsLoading")) {
logger.debug("Loading set " + setDefinition.getSetId());
final Set<String> allCards = setDefinition.getAllCards();
for (String blueprintId : allCards) {