Skip to content

Commit 77e0427

Browse files
authored
Update game.min.js
1 parent 524a6d5 commit 77e0427

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

1-70-0/js/game.min.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40981,7 +40981,14 @@ var Screen = function() {
4098140981
this.game.prodigy.old.loadSave(data.wizard);
4098240982
this.offlineMode();
4098340983
}
40984+
else {
40985+
this.game.prodigy.open.confirm("It looks like this is your first time signing in with this account. Do you want to load a wizard?", this.openFileForCharacter.bind(this, true), this.game.prodigy.start.bind(this.game.prodigy, "CharCreate"), null, "Hey!")
40986+
}
40987+
} else {
40988+
// Didn't successfully load the cloud save :(
40989+
this.game.prodigy.start("CharCreate");
4098440990
}
40991+
}, e.prototype.authorizeWithGoogle = function() {
4098540992
function loadCallback(data) {
4098640993
console.log(data);
4098740994
if (data.success) {
@@ -67142,4 +67149,24 @@ class OldProdigy {
6714267149
deleteUser()
6714367150
}).catch(handleDatabaseError)
6714467151
}
67152+
// Checks if the player still has an active Google session.
67153+
getCurrentSession(callback) {
67154+
var self = this;
67155+
firebase.utils.auth.onAuthStateChanged(firebase.auth, (user) => {
67156+
if (user) {
67157+
if (!self.signedIn) {
67158+
Util.log("Session restored.", Util.INFO)
67159+
self.game.prodigy.player.userID = user.uid;
67160+
self.signedIn = true;
67161+
callback({
67162+
success: true,
67163+
userID: user.uid
67164+
})
67165+
} else if (firebase.auth.currentUser == null) {
67166+
self.game.prodigy.player.saveEnabled = false;
67167+
self.signOut()
67168+
}
67169+
}
67170+
})
67171+
}
6714567172
}

0 commit comments

Comments
 (0)