Skip to content

Commit

Permalink
TsumBeta: Release v68 (#529)
Browse files Browse the repository at this point in the history
This fixes a script error when script wants to play another game immediately after it played one.

With commit c84b088 page navigation became more object-orientated, but the navigation to "play game" did not reflect that change. Renaming "ProfilePage" to "ProfilePageJp" works with the new approach but breaks the old logic where at least one page key must exist per page name. This commit removes the last piece of the old page navigation logic.
  • Loading branch information
mcs authored Jul 2, 2024
1 parent f3dc8ac commit 3a3216e
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 7 deletions.
4 changes: 2 additions & 2 deletions script-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@
"com.r2studio.TsumBeta": {
"id": "com.r2studio.TsumBeta",
"title": "Disney Tsum Tsum",
"versionCode": 67,
"description": "<b style='color: #2196f3;'>\uD83D\uDD16 版本 v67 Beta</b>\n<ul>\n <li>检测新的国际主屏幕<br>Detect new Int'l Home screen</li>\n</ul>",
"versionCode": 68,
"description": "<b style='color: #2196f3;'>\uD83D\uDD16 版本 v68 Beta</b>\n<ul>\n <li>修复自动播放的竞争条件<br>Fix autoplay race condition</li>\n</ul>",
"packageName": "com.linecorp.LGTMTMG",
"downloadURL": "https://github.com/r2-studio/robotmon-scripts/raw/master/scripts/com.r2studio.TsumBeta/index.zip",
"dependencies": []
Expand Down
6 changes: 6 additions & 0 deletions scripts/com.r2studio.TsumBeta/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to the TsumBeta script will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).


## [v68] - 2024-06-30

### Fixed
- "script error" when "auto play" was active and all "Wait time (min) before repeat" values were greater than 1


## [v67] - 2024-06-29

### Added
Expand Down
Binary file modified scripts/com.r2studio.TsumBeta/index.zip
Binary file not shown.
9 changes: 5 additions & 4 deletions scripts/com.r2studio.TsumBeta/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1573,10 +1573,11 @@ Tsum.prototype.goGamePlayingPage = function() {
if (!this.isAppOn()) {
this.startApp();
}
var page = this.findPage(2, 2000);
var pageObj = this.findPageObject(2, 2000);
var page = pageObj != null ? pageObj.name : "unknown";
log(this.logs.currentPage, page, "play");
if (page === 'FriendPage') {
this.tap(Page[page].next);
this.tap(pageObj.next);
this.sleep(3000);
} else if (page === 'StartPage') {
this.sleep(500);
Expand All @@ -1591,7 +1592,7 @@ Tsum.prototype.goGamePlayingPage = function() {
return;
}
} else if (page === 'GamePause') {
this.tap(Page[page].next);
this.tap(pageObj.next);
this.sleep(500);
} else if (page === 'unknown') {
this.exitUnknownPage();
Expand All @@ -1600,7 +1601,7 @@ Tsum.prototype.goGamePlayingPage = function() {
this.tap({x: 310, y: 1588 - 140});
this.sleep(1000);
} else {
this.tap(Page[page].back);
this.tap(pageObj.back);
this.sleep(1000);
}
}
Expand Down
2 changes: 1 addition & 1 deletion scripts/com.r2studio.TsumBeta/src/settings.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use strict";

var VERSION = 67;
var VERSION = 68;

/**
* Returns the language parameter for the currently active locale.
Expand Down

0 comments on commit 3a3216e

Please sign in to comment.