Skip to content

Commit

Permalink
TsumBeta: Allow recording with second item on
Browse files Browse the repository at this point in the history
Additionally, fixes bug that "Skip first person" could not be disabled. Worked only by closing and restarting the script.

TsumBeta: Allow recording with second item on
  • Loading branch information
mcs committed Aug 4, 2024
1 parent 3eb90ef commit 832444c
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 17 deletions.
2 changes: 1 addition & 1 deletion scripts/com.r2studio.TsumBeta/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ The script has various settings. Here is a brief description of every setting.
| Receive All Hearts | Will Receive hearts by clicking the "Claim All" button. This is fast, but not very nice to others because "Unknown" senders won't get hearts back from you. Check the setting "Receive Hearts One By One" if you care about your Unknown friends. |
| Waiting time (min) before repeat | The frequency how often the "Claim All" button will be used. |
| Receive Hearts One By One | This will process every message in your mailbox one after another. While this might seem waste of time compared to the "Claim All" button, Claiming every heart one by one also sends a heart back to the sender, even if it is an Unknown person you don't have in your friends list. Fetching hearts this may might encourage Unknown players to also send you hearts (and coins) in the future as they als get a heart from you. |
| Skip first person | Always ignores the first message when claiming hearts one by one. Useful if you live in a country where the first message is an Ad which causes problems for you.<br>Enabling this will break the "Record Sender" feature, so be sure to disable that when you activate "Skip first person". |
| Skip first person | Always ignores the first message when claiming hearts one by one. Useful if you live in a country where the first message is an Ad which causes problems for you. |
| Skip ruby | Won't open messages which contain rubies.<br>Enable if your main playing device is an Apple phone but your sender runs on an Android phone, as rubies are not shared between Apple and Android versions of the game.<br>If you only own Android devices, leave this off. |
| Max Times to Open Mailbox | Maximum amount of consecutive mailbox openings until the next task (send hearts / play game) will be started. The task ends before "max times" if on one opening the mailbox is still empty. |
| Waiting time before repeat | The mailbox won't be opened again for so many minutes after it has been emptied successfully or "Max Times" was reached. |
Expand Down
30 changes: 16 additions & 14 deletions scripts/com.r2studio.TsumBeta/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,12 @@ var Button = {
outReceiveOk: {x: 835, y: 1092, color: {"a":0,"b":6,"g":175,"r":236}},
outReceiveItemSetOk: {x: 830, y: 1260, color: {"a":0,"b":8,"g":176,"r":238}},
outReceiveClose: {x: 530, y: 1372},
outReceiveOne: {x: 840, y: 569, color: {"a":0,"b":30,"g":181,"r":235}, color2: {"a":0,"b":119,"g":74,"r":40}},
outReceiveOne2th: {x: 840, y: 774, color: {"a":0,"b":30,"g":181,"r":235}, color2: {"a":0,"b":119,"g":74,"r":40}},
outReceiveOneRuby: {x: 295, y: 651, color: {r: 224, g: 93, b: 101}}, // ruby
outReceiveOneRuby2th: {x: 295, y: 855, color: {r: 235, g: 93, b: 105}}, // ruby
outReceiveOneAd: { x: 290, y: 672, color: { r: 90, g: 57, b: 25 } }, // ad
outReceiveOneAd2th: { x: 290, y: 876, color: { r: 90, g: 57, b: 25 } }, // ad
outReceiveOneBase: {y: 569},
outReceiveOne: {x: 840, color: {"a":0,"b":30,"g":181,"r":235}, color2: {"a":0,"b":119,"g":74,"r":40}},
outReceiveOneRubyBase: {y: 651}, // ruby
outReceiveOneRuby: {x: 295, color: {r: 224, g: 93, b: 101}}, // ruby
outReceiveOneAdBase: { y: 672 }, // ad
outReceiveOneAd: { x: 290, color: { r: 90, g: 57, b: 25 } }, // ad
outReceiveTimeout: {x: 600, y: 1092, color: {"a":0,"b":11,"g":171,"r":235}},
outSendHeartTop: {x: 910, y: 502},
outSendHeart0: {x: 910, y: 698, color: {"a":0,"b":142,"g":60,"r":209}, color2: {"a":0,"b":140,"g":65,"r":3}},
Expand All @@ -131,8 +131,10 @@ var Button = {
skillLuke2: {x: 830, y: 1402},
skillLuke3: {x: 670, y: 1447},
skillLuke4: {x: 960, y: 1232},
outReceiveNameFrom: {x: 150, y: 532},
outReceiveNameTo: {x: 660, y: 670},
outReceiveNameFromBase: {y: 532},
outReceiveNameFrom: {x: 150},
outReceiveNameToBase: {y: 670},
outReceiveNameTo: {x: 660},
moneyInfoBox: {x: 430, y: 188, w: 230, h: 56},
outOpenTsumCollectionOrder: {x: 983, y: 890, r: 165, g: 85, b: 49},
outCloseTsumCollectionOrder: {x: 552, y: 1365, r: 247, g: 174, b: 8},
Expand Down Expand Up @@ -2797,12 +2799,12 @@ function start(settings) {
if (settings['recordSenderEnlarge']) {
ts.resizeRatio = 1;
}
if (ts.receiveSecondItem) {
ts.recordReceive = false;
Button.outReceiveOne = Button.outReceiveOne2th;
Button.outReceiveOneRuby = Button.outReceiveOneRuby2th;
Button.outReceiveOneAd = Button.outReceiveOneAd2th;
}
var yOffset = ts.receiveSecondItem ? 202 : 0;
Button.outReceiveOne.y = Button.outReceiveOneBase.y + yOffset;
Button.outReceiveOneRuby.y = Button.outReceiveOneRubyBase.y + yOffset;
Button.outReceiveOneAd.y = Button.outReceiveOneAdBase.y + yOffset;
Button.outReceiveNameFrom.y = Button.outReceiveNameFromBase.y + yOffset;
Button.outReceiveNameTo.y = Button.outReceiveNameToBase.y + yOffset;

if (ts.recordReceive) {
ts.readRecord();
Expand Down
4 changes: 2 additions & 2 deletions scripts/com.r2studio.TsumBeta/src/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,8 @@ var settings = [
},
{
key: 'receiveHeartsSkipFirst',
title: 'Skip first person(disable record)',
title_zh_TW: '跳過一個使用者(無法紀錄收心)',
title: 'Skip first person',
title_zh_TW: '跳過一個使用者',
default: false
},
{
Expand Down

0 comments on commit 832444c

Please sign in to comment.