diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Badges.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Badges.java index 7e7c6d35e..de1e3fef2 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Badges.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Badges.java @@ -179,9 +179,6 @@ public class Badges { private static final HashSet removedBadges = new HashSet<>(); static{ - //removed in 0.6.1 - removedBadges.add("NIGHT_HUNTER"); - //removed in 0.6.5 removedBadges.addAll(Arrays.asList("RARE_ALBINO", "RARE_BANDIT", "RARE_SHIELDED", "RARE_SENIOR", "RARE_ACIDIC", "RARE", "TUTORIAL_WARRIOR", "TUTORIAL_MAGE")); @@ -193,8 +190,8 @@ public class Badges { renamedBadges.put("CHAMPION", "CHAMPION_1"); } - private static HashSet restore( Bundle bundle ) { - HashSet badges = new HashSet(); + public static HashSet restore( Bundle bundle ) { + HashSet badges = new HashSet<>(); if (bundle == null) return badges; String[] names = bundle.getStringArray( BADGES ); @@ -213,8 +210,8 @@ public class Badges { return badges; } - - private static void store( Bundle bundle, HashSet badges ) { + + public static void store( Bundle bundle, HashSet badges ) { int count = 0; String names[] = new String[badges.size()]; @@ -841,6 +838,11 @@ public class Badges { return global.contains( badge ); } + public static HashSet allUnlocked(){ + loadGlobal(); + return new HashSet<>(global); + } + public static void disown( Badge badge ) { loadGlobal(); global.remove( badge );