v2.0.0: added proper unlock logic for the Duelist
This commit is contained in:
+3
-1
@@ -40,7 +40,9 @@ public class ShatteredPixelDungeon extends Game {
|
|||||||
public static final int v1_1_2 = 588;
|
public static final int v1_1_2 = 588;
|
||||||
public static final int v1_2_3 = 628;
|
public static final int v1_2_3 = 628;
|
||||||
public static final int v1_3_2 = 648;
|
public static final int v1_3_2 = 648;
|
||||||
public static final int v1_4_0 = 660;
|
public static final int v1_4_3 = 668;
|
||||||
|
|
||||||
|
public static final int v2_0_0 = 684;
|
||||||
|
|
||||||
public ShatteredPixelDungeon( PlatformSupport platform ) {
|
public ShatteredPixelDungeon( PlatformSupport platform ) {
|
||||||
super( sceneClass == null ? WelcomeScene.class : sceneClass, platform );
|
super( sceneClass == null ? WelcomeScene.class : sceneClass, platform );
|
||||||
|
|||||||
@@ -293,9 +293,6 @@ public enum HeroClass {
|
|||||||
//always unlock on debug builds
|
//always unlock on debug builds
|
||||||
if (DeviceCompat.isDebug()) return true;
|
if (DeviceCompat.isDebug()) return true;
|
||||||
|
|
||||||
//For Beta/Alpha testers, TODO disable for full release!
|
|
||||||
if (this == DUELIST) return true;
|
|
||||||
|
|
||||||
switch (this){
|
switch (this){
|
||||||
case WARRIOR: default:
|
case WARRIOR: default:
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -284,6 +284,15 @@ public class WelcomeScene extends PixelScene {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//pre-unlock Duelist for those who already have a win
|
||||||
|
if (previousVersion <= ShatteredPixelDungeon.v2_0_0){
|
||||||
|
Badges.loadGlobal();
|
||||||
|
if (Badges.isUnlocked(Badges.Badge.VICTORY) && !Badges.isUnlocked(Badges.Badge.UNLOCK_DUELIST)){
|
||||||
|
Badges.unlock(Badges.Badge.UNLOCK_DUELIST);
|
||||||
|
Badges.saveGlobal();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
SPDSettings.version(ShatteredPixelDungeon.versionCode);
|
SPDSettings.version(ShatteredPixelDungeon.versionCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user