v2.2.0: tutorial is now skipped if there is some existing save data

This commit is contained in:
Evan Debenham
2023-07-13 15:12:57 -04:00
parent 66c62f2081
commit aec4b0089c
2 changed files with 5 additions and 1 deletions

View File

@@ -25,6 +25,7 @@ import com.shatteredpixel.shatteredpixeldungeon.Badges;
import com.shatteredpixel.shatteredpixeldungeon.Chrome; import com.shatteredpixel.shatteredpixeldungeon.Chrome;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.GamesInProgress; import com.shatteredpixel.shatteredpixeldungeon.GamesInProgress;
import com.shatteredpixel.shatteredpixeldungeon.Rankings;
import com.shatteredpixel.shatteredpixeldungeon.SPDSettings; import com.shatteredpixel.shatteredpixeldungeon.SPDSettings;
import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon; import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroClass; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroClass;
@@ -428,6 +429,9 @@ public class HeroSelectScene extends PixelScene {
@Override @Override
public void update() { public void update() {
super.update(); super.update();
if (SPDSettings.intro() && Rankings.INSTANCE.totalNumber > 0){
SPDSettings.intro(false);
}
btnExit.visible = btnExit.active = !SPDSettings.intro(); btnExit.visible = btnExit.active = !SPDSettings.intro();
//do not fade when a window is open //do not fade when a window is open
for (Object v : members){ for (Object v : members){

View File

@@ -147,7 +147,7 @@ public class WelcomeScene extends PixelScene {
SPDSettings.version(ShatteredPixelDungeon.versionCode); SPDSettings.version(ShatteredPixelDungeon.versionCode);
GamesInProgress.selectedClass = null; GamesInProgress.selectedClass = null;
GamesInProgress.curSlot = GamesInProgress.firstEmpty(); GamesInProgress.curSlot = GamesInProgress.firstEmpty();
if (GamesInProgress.curSlot == -1){ if (GamesInProgress.curSlot == -1 || Rankings.INSTANCE.totalNumber > 0){
SPDSettings.intro(false); SPDSettings.intro(false);
ShatteredPixelDungeon.switchScene(TitleScene.class); ShatteredPixelDungeon.switchScene(TitleScene.class);
} else { } else {