Skip to content

Commit 524a6d5

Browse files
authored
Update game.min.js
1 parent 60e5cfb commit 524a6d5

File tree

1 file changed

+19
-12
lines changed

1 file changed

+19
-12
lines changed

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

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40961,18 +40961,25 @@ var Screen = function() {
4096140961
this.gotoLoginMode("Logging in..."), this.username = this.usernameField.getValue(), this.password = this.passwordField.getValue(), "" === this.username || "" === this.password ? this.onError(NetworkManager.LOGIN, null, 400) : window.setTimeout(this.login.bind(this), 1e3)
4096240962
}, e.prototype.onGoogleLoginButtonClick = function() {
4096340963
this.authorizeWithGoogle();
40964-
}, e.prototype.authorizeWithGoogle = function () {
40965-
function googleCallback(data) {
40966-
if (data.success) {
40967-
// Successful Google sign-in:
40968-
this.game.prodigy.player.userID = data.userID;
40969-
this.game.prodigy.old.getCloudSave(data.userID, loadCallback.bind(this));
40970-
this.error.setText("Loading wizard data...")
40971-
} else {
40972-
// Unsuccessful Google sign-in:
40973-
this.showLogin(!1);
40974-
this.error.setText("Google login error: " + data.code);
40975-
this.closeButton.visible = !0;
40964+
}, e.prototype.onGoogleSignIn = function(data) {
40965+
if (data.success) {
40966+
// Successful Google sign-in:
40967+
this.game.prodigy.player.userID = data.userID;
40968+
this.game.prodigy.old.getCloudSave(data.userID, this.onGoogleSaveLoad.bind(this));
40969+
this.error.setText("Loading wizard data...")
40970+
} else {
40971+
// Unsuccessful Google sign-in:
40972+
this.showLogin(!1);
40973+
this.error.setText("Google login error: " + data.code);
40974+
this.closeButton.visible = !0;
40975+
}
40976+
}, e.prototype.onGoogleSaveLoad = function(data) {
40977+
//console.log(data);
40978+
if (data.success) {
40979+
// Successfully loaded the cloud save!
40980+
if (Util.isDefined(data.wizard)) {
40981+
this.game.prodigy.old.loadSave(data.wizard);
40982+
this.offlineMode();
4097640983
}
4097740984
}
4097840985
function loadCallback(data) {

0 commit comments

Comments
 (0)