Changed set flag from "playable" to "needsLoading", to make it more accurate.
This commit is contained in:
@@ -105,7 +105,7 @@
|
||||
"rarityFile":"/set20-rarity.txt",
|
||||
"originalSet":false,
|
||||
"merchantable":false,
|
||||
"playable":false
|
||||
"needsLoading": false
|
||||
},
|
||||
{
|
||||
"setId":"30",
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user