Skip to content

Commit

Permalink
Merge pull request icegreentee#444 from segfault-bilibili/rollup-7.2.7
Browse files Browse the repository at this point in the history
【7.2.7】允许手工指定刘海偏移
  • Loading branch information
segfault-bilibili committed Jun 10, 2023
2 parents c95cea8 + d40b626 commit f27a3a7
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 3 deletions.
9 changes: 9 additions & 0 deletions floatUI.js
Original file line number Diff line number Diff line change
Expand Up @@ -1923,6 +1923,9 @@ var limit = {
doNotHideFloaty: false,
doNotToggleForegroundService: false,
autoRecover: false,
override_gameoffset: false,
override_gameoffset_x: "0",
override_gameoffset_y: "0",
drug1: false,
drug2: false,
drug3: false,
Expand Down Expand Up @@ -4005,6 +4008,12 @@ function algo_init() {
}
log("detected_gameoffset", detected_gameoffset);

if (limit.override_gameoffset) {
detected_gameoffset.x = parseInt(limit.override_gameoffset_x);
detected_gameoffset.y = parseInt(limit.override_gameoffset_y);
log("override detected_gameoffset", detected_gameoffset);
}

return {
screen: detected_screen,
gamebounds: detected_gamebounds,
Expand Down
13 changes: 13 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,16 @@ ui.layout(
<text id="autoRecoverText1" visibility="gone" textSize="12" text="强烈建议把上面的“自动开启无障碍服务”也一并开启!" textColor="#FF0000" />
<text id="autoRecoverText2" visibility="gone" textSize="12" text="脚本可以监工游戏,防止游戏因为掉线/闪退/内存泄漏溢出而中断自动周回。但是游戏闪退时貌似有几率会带着脚本一起崩溃,原因不明。" textColor="#000000" />
<text id="autoRecoverText3" visibility="gone" textSize="12" text="为了对付这个问题,目前有个临时的办法(需要root或adb权限),就是在logcat里监控脚本是否还在运行,如果发现脚本超过1分钟没动弹,就杀死脚本和游戏进程,然后重启脚本,再由脚本重启游戏。目前只有“副本周回(剧情/活动通用)”脚本支持这个功能。" textColor="#000000" />
<Switch id="override_gameoffset" margin="0 3" w="*" checked="false" textColor="#000000" text="手工指定刘海偏移" />
<linear id="override_gameoffsetText1" visibility="gone" padding="0 0 0 0" w="*" h="auto">
<text text="刘海偏移x" textSize="12" textColor="#000000" />
<input maxLength="6" margin="0 0 0 0" id="override_gameoffset_x" hint="0" text="0" textSize="12" inputType="number" />
</linear>
<linear id="override_gameoffsetText2" visibility="gone" padding="0 0 0 0" w="*" h="auto">
<text text="刘海偏移y" textSize="12" textColor="#000000" />
<input maxLength="6" margin="0 0 0 0" id="override_gameoffset_y" hint="0" text="0" textSize="12" inputType="number" />
</linear>
<text id="override_gameoffsetText3" visibility="gone" textSize="12" text="一般情况下无需手工指定刘海偏移,指定错误会导致脚本无法正常执行。" textColor="#ff0000" />
</vertical>
</vertical>

Expand Down Expand Up @@ -993,6 +1003,9 @@ const persistParamList = [
"doNotToggleForegroundService",
"autoEnableAccSvc",
"autoRecover",
"override_gameoffset",
"override_gameoffset_x",
"override_gameoffset_y",
"promptAutoRelaunch",
"reLoginNeverAbandon",
"usePresetOpList",
Expand Down
2 changes: 1 addition & 1 deletion project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"build"
],
"packageName": "top.momoe.auto",
"versionName": "7.2.6",
"versionName": "7.2.7",
"versionInfo": "",
"versionCode": 1,
"icon":"./images/icon.png",
Expand Down
Loading

0 comments on commit f27a3a7

Please sign in to comment.